in reply to Re: Easy dispatch tables.
in thread Easy dispatch tables.

Oh how wrong you are! ;-)

Since the purpose of the package in which the subs live is to contain dispatch subs, it should be presumed that that is all those subs are to be used for. Allowing some subs to be exempted is a natural expediency. But it would be wrong (IMHO) to let the package (like TestPkg in the example) be any arbitrary class, or other package. Namespaces are a good way to package up a set of closely related subs, and in this case, they're closely related by virtue of being the targets of a dispatch table.

jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.

Replies are listed 'Best First'.
Re: Re: Re: Easy dispatch tables.
by hardburn (Abbot) on Apr 03, 2003 at 04:15 UTC

    Ahhh, I see. You're right.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated