Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Cancel/no-op a require

by sedusedan (Monk)
on Dec 07, 2012 at 12:52 UTC ( #1007731=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    unshift @INC, \&import_hook;
    require Foo; # nothing is loaded
    require Bar; # nothing is loaded
    
  2. or download this
    unshift @INC, sub {
        return (undef, sub {0});
    }
    
  3. or download this
    use Tie::Handle::Scalar;
    unshift @INC, sub {
        tie *FH, "Tie::Handle::Scalar", ""; # or "1;\n"
        #$INC{$name} = undef; # or $name. testing
        return (*FH);
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2014-09-01 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls