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.
  • In Padre I have the following code:

    use strict;
    use warnings;

    use Test::More;
    plan skip_all => 'Needs Test::Compile 0.08' if not eval "use Test::Compile 0.08; 1";
    diag "Test::Compile $Test::Compile::VERSION";
    all_pl_files_ok(all_pm_files());

    The funny call at the end is because currently Test::Compile has all_pm_files_ok() that "use"-es all the pm files while all_pl_files_ok() runs "perl -cw path/to/module" on all modules.

    The above combination provides the strongest way to check if every module can be compiled on its own.

    Maybe what I'd really need though is to run

    perl -cw -Mblib -MModule::Name -e1

    one every module.

    --
    • I've been using Test::UseAllModules (since 2006) which reads MANIFEST and tries to load every .pm module under "lib" directory, and if anything should fail, the test would bail out.

      A sample code is like this:

          use strict;
          use warnings;
          use Test::UseAllModules;

          BEGIN {
              all_uses_ok();
          }

      The point is you don't need to find modules as it should be done by ExtUtils::Manifest when you ship the package.