Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by ihb (Deacon)
on Jan 20, 2003 at 12:20 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://228329]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-20 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found