On Tue, 25 Dec 2001 16:03:21 -0500 Michael G Schwern <[EMAIL PROTECTED]> wrote:
> > Class::Trigger is a mixin class to invoke triggers (or hooks) in > > arbitrary point, which can be registered from outside the class. > > Useful for extending your own framework like Class::DBI. (In fact, > > this module first implementation is extracted out from Class::DBI > > 0.35) > > Are you aware of the perl-aspects project and the Aspect module? Yep. I've found it very interesting. > Very > similar to Class::Trigger by the look of it, but its not nearly as > explicit. Its not necessary for foo() to actually say "triggers go > *here*", you just add them. This may not be what you want. > > You might also find Sub::Uplevel or Hook::LexWrap useful if you want > the trigger's caller() to be the same as foo() itself. Exactly. But the difference would be: * Class::Trigger is easy to learn. * Class::Trigger doesn't require 5.6 or over. -- Tatsuhiko Miyagawa <[EMAIL PROTECTED]>