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.
  • You really like to goad me to put my "evil hat" on. This is a crude example to show the concept -- it would need to be a bit more helpful and a bit more robust for real use.

    package Nice;
    use strict;
    use warnings;
    no warnings 'once';

    *CORE::GLOBAL::require = sub {
      my $mod = shift;
      eval { CORE::require($mod) };
      if ($@) {
        if ( my ($mod) = $@ =~ /\ACan't locate (\S+)/ ) {
          $mod =~ s{/}{::}g;
          $mod =~ s{\.pm$}{};
          $@ = <