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

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Friday August 08, 2008
04:53 AM

Module::NoLoad

[ #37128 ]

Idea.

Fatal:

use Module::NoLoad qw(
    Acme::pwn3d
    Meta
);

Silent:

use Module::NoLoad
    'Overrides::SIG::DIE' => { silent => 1 };

Versions (automatically fatal):

use Module::NoLoad
    'Some::Versions::Buggy'  => { versions => '0.23' },
    'Early::Versions::Buggy' => { versions => '-1.99' };

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.
  • I read the name and automatically assumed you were writing something which would unload or not load a module. I couldn't imagine how that would be useful, but that's what I assumed.

    Cool idea though. Might suggest calling it Module::CheckLoad or something like that.

    • "NoLoad" was intentional (better names welcome). For example:

      use Module::NoLoad
          'Overrides::SIG::DIE' => { silent => 1 };

      Is equivalent to this:

      BEGIN {
          $INC{'lib/Overrides/SIG/DIE.pm'} = 'Module::NoLoad';
      }

      This, of course, silently stops this module from being loaded. The fatal version would require a higher version of Perl:

      use Module::NoLoad
          'Meta', 'Acme::pwn3d';
      __END__
      # equivalent to:
      use Carp;
      BEGIN {
          my %package_for = (
           

      • Oh I didn't get that. :) The name now makes perfect sense, and seems very appropriate.

      • I think Devel::Unplug [cpan.org] does at least some of what you want. If not it can be hacked on in Copenhagen :)
        • That's good to know. My intent is to have a more general purpose module (not just for development), but maybe "devel only" is a better approach.