The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Devel::Loading - Run code before each module is loaded

VERSION

version 0.01

SYNOPSIS

    perl -MDevel::Loading -Mbase -e0
        Loading base.pm at - line 0.
        Loading strict.pm at /opt/local/lib/perl5/5.8.8/base.pm line 3.
        Loading vars.pm at /opt/local/lib/perl5/5.8.8/base.pm line 4.
        Loading warnings/register.pm at /opt/local/lib/perl5/5.8.8/vars.pm line 7.
        Loading warnings.pm at /opt/local/lib/perl5/5.8.8/warnings/register.pm line 24.
        Loading Carp.pm at /opt/local/lib/perl5/5.8.8/warnings.pm line 134.
        Loading Exporter.pm at /opt/local/lib/perl5/5.8.8/Carp.pm line 193.


    use Regexp::Common;
    use Devel::Loading sub { die "I can't load $_!" if /$RE{profanity}/ };

DESCRIPTION

Putting coderefs into @INC is pretty sick and wrong. But sometimes you just need to know, you know?

CAVEATS

Other modules that prepend things to @INC (such as lib) won't have their loading announced. Perhaps some XS is in order. Then again, am I evil enough to tie @INC? Stay tuned.

Multiple Devel::Loading hooks may be present in @INC. This is a feature!

AUTHOR

Shawn M Moore, <sartak@bestpractical.com>

SEE ALSO

Devel::Loaded