![]() |
|
No such thing as a small change | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Two other issues come into this. What is imported? What namespaces do we subclass? An old style 'foo.pl' library by default exports everything it defines, so two requires may act as you fear, except that the last executed require provides the visible &todo. Perl modules are expected to establish their own namespace and not walk on each other's definitions. In your example, something.pm may call itself package something; internally, so its &todo is addressed as &something::todo while the other is addressed as 'different::todo(@things). Calling require happens at runtime, so you may need to import the routines you want. If you place the module namespace on your own namespace's @ISA at some time, you inherit whichever &todo appears first in a depth-first search of @ISA. After Compline, In reply to Re: Reloading modules more than once
by Zaxo
|
|