in reply to Re^3: Library file or module for sharing code? (import)
in thread Library file or module for sharing code?

Thanks tye, went with:

*import= \&Exporter::import;

which worked fine (though I have no idea what is going on there--nothing in the docs I could find :)


—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Replies are listed 'Best First'.
Re^5: Library file or module for sharing code? (import)
by tye (Sage) on Dec 28, 2005 at 17:40 UTC

    It just imports the import() sub "by hand" from Exporter.pm.

    use Common qw(Foo); becomes BEGIN { require "Common.pm"; Common->import("Foo") } and Common->import(...) can find the import() by inheritance (@ISA) or because Common::import itself has been defined. "Importing" just makes Common::import() another name for Exporter::import().

    - tye