|o||If you want a subroutine or package variable to be capable of being exported (when explicitly requested in the use arguments), you mark it with the :Export attribute.|
|o||If you want a subroutine or package variable to be automatically exported when the module is used (without specific overriding arguments), you mark it with the :Export(:DEFAULT) attribute.|
|o||If you want a subroutine or package variable to be automatically exported when the module is used (even if the user specifies overriding arguments), you mark it with the :Export(:MANDATORY) attribute.|
|o||If the subroutine or package variable should also be exported when particular export groups are requested, you add the names of those export groups to the attributes argument list.|
The IMPORT block is passed the argument list that was specified on the use line that loaded the corresponding module, minus the arguments that were used to specify exports.
Note that, due to limitations in Perl 5, the IMPORT block provided by this module must be terminated by a semi-colon, unless it is the last statement in the file.
%s does not export: %s\nuse %s failed You tried to import the specified subroutine or package variable, but the module didnt export it. Often caused by a misspelling, or forgetting to add an :Export attribute to the definition of the subroutine or variable in question. Bad tagset in :Export attribute at %s line %s: [%s] You tried to import a collection of items via a tagset, but the module didnt export any subroutines under that tagset. Is the tagset name misspelled (maybe you forgot the colon?). Cant export lexical %s variable at %s The module can only export package variables. You applied the :Export marker to a non-package variable (almost certainly to a lexical). Change the variables my declarator to an our. Cant export anonymous subroutine at %s Although you can apply the :Export marker to an anonymous subroutine, it rarely makes any sense to do so, since that subroutine cant be exported without a name to export it as. Either give the subroutine a name, or make sure its aliased to a named typeglob at compile-time (or, at least, before its exported).
Perl6::Export::Attrs requires no configuration files or environment variables.
This module requires the Attribute::Handlers module to handle the attributes.
This module cannot be used with the Memoize CPAN module, because memoization replaces the original subroutine with a wrapper. Because the :Export attribute is applied to the original (not the wrapper), the memoized wrapper is not found by the exporter mechanism.
No bugs have been reported.
Note that the module does not support exporting lexical variables, since there is no way for the exporter mechanism to determine the name of a lexical and hence to export it.
Nor does this module support the numerous addition export modes that Perl 6 offers, such as export-as-lexical or export-as-state.
Damian Conway <DCONWAY@cpan.org>
Copyright (c) 2005, Damian Conway <DCONWAY@cpan.org>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|perl v5.20.3||PERL6::EXPORT::ATTRS (3)||2015-11-23|