in reply to Re: Re: Installing chained methods
in thread Installing chained methods
Note that using UNIVERSAL::can() will respect inherited methods, which is not unlikely to be better than what you started out with (or may be not, of course - your call).use Hook::WrapSubs; do { no strict 'refs'; *{"GreenPartyDB::Database::${table}::${hook}"} = sub {}; } unless UNIVERSAL::can("GreenPartyDB::Database::${table}", $hook) wrap_subs( "GreenPartyDB::Database::${table}::${hook}", UNIVERSAL::can(__PACKAGE__."::${prefix}", $hook), );
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^3: Installing chained methods (wrap a stub?)
by diotalevi (Canon) on Apr 22, 2003 at 03:36 UTC | |
by Aristotle (Chancellor) on Apr 22, 2003 at 14:01 UTC | |
by diotalevi (Canon) on Apr 22, 2003 at 14:07 UTC | |
by Aristotle (Chancellor) on Apr 22, 2003 at 14:16 UTC | |
by diotalevi (Canon) on Apr 22, 2003 at 15:32 UTC | |
|