Exporter-Easy-0.18/000755 000765 000024 00000000000 12620731520 014403 5ustar00neilbstaff000000 000000 Exporter-Easy-0.18/bench000755 000765 000024 00000005524 12620731520 015416 0ustar00neilbstaff000000 000000 #! /usr/bin/perl use strict; use lib 'lib'; use Benchmark qw(cmpthese); require Exporter::Easy; use vars; my $file_bms = { new => '', old => '', }; my $simple_bms = { old_simple => <<'EOM', our(@EXPORT) = qw(getservbyname getservbyport getservent getserv); our @ISA = ('Exporter'); EOM new_simple => <<'EOM', use Exporter::Easy( EXPORT => [qw(getservbyname getservbyport getservent getserv)], ); EOM }; my $vars_bms = { old_our_vars => <<'EOM', our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS, @ISA); @ISA = ('Exporter'); @EXPORT = qw(getservbyname getservbyport getservent getserv); @EXPORT_OK = qw( $s_name @s_aliases $s_port $s_proto ); %EXPORT_TAGS = (FIELDS => [ @EXPORT_OK, @EXPORT ] ); our ($s_name, @s_aliases, $s_port, $sx_proto); EOM old_use_vars => <<'EOM', our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS, @ISA); @ISA = ('Exporter'); @EXPORT = qw(getservbyname getservbyport getservent getserv); @EXPORT_OK = qw( $s_name @s_aliases $s_port $s_proto ); %EXPORT_TAGS = (FIELDS => [ @EXPORT_OK, @EXPORT ] ); use vars @EXPORT_OK; EOM old_grep_vars => <<'EOM', our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS, @ISA); @ISA = ('Exporter'); @EXPORT = qw(getservbyname getservbyport getservent getserv); @EXPORT_OK = qw( $s_name @s_aliases $s_port $s_proto ); %EXPORT_TAGS = (FIELDS => [ @EXPORT_OK, @EXPORT ] ); use vars grep /^\$/, @EXPORT_OK; EOM new_vars => <<'EOM', use Exporter::Easy( EXPORT => [qw(getservbyname getservbyport getservent getserv)], OK => [qw( $s_name @s_aliases $s_port $s_proto )], ALL => 'FIELDS', ); EOM }; my $no_vars_bms = { old_no_vars => <<'EOM', our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS, @ISA); @ISA = ('Exporter'); @EXPORT = qw(getservbyname getservbyport getservent getserv); @EXPORT_OK = qw( $s_name @s_aliases $s_port $s_proto ); %EXPORT_TAGS = (FIELDS => [ @EXPORT_OK, @EXPORT ] ); EOM new_no_vars => <<'EOM', use Exporter::Easy( EXPORT => [qw(getservbyname getservbyport getservent getserv)], OK => [qw( $s_name @s_aliases $s_port $s_proto )], ALL => 'FIELDS', VARS => 0, ); EOM }; my @bms = ( $file_bms, $vars_bms, $no_vars_bms, $simple_bms, ); my @comps; foreach my $bm (@bms) { foreach my $want_files ( '', # '_file' ) { my %comp; while (my ($name, $code) = (each %$bm)) { $comp{"$name$want_files"} = make_bm("$name$want_files", $code, $want_files); } push(@comps, \%comp); } } my $time = -2; foreach my $bm (@comps) { cmpthese($time, $bm); } sub make_bm { my ($name, $code, $want_files) = @_; my @files; if ($want_files) { @files = ('lib/Exporter.pm'); if ($name =~ /^new/) { push(@files, 'lib/Exporter/Easy.pm'); } else { } } my @file_code = map { "do '$_';" } @files; my $all_code = join("\n", @file_code, $code); eval $all_code; die "$all_code\n$@" if $@; # print "------------------$name----------------\n$all_code\n\n"; return sub { eval $all_code }; } Exporter-Easy-0.18/Changes000644 000765 000024 00000003657 12620731520 015711 0ustar00neilbstaff000000 000000 Revision history for Perl module Exporter::Easy 0.18 2015-10-12 NEILB - Updated github repo URL after changing my github username - Added [MetaJSON] to dist.ini so META.json is included in releases 0.17 2014-07-03 NEILB - Switched to Dist::Zilla, in the process fixing RT#40987 - Added a load of alternative Exporter modules to SEE ALSO - Decided to do a developer release first, given there are 16 dists on CPAN that use this dist. - Added github repo to pods. - Renamed CHANGES to Changes and reformatted as per CPAN::Changes::Spec 0.16_01 2014-06-29 NEILB - All changed in 0.17 were first in this developer release 0.16 2004-08-03 FDALY - Fixed Exporter::Easiest so that it automatically does the use vars, the problem was that I was not using the magic goto so the vars were being used in the wrong package. - Factored out some code in the vars tests. 0.15 2003-02-25 FDALY - changed the processing order and documented it - FAIL symbols are now added to EXPORT_OK - Fixed bug, ":" now is anchored to start of string for tag detection is Easiest - Optimised expand_tags a little by specialising the add/delete code for the tag and non-tag cases. 0.14 2003-02-13 FDALY - some slight optimistaions - no longer subtracting the FAIL from OK - more helpful errors messages - added benchmark 0.13 2003-02-13 FDALY - I should have fixed Easiest to work with ALL as weel as VARS and ISA, done now - Doc fixes 0.12 2003-02-13 FDALY - Fixed Easiest to handle scalar values for VARS and ISA 0.11 2003-02-13 FDALY - No longer need to use TAGS in Easiest - Added ISA control - No longer including EXPORT in EXPORT_OK - Added OK_ONLY, which means only these symbols go in EXPORT_OK - Added VARS control. Now no longer need to explicitly use vars for exportable variables 0.1 2003-02-12 FDALY - initial release Exporter-Easy-0.18/dist.ini000644 000765 000024 00000000376 12620731520 016055 0ustar00neilbstaff000000 000000 name = Exporter-Easy author = Fergal Daly license = Perl_5 copyright_holder = Fergal Daly copyright_year = 2003 version = 0.18 [@Basic] [PkgVersion] [AutoPrereqs] [MetaJSON] [GithubMeta] [Git::Tag] tag_message= [Git::Push] Exporter-Easy-0.18/lib/000755 000765 000024 00000000000 12620731520 015151 5ustar00neilbstaff000000 000000 Exporter-Easy-0.18/LICENSE000644 000765 000024 00000043652 12620731520 015422 0ustar00neilbstaff000000 000000 This software is copyright (c) 2003 by Fergal Daly. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2003 by Fergal Daly. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. 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 PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2003 by Fergal Daly. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Exporter-Easy-0.18/Makefile.PL000644 000765 000024 00000002360 12620731520 016356 0ustar00neilbstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.037. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Takes the drudgery out of Exporting symbols", "AUTHOR" => "Fergal Daly ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Exporter-Easy", "EXE_FILES" => [], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "Exporter::Easy", "PREREQ_PM" => { "Exporter" => 0, "strict" => 0, "vars" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "Test::More" => 0, "base" => 0, "lib" => 0 }, "VERSION" => "0.18", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Exporter" => 0, "ExtUtils::MakeMaker" => 0, "Test::More" => 0, "base" => 0, "lib" => 0, "strict" => 0, "vars" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Exporter-Easy-0.18/MANIFEST000644 000765 000024 00000000357 12620731520 015541 0ustar00neilbstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.037. Changes LICENSE MANIFEST META.json META.yml Makefile.PL README TODO bench dist.ini lib/Exporter/Easiest.pm lib/Exporter/Easy.pm t/Easiest.t t/Easy.t t/Run.pm Exporter-Easy-0.18/META.json000644 000765 000024 00000002302 12620731520 016021 0ustar00neilbstaff000000 000000 { "abstract" : "Takes the drudgery out of Exporting symbols", "author" : [ "Fergal Daly " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.037, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Exporter-Easy", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Exporter" : "0", "perl" : "5.006", "strict" : "0", "vars" : "0", "warnings" : "0" } }, "test" : { "requires" : { "Test::More" : "0", "base" : "0", "lib" : "0" } } }, "release_status" : "stable", "resources" : { "homepage" : "https://github.com/neilb/Exporter-Easy", "repository" : { "type" : "git", "url" : "https://github.com/neilb/Exporter-Easy.git", "web" : "https://github.com/neilb/Exporter-Easy" } }, "version" : "0.18" } Exporter-Easy-0.18/META.yml000644 000765 000024 00000001220 12620731520 015647 0ustar00neilbstaff000000 000000 --- abstract: 'Takes the drudgery out of Exporting symbols' author: - 'Fergal Daly ' build_requires: Test::More: '0' base: '0' lib: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.037, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Exporter-Easy requires: Exporter: '0' perl: '5.006' strict: '0' vars: '0' warnings: '0' resources: homepage: https://github.com/neilb/Exporter-Easy repository: https://github.com/neilb/Exporter-Easy.git version: '0.18' Exporter-Easy-0.18/README000644 000765 000024 00000000573 12620731520 015270 0ustar00neilbstaff000000 000000 This archive contains the distribution Exporter-Easy, version 0.18: Takes the drudgery out of Exporting symbols This software is copyright (c) 2003 by Fergal Daly. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v5.037. Exporter-Easy-0.18/t/000755 000765 000024 00000000000 12620731520 014646 5ustar00neilbstaff000000 000000 Exporter-Easy-0.18/TODO000644 000765 000024 00000000156 12620731520 015075 0ustar00neilbstaff000000 000000 * add level ? * test all the dies * think some more about whether to delete FAIL * refine errors for lists Exporter-Easy-0.18/t/Easiest.t000644 000765 000024 00000004464 12620731520 016440 0ustar00neilbstaff000000 000000 use strict; use Test::More tests => 21; use lib 't'; use Run; require_ok('Exporter::Easiest'); { no strict 'refs'; *{suck_list} = \&Exporter::Easiest::suck_list; *{parse_spec} = \&Exporter::Easiest::parse_spec; } is_deeply(suck_list([qw(a b c d e)]), [qw( a b c d e )], "suck all"); is_deeply(suck_list([qw(a b c => e)]), [qw( a b )], "suck some"); is_deeply( { parse_spec(q( a => a b c )) }, { a => [qw( a b c )], }, "parse 1" ); is_deeply( { parse_spec(q( a => a b c b => g h i )) }, { a => [qw( a b c )], b => [qw( g h i )], }, "parse 2" ); is_deeply( { parse_spec(q( a => b => g h i )) }, { a => [], b => [qw( g h i )], }, "parse with empty" ); is_deeply( { parse_spec(q( a => :b => a b :c :e => e f g )) }, { a => [], TAGS => [ 'b', [qw( a b :c )], 'e', [qw( e f g )], ] }, "simple with :s" ); is_deeply( { parse_spec(q( b => a b a => :b => :e => e f :g :d => a c => a :c )) }, { a => [], TAGS => [ 'b', [], 'e', [qw( e f :g )], 'd' => ['a'], ], b => [qw( a b )], c => [qw( a :c)], }, "everything" ); is_deeply( { parse_spec(q(VARS => a b)) }, { VARS => [qw( a b )] }, "VARS list" ); is_deeply( { parse_spec(q(VARS => a)) }, { VARS => [qw( a )] }, "VARS list of 1" ); is_deeply( { parse_spec(q(VARS => 1)) }, { VARS => 1 }, "VARS 1" ); is_deeply( { parse_spec(q(VARS => 0)) }, { VARS => 0 }, "VARS 0" ); is_deeply( { parse_spec(q(ALL => all)) }, { ALL => 'all' }, "good ALL works" ); eval {parse_spec(q(ALL => all other))}; ok($@, "bad all dies"); package Test::The::Use; use Exporter::Easiest q( EXPORT => e_1 e_2 TAGS => :tag1 => a b c d e f :tag2 => b d f :tag3 => :tag1 !:tag2 OK => o_1 o_2 ); use vars qw( @EXPORT @EXPORT_OK %EXPORT_TAGS ); ::ok(::eq_set( \@EXPORT, [ qw( e_1 e_2)] ), "use EXPORT and TAGS"); ::ok(::eq_set( \@EXPORT_OK ,[qw( a b c d e f o_1 o_2 )] ), "use OK with EXPORT and TAGS" ); my %e = %EXPORT_TAGS; ::ok(::eq_set( $e{tag1}, [qw( a b c d e f )] ), "use TAGS tag1"); ::ok(::eq_set( $e{tag2}, [qw( b d f )] ), "use TAGS tag2"); ::ok(::eq_set( $e{tag3}, [qw( a c e )] ), "use TAGS tag3"); ::ok(keys(%e) == 3, "use TAGS count"); package Test::Vars; use Exporter::Easiest qw( OK => $Var ); ::runs_ok('$Var', 'tag vars can use var $Var'); Exporter-Easy-0.18/t/Easy.t000644 000765 000024 00000012612 12620731520 015736 0ustar00neilbstaff000000 000000 use strict; use Test::More tests => 51; use lib 't'; use Run; require_ok('Exporter::Easy'); package Start::Testing::Use::Functions; { no strict 'refs'; *{add_tags} = \&Exporter::Easy::add_tags; *{expand_tags} = \&Exporter::Easy::expand_tags; } ::ok( ::eq_set( [ expand_tags([qw( a b c)], {}) ], [ qw( a b c) ] ), "simple _expand_tags" ); ::ok( ::eq_set( [ expand_tags([qw( a b c !b)], {}) ], [ qw( a c ) ] ), "simple _expand_tags with remove" ); ::ok( ::eq_set( [ expand_tags([ qw( a b c :tag2 ) ], { tag2 => [ qw( d e ) ] }), ], [qw( a b c d e )], ), "_expand_tags with tag" ); ::ok( ::eq_set( [ expand_tags( [ qw( a b c d f !:tag2 ) ],{ tag2 => [ qw( d e ) ] }) ], [qw( a b c f )] ), "_expand_tags with remove tag" ); my $tags = add_tags( [ tag1 => [qw( a b c d )], tag2 => [qw( c d e )], tag3 => [qw( :tag1 !:tag2 d !a )], ] ); ::ok(::eq_set( $tags->{tag1}, [qw( a b c d )] ), "_build_all_tags tag1"); ::ok(::eq_set( $tags->{tag2}, [qw( c d e )] ), "_build_all_tags tag2"); ::ok(::eq_set( $tags->{tag3}, [qw( b d )] ), "_build_all_tags tag3"); ::ok(keys(%$tags) == 3, "use TAGS count"); package Use::OK; use Exporter::Easy ( OK => [qw( o_1 o_2) ], ); use vars qw( @EXPORT_OK ); ::ok(::eq_set(\@EXPORT_OK, [qw( o_1 o_2 )]), "simple use OK"); package Use::OK_ONLY; use Exporter::Easy ( OK_ONLY => [qw( o_1 o_2 ) ], ); use vars qw( @EXPORT_OK ); ::ok(::eq_set(\@EXPORT_OK, [qw( o_1 o_2 )]), "simple use OK_ONLY"); package Use::More; use Exporter::Easy ( EXPORT => [ qw( e_1 e_2 ) ], FAIL => [qw( f_1 f_2) ], OK_ONLY => [qw( o_1 o_2) ], ); use vars qw( @EXPORT @EXPORT_FAIL @EXPORT_OK %EXPORT_TAGS ); ::ok(::eq_set( \@EXPORT, [qw( e_1 e_2)] ), "use EXPORT"); ::ok(::eq_set( \@EXPORT_FAIL, [qw( f_1 f_2)] ), "use FAIL"); ::ok(::eq_set( \@EXPORT_OK, [qw( o_1 o_2 )] ), "use OK_ONLY with EXPORT"); ::is_deeply(\%EXPORT_TAGS, {}, "use without TAGS"); package Use::TAGS::And::OK_ONLY; use Exporter::Easy ( EXPORT => [ qw( e_1 e_2 ) ], TAGS => [ tag1 => [qw( a b c d e f )], tag2 => [qw( b d f )], tag3 => [qw( :tag1 !:tag2 )], ], OK_ONLY => [qw( o_1 o_2) ], ); use vars qw( @EXPORT @EXPORT_OK %EXPORT_TAGS ); ::ok(::eq_set( \@EXPORT, [ qw( e_1 e_2)] ), "use EXPORT and TAGS"); ::ok(::eq_set( \@EXPORT_OK ,[qw( o_1 o_2 )] ), "use OK_ONLY with EXPORT and TAGS" ); { my %e = %EXPORT_TAGS; ::ok(::eq_set( $e{tag1}, [qw( a b c d e f )] ), "use TAGS tag1"); ::ok(::eq_set( $e{tag2}, [qw( b d f )] ), "use TAGS tag2"); ::ok(::eq_set( $e{tag3}, [qw( a c e )] ), "use TAGS tag3"); ::ok(keys(%e) == 3, "use TAGS count"); } package Test::The::Use3; use Exporter::Easy ( EXPORT => [ qw( e_1 e_2 ) ], TAGS => [ tag1 => [qw( a b c d e f )], tag2 => [qw( b d f )], tag3 => [qw( :tag1 !:tag2 )], ], OK => [qw( o_1 o_2) ], ); use vars qw( @EXPORT @EXPORT_OK %EXPORT_TAGS ); ::ok(::eq_set( \@EXPORT, [ qw( e_1 e_2)] ), "use EXPORT and TAGS"); ::ok(::eq_set( \@EXPORT_OK ,[qw( a b c d e f o_1 o_2 )] ), "use OK with EXPORT and TAGS" ); { my %e = %EXPORT_TAGS; ::ok(::eq_set( $e{tag1}, [qw( a b c d e f )] ), "use TAGS tag1"); ::ok(::eq_set( $e{tag2}, [qw( b d f )] ), "use TAGS tag2"); ::ok(::eq_set( $e{tag3}, [qw( a c e )] ), "use TAGS tag3"); ::ok(keys(%e) == 3, "use TAGS count"); } package Test::The::Use4; use Exporter::Easy ( EXPORT => [qw( open close :rw )], FAIL => [qw( hello :fail )], TAGS => [ fail => [qw (f_1 f_2 )], rw => [qw( read write )], sys => [qw( sysopen sysclose )], ], ALL => 'all', ); use vars qw( @EXPORT @EXPORT_OK @EXPORT_FAIL %EXPORT_TAGS ); ::ok(::eq_set( \@EXPORT, [qw( open close read write)] ), "use tags in EXPORT"); ::ok(::eq_set( \@EXPORT_OK, [qw( hello f_1 f_2 sysopen sysclose read write )]) , "use FAIL in EXPORT_OK"); ::ok(::eq_set( \@EXPORT_FAIL, [qw( hello f_1 f_2 )] ), "use tags in EXPORT"); ::ok(::eq_set( $EXPORT_TAGS{all}, [qw( hello f_1 f_2 read write sysopen sysclose open close )] ), "use ALL with FAIL"); package Test::The::Use5; eval < [qw( :tag )], ); EOM ::ok($@, "die for unknown tag"); package Test::ISA::Default; use base 'base'; use vars '@ISA'; use Exporter::Easy(ALL => 'all'); ::is_deeply(\@ISA, ['base','Exporter'], '@ISA default'); package Test::ISA::Explicit; use base 'base'; use vars '@ISA'; use Exporter::Easy( ISA => 1, ); ::is_deeply(\@ISA, ['base','Exporter'], '@ISA explicit'); package Test::ISA::No; use base 'base'; use vars '@ISA'; use Exporter::Easy( ISA => 0, ); ::is_deeply(\@ISA, ['base'], 'no @ISA explicit'); package Test::Vars; use Exporter::Easy( TAGS => [ var => [qw( $hello @hello %hello a )], not => [qw( $goodbye @goodbye %goodbye b )], ], ); foreach my $type (qw( $ @ % )) { ::runs_ok("${type}\{hello}", "tag vars can use var ${type}hello"); ::runs_ok("${type}\{goodbye}", "tag vars can't use var ${type}goodbye"); } package Test::Vars::List; use Exporter::Easy( TAGS => [ var => [qw( $hello @hello %hello a )], not => [qw( $goodbye @goodbye %goodbye a )], ], VARS => [':var', '$cat'], ); foreach my $type (qw( $ @ % )) { ::runs_ok("${type}\{hello}", "list vars can use var ${type}hello"); ::dies_ok("${type}\{goodbye}", "list vars can't use var ${type}goodbye"); } ::runs_ok('$cat', 'list vars can use var $cat'); package Test::Vars::Fail; use Exporter::Easy( TAGS => [ not => [qw( $goodbye @goodbye %goodbye )], ], VARS => 0, ); foreach my $type (qw( $ @ % )) { ::dies_ok("${type}\{goodbye}", "no vars can't use var ${type}goodbye"); } Exporter-Easy-0.18/t/Run.pm000644 000765 000024 00000001060 12620731520 015745 0ustar00neilbstaff000000 000000 use strict; use warnings; sub run_it { my ($code) = @_; my $pkg = caller(1); eval "package $pkg;$code"; my $ok = $@ ? 0 : 1; return ($ok, $@); } sub runs_ok { local($Test::Builder::Level) = $Test::Builder::Level + 1; my ($code, $name) = @_; my ($ok, $err) = run_it($code); ok($ok, $name) || diag("eval died with $err"); return $ok; } sub dies_ok { local($Test::Builder::Level) = $Test::Builder::Level + 1; my ($code, $name) = @_; my ($ok, $err) = run_it($code); ok(!$ok, $name) || diag("$code executed successfully"); return !$ok; } 1; Exporter-Easy-0.18/lib/Exporter/000755 000765 000024 00000000000 12620731520 016761 5ustar00neilbstaff000000 000000 Exporter-Easy-0.18/lib/Exporter/Easiest.pm000644 000765 000024 00000005643 12620731520 020724 0ustar00neilbstaff000000 000000 package Exporter::Easiest; $Exporter::Easiest::VERSION = '0.18'; use 5.006; use strict; use warnings; no strict 'refs'; require Exporter::Easy; sub import { my $pkg = shift; my $callpkg = caller(0); @_ = ($callpkg, parse_spec(@_)); goto &Exporter::Easy::set_export_vars; } sub parse_spec { # maybe we were passed a string or an array of strings, allow both my @spec = grep { /\S/ } map { split(/\s+/) } @_; my %spec; my $key = ""; while (@spec) { my $new_key = shift @spec; my $arrow = shift @spec; $arrow = "" unless defined($arrow); die "Expected '=>' not '$arrow' after $new_key" unless ($arrow eq '=>'); if ($new_key =~ s/^://) { # if the new key starts with a : then it and the following list are # pushed onto the TAGS entry push(@{$spec{TAGS}}, $new_key, suck_list(\@spec)); } else { $key = $new_key; # VARS and ISA should aren't necessarily a list if( ($key =~ /^(VARS|ISA)$/ and $spec[0] =~ /^\d+$/) or ($key eq 'ALL') ) { $spec{$key} = shift @spec; } else { $spec{$key} = suck_list(\@spec); } } } return %spec; } sub suck_list { # takes a ref to a list and removes elements from the front of the list # until the list is empty or it's 2 shift away from removing a => # returns a ref to a list of the removed list elements my $list = shift; my @sucked; while (@$list) { if ($#$list and ($list->[1] eq '=>')) { last; } else { push(@sucked, shift(@$list)); } } return \@sucked; } =head1 NAME Exporter::Easiest - Takes even more drudgery out of Exporting symbols =head1 SYNOPSIS In module YourModule.pm: package YourModule; use Exporter::Easiest q( EXPORT => :tag1 OK => munge frobnicate :tag1 => a b c :tag2 => :tag1 d e f FAIL => f g h ); In other files which wish to use YourModule: use ModuleName qw(frobnicate); # import listed symbols frobnicate ($left, $right) # calls YourModule::frobnicate =head1 DESCRIPTION The Exporter::Easiest module is a wrapper around Exporter::Easy. It allows you to pass the arguments into Exporter::Easy without all those tiresome []s and qw()s. You pass arguments in as a string or an array of strings. You no longer need to bracket lists or take references. If want, you can also leave out the TAGS key and just put tag definitions along with the other keys. The important thing to remember is that tags should be preceded by ':' everywhere, including to the left of the '=>', otherwise it'll get confused. And don't worry I haven't done something horribly pythonesque, whitespace is not significant, all the parsing logic revolves around the use of ':'s and '=>'s =head1 SEE ALSO For the real details on exporting symbols see L and L. =head1 REPOSITORY L =head1 AUTHOR Written by Fergal Daly . =head1 LICENSE Under the same license as Perl itself =cut Exporter-Easy-0.18/lib/Exporter/Easy.pm000644 000765 000024 00000030235 12620731520 020223 0ustar00neilbstaff000000 000000 package Exporter::Easy; $Exporter::Easy::VERSION = '0.18'; use 5.006; use strict; use warnings; require Exporter; use vars; sub import { my $pkg = shift; unshift(@_, scalar caller); # must goto or we lose the use vars functionality goto &set_export_vars; } sub set_export_vars { # this handles setting up all of the EXPORT variables in the callers # package. It gives a nice way of creating tags, allows you to use tags # when defining @EXPORT, @EXPORT_FAIL and other in tags. It also takes # care of @EXPORT_OK. my ($callpkg, %args) = @_; my %could_export; # symbols that could be exported my @will_export; # symbols that will be exported by default my @fail; # symbols that should be tested before export my @ok_only; # the symbols that are ok to export my %tags; # will contain a ref hash of all tags @_ = (); # we'll be using this for vars to be use vars'd if ($args{OK_ONLY} and $args{OK}) { nice_die("Can't use OK_ONLY and OK together"); } my $isa = exists $args{ISA} ? delete $args{ISA} : 1; my $vars = exists $args{VARS} ? delete $args{VARS} : 1; if (my $tag_data = delete $args{'TAGS'}) { nice_die("TAGS must be a reference to an array") unless ref($tag_data) eq 'ARRAY'; add_tags($tag_data, \%tags); @could_export{map {@$_} values %tags} = (); } if (my $export = delete $args{'EXPORT'}) { nice_die("EXPORT must be a reference to an array") unless ref($export) eq 'ARRAY'; @will_export = eval { expand_tags($export, \%tags) }; nice_die("$@while building the EXPORT list in $callpkg") if $@; } if (my $ok = delete $args{'OK'}) { nice_die("OK must be a reference to a array") unless ref($ok) eq 'ARRAY'; my @ok = eval { expand_tags($ok, \%tags) }; nice_die("$@while building the \@EXPORT_OK") if $@; @could_export{@ok} = (); } my $ok_only = delete $args{'OK_ONLY'}; if ($ok_only) { die("OK_ONLY must be a reference to a array") unless ref($ok_only) eq 'ARRAY'; @ok_only = eval { expand_tags($ok_only, \%tags) }; nice_die("$@while building the OK_ONLY list") if $@; @could_export{@ok_only} = (); } if (my $fail = delete $args{'FAIL'}) { die "FAIL must be a reference to an array" unless ref($fail) eq 'ARRAY'; @fail = eval { expand_tags($fail, \%tags) }; nice_die("$@while building \@EXPORT_FAIL") if $@; @could_export{@fail} = (); } my @could_export = keys %could_export; if (defined(my $all = delete $args{'ALL'})) { nice_die("No name supplied for ALL") unless length($all); nice_die("Cannot use '$all' for ALL, already exists") if exists $tags{$all}; my %all; @all{@could_export, @will_export} = (); $tags{$all} = [keys %all]; } if ($vars) { if (my $ref = ref($vars)) { nice_die("VARS was a reference to a ".$ref." instead of an array") unless $ref eq 'ARRAY'; @_ = ('vars', grep /^(?:\$|\@|\%)/, eval { expand_tags($vars, \%tags) }); nice_die("$@while building the \@EXPORT") if $@; } else { @_ = ('vars', grep /^(?:\$|\@|\%)/, @will_export, @could_export); } } if (%args) { nice_die("Attempt to use unknown keys: ", join(", ", keys %args)); } no strict 'refs'; if ($isa) { push(@{"$callpkg\::ISA"}, "Exporter"); } @{"$callpkg\::EXPORT"} = @will_export if @will_export; %{"$callpkg\::EXPORT_TAGS"} = %tags if %tags; @{"$callpkg\::EXPORT_OK"} = $ok_only ? @ok_only : @could_export; @{"$callpkg\::EXPORT_FAIL"} = @fail if @fail; if (@_ > 1) { goto &vars::import; } } sub nice_die { my $msg = shift; my $level = shift || 1; my ($pkg, $file, $line) = caller(1); die "$msg at $file line $line\n"; } sub add_tags($;$) { # this takes a reference to tag data and an optional reference to a hash # of already exiting tags. If no hash ref is supplied then it creates an # empty one # It adds the tags from the tag data to the hash ref. my $tag_data = shift; my $tags = shift || {}; my @tag_data = @$tag_data; while (@tag_data) { my $tag_name = shift @tag_data || die "No name for tag"; die "Tag name cannot be a reference, maybe you left out a comma" if (ref $tag_name); die "Tried to redefine tag '$tag_name'" if (exists $tags->{$tag_name}); my $tag_list = shift @tag_data || die "No values for tag '$tag_name'"; die "Tag values for '$tag_name' is not a reference to an array" unless ref($tag_list) eq 'ARRAY'; my @symbols = eval { expand_tags($tag_list, $tags) }; die "$@while building tag '$tag_name'" if $@; $tags->{$tag_name} = \@symbols; } return $tags; } sub expand_tags($$) { # this takes a list of strings. Each string can be a symbol, or a tag and # each may start with a ! to signify deletion. # We return a list of symbols where all the tag have been expanded and # some symbols may have been deleted # we die if we hit an unknown tag my ($string_list, $so_far) = @_; my %this_tag; foreach my $sym (@$string_list) { my @symbols; # list of symbols to add or delete my $remove = 0; if ($sym =~ s/^!//) { $remove = 1; } if ($sym =~ s/^://) { my $sub_tag = $so_far->{$sym}; die "Tried to use an unknown tag '$sym'" unless defined($sub_tag); if ($remove) { delete @this_tag{@$sub_tag} } else { @this_tag{@$sub_tag} = (); } } else { if ($remove) { delete $this_tag{$sym}; } else { $this_tag{$sym} = undef; } } } return keys %this_tag; } 1; __END__ =head1 NAME Exporter::Easy - Takes the drudgery out of Exporting symbols =head1 SYNOPSIS In module YourModule.pm: package YourModule; use Exporter::Easy ( OK => [ '$munge', 'frobnicate' ] # symbols to export on request ); In other files which wish to use YourModule: use ModuleName qw(frobnicate); # import listed symbols frobnicate ($left, $right) # calls YourModule::frobnicate =head1 DESCRIPTION Exporter::Easy makes using Exporter easy. In its simplest case, it allows you to drop the boilerplate code that comes with using Exporter, so require Exporter; use base qw( Exporter ); use vars qw( @EXPORT ); @EXPORT = ( 'init' ); becomes use Exporter::Easy ( EXPORT => [ 'init' ] ); and more complicated situations where you use tags to build lists and more tags become easy, like this use Exporter::Easy ( EXPORT => [qw( init :base )], TAGS => [ base => [qw( open close )], read => [qw( read sysread readline )], write => [qw( print write writeline )], misc => [qw( select flush )], all => [qw( :base :read :write :misc)], no_misc => [qw( :all !:misc )], ], OK => [qw( some other stuff )], ); This will set C<@EXPORT>, C<@EXPORT_OK>, C<@EXPORT_FAIL> and C<%EXPORT_TAGS> in the current package, add Exporter to that package's C<@ISA> and do a C on all the variables mentioned. The rest is handled as normal by Exporter. =head1 HOW TO USE IT Put use Exporter::Easy ( KEY => value, ...); in your package. Arguments are passes as key-value pairs, the following keys are available =over 4 =item TAGS The value should be a reference to a list that goes like (TAG_NAME, TAG_VALUE, TAG_NAME, TAG_VALUE, ...), where TAG_NAME is a string and TAG_VALUE is a reference to an array of symbols and tags. For example TAGS => [ file => [ 'open', 'close', 'read', 'write'], string => [ 'length', 'substr', 'chomp' ], hash => [ 'keys', 'values', 'each' ], all => [ ':file', ':string', ':hash' ], some => [':all', '!open', ':hash'], ] This is used to fill the C<%EXPORT_TAGS> in your package. You can build tags from other tags - in the example above the tag C will contain all the symbols from C, C and C. You can also subtract symbols and tags - in the example above, C contains the symbols from all but with C removed and all the symbols from C removed. The rule is that any symbol starting with a ':' is taken to be a tag which has been defined previously (if it's not defined you'll get an error). If a symbol is preceded by a '!' it will be subtracted from the list, otherwise it is added. If you try to redefine a tag you will also get an error. All the symbols which occur while building the tags are automatically added your package's C<@EXPORT_OK> array. =item OK The value should be a reference to a list of symbols and tags (which will be exapanded). These symbols will be added to the C<@EXPORT_OK> array in your package. Using OK and and OK_ONLY together will give an error. =item OK_ONLY The value should be a reference to a list of symbols and tags (which will be exapanded). The C<@EXPORT_OK> array in your package will contains only these symbols.. This totally overrides the automatic population of this array. If you just want to add some symbols to the list that Exporter::Easy has automatically built then you should use OK instead. Using OK_ONLY and OK together will give an error. =item EXPORT The value should be a reference to a list of symbol names and tags. Any tags will be expanded and the resulting list of symbol names will be placed in the C<@EXPORT> array in your package. The tag created by the ALL key is not available at this stage. =item FAIL The value should be a reference to a list of symbol names and tags. The tags will be expanded and the resulting list of symbol names will be placed in the C<@EXPORT_FAIL> array in your package. They will also be added to the C<@EXPORT_OK> list. =item ALL The value should be the name of tag that doesn't yet exist. This tag will contain a list of all symbols which can be exported. =item ISA If you set this to 0 then Exporter will not be added to your C<@ISA> list. =item VARS If this is set to 1 or not provided then all $, @ and % variables mentioned previously will be available to use in your package as if you had done a C on them. If it's set to a reference to a list of symbols and tags then only those symbols will be available. If it's set to 0 then you'll have to do your own C in your package. =back =head1 PROCESSING ORDER We need take the information provided and build @EXPORT, @EXPORT_OK, @EXPORT_FAIL and %EXPORT_TAGS in the calling package. We may also need to build a tag with all of the symbols and to make all the variables useable under strict. The arguments are processed in the following order: TAGS, EXPORT, OK, OK_ONLY and FAIL, ALL, VARS and finally ISA. This means you cannot use the tag created by ALL anywhere except in VARS (although vars defaults to using all symbols anyway). =head1 SEE ALSO L is the grandaddy of all Exporter modules, and bundled with Perl itself, unlike the rest of the modules listed here. Look at the documentation for this module to see more explanation of the OK, EXPORT and other variables. L defines attributes which you use to mark which subs and variables you want to export, and how. L also uses attributes to control the export of functions and variables from your module. L makes it easy to create a module that exports constants. L is another module that makes it easy to create modules that define and export constants. L is a "sophisticated exporter for custom-built routines"; it lets you provide generators that can be used to customise what gets imported when someone uses your module. L provides the same features as L, but relying only on core dependencies. L is a shortcut for L that provides a more concise notation for providing optional exports. L provides syntactic sugar to make the export status of your functions part of their declaration. Kind of. L lets you export part of an L-based configuration. L lets you export lexical subs from your module. L lets you write a module that exports function-style constants, which are instantiated lazily. L will export everything from your module that it thinks is a public function (name doesn't start with an underscore). L lets you export class methods as regular subroutines. L is like Exporter, but with persistent defaults and auto-ISA. =head1 REPOSITORY L =head1 AUTHOR Written by Fergal Daly . =head1 LICENSE Under the same license as Perl itself =cut