in reply to Subs with 'extra stuff'?

rvosa,
I asked the very same question a while back - perhaps the responses I received in How Are Attributes Useful? will be helpful.

Cheers - L~R

Replies are listed 'Best First'.
Re^2: Subs with 'extra stuff'?
by rvosa (Curate) on Feb 25, 2006 at 10:37 UTC
    Wow - that's really the exact same question, only better phrased :-)

    Thanks! Interesting discussion. I think you might use them for example to distinguish between types of methods, e.g.:
    sub set_name : Interface { croak "Not implemented!"; } sub get_name : Interface { croak "Not implemented!"; }
    So that you can query whether a method call you are about to make is implemented by the right class - and not by SUPER:: in an interface - without using eval { ... } blocks.