Importer::Zim
version 0.2.0
use Importer::Zim 'Scalar::Util' => 'blessed'; use Importer::Zim 'Scalar::Util' => 'blessed' => { -as => 'typeof' }; use Importer::Zim 'Mango::BSON' => ':bson'; use Importer::Zim 'Foo' => { -version => '3.0' } => 'foo';
This pragma imports subroutines from other modules in a clean way. "Clean imports" here mean that the import symbols are available only at some scope.
Importer::Zim relies on pluggable backends which give a precise meaning to "available at some scope". For example, Importer::Zim::Lexical creates lexical subs that go away as soon the lexical scope ends.
By default, Importer::Zim looks at package variables @EXPORT, @EXPORT_OK and %EXPORT_TAGS to decide what are exportable subroutines. It tries its best to implement a behavior akin to Exporter without the corresponding package polution.
@EXPORT
@EXPORT_OK
%EXPORT_TAGS
Importer::Zim - Import functions à la Invader Zim
Importer::Zim->import($class => @imports); Importer::Zim->import($class => \%opts => @imports);
zim
Importer and Lexical::Importer
lexically
Adriano Ferreira <ferreira@cpan.org>
Adriano Ferreira <a.r.ferreira@gmail.com>
This software is copyright (c) 2017 by Adriano Ferreira.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Importer::Zim, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Importer::Zim
CPAN shell
perl -MCPAN -e shell install Importer::Zim
For more information on module installation, please visit the detailed CPAN module installation guide.