Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: A simple import() for those special moments (bugfixes)

by ihb (Deacon)
on Jan 20, 2003 at 12:20 UTC ( #228329=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      {
        package Foo::foo_bar;
    ...
    
      use Foo;
      print $foo_bar::bar; # 'BAR'!
    
  2. or download this
        sub import {
            my $caller = caller() . '::';
    
    ...
            *{"$caller$_"} = *{__PACKAGE__ . "::$_"}
                for grep !/::$/ && /$exported/, keys %{__PACKAGE__ . '::'}
    +;
        }
    
  3. or download this
      use Exporter::Pattern qr/PATTERN/;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2015-07-02 23:52 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 (47 votes), past polls