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.
  • by schwern (1528) on 2004.09.03 19:23 (#34002) Homepage Journal
    use Test::Harness::Straps;

    for my $file (@test_files) {
        local *STDERR;  # T::H only traps STDOUT.

        my %results = Test::Harness::Straps->analyze_file($file);

        ...do something with the results...
    }
    Also, Test::Harness has no knowledge of MakeMaker. Your test programs need to know how to load your libraries. This is done by simply putting blib/lib and blib/arch into @INC.
    use lib qw(blib/lib blib/arch);
    Or...
    use blib;    # pro: they're given as absolute paths in case your test chdirs
                 # con: blib.pm is noisy in older perls