# Just like Exporter.
@EXPORT = qw($This &That);
@EXPORT_OK = qw(@Left %Right);
# Meanwhile, in another piece of code!
use Foo; # exports $This and &That.
DESCRIPTIONThis is an alternative to Exporter intended to provide a universal, lightweight subset of its functionality. It uses Exporter::Lite, so look there for details.
Additionally, "exports()" is provided to find out what symbols a module exports.
UNIVERSAL::exports places its methods in the UNIVERSAL namespace, so there is no need to subclass from it.
MethodsUNIVERSAL::exports has two public methods, import() derived from Exporter::Lite, and exports().
This is Exporter::Lite's import() method. Look in Exporter::Lite for details.
@exported_symbols = Some::Module->exports; Some::Module->exports($symbol);
Reports what symbols are exported by Some::Module. With no arguments, it simply returns a list of all exportable symbols. Otherwise, it reports if it will export a given $symbol.
- '"%s" is not exported by the %s module'
- Attempted to import a symbol which is not in @EXPORT or @EXPORT_OK.
- 'Can\'t export symbol: %s'
- Attempted to import a symbol of an unknown type (ie. the leading [email protected]% salad wasn't recognized).
AUTHORSMichael G Schwern <[email protected]>
BUGS and ISSUESPlease report bugs and issues via <http://rt.cpan.org>
LICENSE and COPYRIGHTCopyright 2001, 2006 Michael G Schwern
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.