in reply to Re^4: perl inheritance
in thread perl inheritance
No, I wouldn't put it in an import module. A BEGIN block would be better. If you put it in import, you have no guarantee that the import method will ever actually be called. It's quite easy to load a module without ever calling the import method. Conversely, it's very easy for the import method to get called multiple times.
I actually do something pretty similar to the technique being discussed in XML::LibXML::Augment.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: perl inheritance
by JavaFan (Canon) on Mar 23, 2012 at 23:26 UTC | |
by tobyink (Canon) on Mar 24, 2012 at 13:12 UTC | |
by JavaFan (Canon) on Mar 24, 2012 at 13:46 UTC |