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.
  • Let's say you have this prog.pl:

    #!/usr/bin/perl

    sub do_something {
        return 42;
    }

    print "Running\n";

    and this test.pl:

    #!/usr/bin/perl

    require 'prog.pl';
    print "ok 1\n" if do_something()==42;

    Now, running test.pl produces:

    Running
    ok 1

    because the require will execute the program. So, if the program dies because @ARGV is wrong, or somesuch, your test dies as well...