Subject: | Doesn't work from the command line |
Following up on #125427, for maximum DRY, it would be nice if rlib::_dirs() were usable from the command line. However, in that case caller() returns empty, so the wrong branch of the if at https://metacpan.org/source/GBARR/rlib-0.02/rlib.pm#L20 is taken. Example (perlbrew Perl 5.26.1 cygwin x64) -
$ perl -Mrlib -E 'say(rlib::_dirs("."))'
fileparse(): need a valid pathname at /home/cxw/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/rlib.pm line 27.
Thanks!