Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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?
[LanX]: fun, last time I was in Britain people had problems with my name, just rarely they said "like the children TV star Rolf Harris?", this time most replied instantly "Rolf? like the pedophile Rolf Harris" ?
LanX is perlophile
[ambrus]: Corion: read https://metacpan. org/pod/release/ MLEHMANN/AnyEvent- 7.13/lib/AnyEvent. pm#SUPPLYING-YOUR- OWN-EVENT-MODEL- INTERFACE in that case

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2016-12-08 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (141 votes). Check out past polls.