I've been trying to think of a way to place this in a parent class that the other process classes can inherit from, but there would seem to be a problem with the order of new, import, and the like that that I can't seem to find a way to get this to work.
Again, VERY hypothetical code:
Alternatively, I'm wondering if modifying dws's idea above might be worth exploring. That is, add a register function to the DataType class, which stores what names are associated with with package and function, then have, in the process module's begin block, call that global-level function to register code. Then use AUTOLOAD in the DataType to handle those type of classes.package My::ProcessC; BEGIN { my @processfuncs = qw ( processC processC_alt ); } use My::ProcessParent qw(register);
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important
In reply to Re: (tye)Re: Possible Stupid Perl Trick - Importing method into object class?
by Masem
in thread Possible Stupid Perl Trick - Importing method into object class?
by Masem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |