in reply to Re^7: XML::Twig Support for Parameter Entities (AAaD)
in thread XML::Twig Support for Parameter Entities
Loading a datastructure from a file not related to @INC once, 'do' and 'require' amount to the same. For a conditional 'do', I could check %INC instead of using 'require' and checking the return value, so you have a point here. For autoloading anonsubs as really private subs into a package, things are different, since 'require' checks @INC.
Yes, it is a bit sad that require doesn't return the same value from the first call at subsequent calls. For the above case, the AUTOLOAD block has to handle that via a private hash.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: XML::Twig Support for Parameter Entities (docs)
by tye (Sage) on Aug 13, 2015 at 08:36 UTC | |
by shmem (Chancellor) on Aug 13, 2015 at 08:59 UTC |