Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Perl templating/macro creating using 'BEGIN'...

by Corion (Patriarch)
on Sep 27, 2010 at 17:04 UTC ( [id://862248]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    BEGIN {
        sub main_package_vars {
            foreach(@_) {
    ...
            }
        }
    }
    
  2. or download this
        sub main_package_vars {
            foreach my $name (@_) {
    ...
                }"
            }
        }
    
  3. or download this
    BEGIN {
        eval "*package_vars2 = \*main::main_package_vars";
        *package_vars3 = \*main::main_package_vars;
    }
    
  4. or download this
    package_vars3( qw(one two three) );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found