[tpm] modifying methods per instance

Uri Guttman uri at StemSystems.com
Fri May 7 23:59:19 PDT 2010

>>>>> "SF" == Shaun Fryer <sfryer at sourcery.ca> writes:

  SF> I found an alternate solution! I used a dispatch table within each
  SF> instance, and then created a single accessor method to execute the
  SF> respective code ref.  Took a bit of tweaking, but works like a
  SF> charm! Thanks for the ideas guys.  Both good, and potentially
  SF> useful for future/different situations.

that pretty much is the same thing as my answer but you have an explicit
dispatch table vs the implied one with the symbol table and the unique
namespace of the ref. yours will require more coding IMO. also you could
use class::classless or other class per instance modules for this.


Uri Guttman  ------  uri at stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

More information about the toronto-pm mailing list