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 wandering the Monastery: (8)
As of 2015-07-05 20:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls