Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 pondering the Monastery: (12)
As of 2014-10-31 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (219 votes), past polls