Export-Lexical

 view release on metacpan or  search on metacpan

lib/Export/Lexical.pm  view on Meta::CPAN

exceptions when called. This behavior can be modified in two ways.

=over

=item C<< :silent >>

    use Export::Lexical ':silent';

Causes subroutines not imported into the current lexical scope to be no-ops.

=item C<< :warn >>

    use Export::Lexical ':warn';

Causes subroutines not imported into the current lexical scope to warn with
carp() instead of dying with croak().

=back

=head2 Subroutine Attributes

=over

=item C<< :ExportLexical >>

    package Foo;

    sub foo :ExportLexical {
        # do something
    }

This marks the foo() subroutine for lexically scoped import. When the Foo
module in this example is used, the foo() subroutine is available only in the
scope of the C<use> statement. The foo() subroutine can be made into a no-op
with the C<no> statement.

=back

=head1 DIAGNOSTICS

No diagnostics exist in this version of Export::Lexical.

=head1 CONFIGURATION AND ENVIRONMENT

Export::Lexical requires no configuration files or environment variables.

=head1 DEPENDENCIES

=over

=item *

Perl 5.10.0+

=back

=head1 INCOMPATIBILITIES

None reported.

=head1 BUGS AND LIMITATIONS

Do not define C<import()> or C<unimport()> subroutines when using
Export::Lexical. These will redefine the subroutines created by the
Export::Lexical module, disabling the special properties of the attributes. In
practice, this probably isn't a big deal.

Please report any bugs or feature requests to
L<https://github.com/sirhc/perl-Export-Lexical/issues/>.

=head1 AUTHOR

L<Christopher D. Grau|mailto:cgrau@cpan.org>

This module is an expansion of an idea presented by Damian Conway.

=head1 COPYRIGHT AND LICENSE

Copyright 2008-2015, Christopher D. Grau.

This is free software, licensed under the MIT (X11) License.

=head1 SEE ALSO

L<Exporter::Lexical> is another exporter module which provides for lexically
scoped imports.

L<Lexical::Import> lets you import functions and variables from another
package into the importing lexical namespace.

L<Exporter::LexicalVars> has a similar name, but it lets you export lexical (my)
variables from your module.

L<perlpragma>

=cut



( run in 2.443 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )