Path::Trim currently does not have any ties with the filesystem. That is, it does not check if the path is valid in the system in which trim_path is executed. Hence, it can trim any path on any system (I hope). For example: a path with \ as separator on Linux.
Cwd's abs_path() requires that the path be valid in the system in which it is executed. Since Path::Trim does not check the filesystem, it is different and can trim paths that are not present or are invalid.
Most probably, next version of the module will have the feature that you have suggested.
__Path::Trim is different from File::Path::Collapse__
Path::Trim allows for the setting of directory separator, current directory and parent directory, thus being able to trim any kind of path. The following are preserved:
* trailing directory separator ( Example: a/b/../ => a/ ) (which may be removed in a new release)
* single current directory ( Example: . => . )
* single parent directory ( Example: .. => .. )
Thank you for the suggestions. However, when I made the module Laconica API was not available. Later on, Laconica supported Twitter API. By then the module was made (if I remember correctly). Right now, there is no way that this module can be used. It is broken.
Yes, it should handle the runtime errors.
Thank you for letting me know. :-)
Alan Haggai Alavi.