Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Not strict (once and only once)

by Aristotle (Chancellor)
on May 04, 2003 at 04:51 UTC ( #255430=note: print w/replies, xml ) Need Help??


in reply to Re: Not strict
in thread A Perl aptitude test

That is what you call doing it once and only once?
my $namespace = \%GMPN::Database::Table::; my %inject = ( pre_insert => sub { ... }, pre_update => sub { ... }, ); for my $subpkg (qw[org user group foo bar]) { my ($method, $code); $namespace->{"$subpkg::"}->{$method} = $code while ($method, $code) = each %inject; }

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^2: Not strict (once and only once)
by diotalevi (Canon) on May 04, 2003 at 05:40 UTC

    Ok, so it was at least better. And thinking back, I initially wrote each glob access many lines apart which didn't lend itself to that expression.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://255430]
help
Chatterbox?
and cookies bake in the oven...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2018-01-21 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (227 votes). Check out past polls.

    Notices?