Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2018-08-15 14:31 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (161 votes). Check out past polls.