Reviewing merge request #8: Argument type :pathname
Hi
I'm using trollop for most of my shell scripts, however, the arguments often involve pathnames. The current :io type is not quite suitable because the pathname arguments point to directories (think: --tempdir /tmp/myscript) which don't even have to exist at the time of argument parsing.
Until now I've treated pathnames as strings, but given the very nice freebies you get when using Pathname instead of String (such as concatting paths with "+" in a platform agnostic manner or "directory?" when traversing filesystems), I had to convert all pathname arguments after parsing them. Not so elegant.
It's not a big change, so I've cloned trollop and implemented the addition and a test for it. Hope you like it.
Cheers, -sven


Add a new comment:
Login or create an account to post a comment