in reply to Is it legal to create subs in a module?
What you want to do is something like:
In fact, you should be doing that anyways. What you have right now won't allow you to create two objects at once or even override the default accessors. :-){ no strict 'refs' eval "sub $action { my \$pkg = shift; return(\$pkg->{\"$action\"}) +; }" unless defined &{$action}; }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|