Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Apply a source filter to all modules to be loaded?

by Corion (Pope)
on Mar 05, 2007 at 18:44 UTC ( #603267=note: print w/replies, xml ) Need Help??

in reply to Apply a source filter to all modules to be loaded?

This is crazy talk, but that's not stopping Perl from having it, see require:

sub my_own_loader { my ($self,$file) = @_; open my $fh, "<", "my/private/dir/$file" or return; $fh }; BEGIN { unshift @INC, \&my_own_loader; }; use Foo::Bar; use The::Net;

You might also want to look at Filter::Simple, but please realize that source filtering isn't a sane practice :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://603267]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2016-09-29 22:34 GMT
Find Nodes?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:

    Results (562 votes). Check out past polls.