Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Subroutines are created within the package's namespace. An object is simply an reference that can call subroutines (methods) in that namespace. Doing anything to the object doesn't affect the namespace.
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. :-) ------ Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement. In reply to Re: Is it legal to create subs in a module?
by dragonchild
|
|