in reply to Not strict
in thread A Perl aptitude test
When using strict would violate the "once and only once rule". Consider the difference between specifying a whole series of package names versus interpolating something in.
*GPMN::Database::Table::org::pre_insert = *GPMN::Database::Table::user::pre_insert = ..... # repeat for another 15 tables and then do the same for ::pre_up +date for (qw[org user group foo bar]) { no strict 'refs'; *{"GPMN::Database::Table::${_}::pre_insert"} = sub .... *{"GPMN::Database::Table::${_}::pre_update"} = sub .... }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Not strict
by broquaint (Abbot) on May 03, 2003 at 15:30 UTC | |
by allolex (Curate) on May 05, 2003 at 16:00 UTC | |
by diotalevi (Canon) on May 03, 2003 at 16:04 UTC | |
Re^2: Not strict (once and only once)
by Aristotle (Chancellor) on May 04, 2003 at 04:51 UTC | |
by diotalevi (Canon) on May 04, 2003 at 05:40 UTC | |
Re: Not strict
by jonadab (Parson) on May 05, 2003 at 02:30 UTC |
In Section
Meditations