in reply to Re^3: Common sub as method or function
in thread Common sub as method or function
use Module::Base qw(timestamp);
is functionally equivalent to
BEGIN { require Module::Base; Module::Base->import('timestamp'); }
So it's at the very least wrapped in a BEGIN block (that is The Thing To Do when using your approach, anyway). It may actually do anything depending on how Module::Base::import was defined.
It does what you mean when it was created by Exporter and timestamp is in @EXPORT_OK.
|
---|