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.
  • something like

    #!/usr/bin/perl

    use strict;
    use warnings;

    use Test::More;

    my $tests;

    BEGIN { $tests += 3 }
    use_ok 'Clone::Closure';
    can_ok 'Clone::Closure', 'clone';
    ok !main->can('clone'), 'clone not exported by default';

    BEGIN { $tests += 2 }
    use_ok 'Clone::Closure', 'clone';
    can_ok 'main', 'clone';

    BEGIN { plan tests => $tests }

    BAIL_OUT('module will not load')
        if grep !$_, Test::More->builder->summary;

    as t/00use.t and then just use the modules after that. I'm deliberately ignoring the

    • This is similar to my approach, though I don't usually test for specific functions or methods. Once I've established that the modules can load, I leave it to individual suites to test specific modules.

      (But then, I also arrange my suites so that no suite is dependent on a module that hasn't already been vetted by a previous suite. I'm just anal-retentive that way...)

      --

      --rjray