This imports all the symbols from YourModule's @EXPORT into the namespace of the use statement.
This causes perl to load your module but does not import any symbols.
This imports only the symbols listed by the caller into their namespace. All listed symbols must be in your @EXPORT or @EXPORT_OK, else an error occurs.
it would be inconsistent with case two with an empty list, if auto-imports were allowed in the third case.
but I agree with the ibm1620 that always_imported is misleading. something like default_imported would be better.
Probably worth a doc patch.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^2: Perl modules, Exporter, and @EXPORT vs. @EXPORT_OK
by LanX
in thread Perl modules, Exporter, and @EXPORT vs. @EXPORT_OK
by ibm1620
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |