Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • First of all: unless ... else ...? What were you thinking? :)

    Secondly: sticking the TEST_DIR removal in file_to_module seems like a violation of separatation of concerns. Yeah, I know this script is small, but it still bugged me [perlmonks.org] when I did it in a small script of my own [perlmonks.org]. My suggestion would be to fix it the same way as I did:

    use File::Spec::Functions qw( abs2rel );

    # ...

    # file_to_module which does not concern itself with TEST_DIR

    # ...

    ( file_to_module abs2rel $file, TEST_DIR )->require or die $@;

    The script could generally stand some File::Spec [perl.org] attention…