The standard way is to use an anon-sub, so that is what I would recommend. The only real reason for not using an anon-sub is because you want to be able to use the trigger code in another context, in which case you would want it to show up as a method via meta. Remember that the trigger code is passed $self as the first argument so it works just like a method anyway.
Perhaps you might want to elaborate on the reasoning behind wanting this behavior, it might allow us to give you a better solution.
In reply to Re: Hiding trigger code from meta
by stvn
in thread Hiding trigger code from meta
by hsmyers
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |