Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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 :)


Comment on Re: Apply a source filter to all modules to be loaded?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2014-07-31 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (253 votes), past polls