Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: 'require/use' scoping

by brian_d_foy (Abbot)
on Jan 29, 2008 at 15:26 UTC ( #664910=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Foo;
    
    ...
        require Foo;
        Foo->import;
        }
    
  2. or download this
    use MODULE qw(import list);
    
    ...
        require MODULE;
        MODULE->import(import list);
        }
    
  3. or download this
    use MODULE ();
    
    BEGIN {
        require MODULE;
        }
    
  4. or download this
    require "lib/Foo.pm"; # no @INC searching!
    
  5. or download this
    sub require {
      my ($filename) = @_;
    ...
          return $result;
      }
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2015-07-02 06:47 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 (30 votes), past polls