Sub-Exporter-0.992 000755 000765 000024 0 15246740770 13334 5 ustar 00rjbs staff 000000 000000 README 100644 000765 000024 602 15246740770 14253 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992 This archive contains the distribution Sub-Exporter,
version 0.992:
a sophisticated exporter for custom-built routines
This software is copyright (c) 2007 by Ricardo Signes.
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 v6.037.
Changes 100644 000765 000024 13227 15246740770 14735 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992 Revision history for Sub-Exporter
0.992 2026-09-05 16:47:10+09:30 Australia/Adelaide
- replace Params::Util with Params::SomeUtil
- docs: fix typo in tutorial (thanks, Kıvanç Yazan!)
0.991 2023-11-23 20:32:17-05:00 America/New_York
- make the requirement for perl v5.12.0 explicit; previously, it was
only implicit because of prerequisites
0.990 2023-07-22 14:09:26+10:00 Australia/Melbourne
- fixes to keep working in v5.39 (thanks, Yves Orton!)
0.989 2022-12-31 19:34:54-05:00 America/New_York
- update author contact info
0.988 2021-06-18 23:37:47-04:00 America/New_York
- update author contact info
- add perl support section to docs
0.987 2013-10-18 11:10:03 America/New_York
- update bugtracker metadata
0.986 2013-06-14 18:45:45 America/New_York
- typo fixes in docs (thanks, David Steinbrunner!)
0.985 2013-02-20 19:02:30 America/New_York
- documentation fixes (thanks, George Hartzell)
0.984 2012-06-05 07:59:40 America/New_York
- documentation fixes (thanks, GitHub user "everybody")
0.983 2011-01-24
- documentation fixes (thanks, Karen Etheridge and Luc St-Louis!)
0.982 2009-01-16
- add metadata for repo
0.981 2008-10-24
- finally fix very occasional hash ordering issue in tests
- fix typo in SYNOPSIS (thanks, Florian!)
0.980 2008-09-14
- fix inadvertant futzing with group generator args
https://rt.cpan.org/Ticket/Display.html?id=38885
thanks, trendele!
0.979 2008-04-29
- add INIT collector
- declare reservation of all CAPS collectors
- clarify documentation of -setup after report by GAISSMAI
0.978 2007-11-19
- improve documentation of new installer/generator options
- deprecate calling "installer" the "exporter"
- WARNING: "exporter" OPTION WILL BE REMOVED AFTER 2008-06-01
- major refactoring of the core generation/installation code
- tentative interface documentation for replacing it!
0.976 2007-08-30
- fixed merge_col, which was not updated to work with \name generators
- collector hooks can now alter @_ to replace the value to be collected
- clarify args passed to generator in Tutorial; thanks MARKSTOS
- added commented-out name_map to Sub::Exporter::Util; future feature?
0.975 2007-07-04
- update Tutorial to show (preferred) \'name' style for generators
- changed "standard" name of curry_class to curry_method
- added curry_chain
- added Sub::Exporter::Cookbook
0.974 2007-04-22
- fix a bug: would try to export routines that didn't exist
- in the exporting package; this caused Sub::Install to give the
- unhelpful message "argument 'code' is not optional"
0.973 2007-02-02
- document changes made in 0.972
- minor code changes for readability
0.972 2006-12-05
- allow exporter config to provide name (via string ref) of generator
for groups and exports
- similarly allow a string ref for a method name for a collector hook
- remove some pointless conditions
0.971 2006-11-06
- minor documentation clarification
- add Perl::Critic tests (disabled by default)
0.970 2006-06-27
- defaults populate before collectors collect, now
- default group's value is undef by default, not 1
- mixin_exporter can now export into objects, creating virtual classes
0.966 2006-06-17
- correct documentation of collector hook args
- simplify internal use of setup_exporter
- clean up documentation in ::Util
0.965 2006-06-05
- curry_class now allows the export to curry a differently-named method
0.961 2006-06-05
- Data::OptList is now in its own dist; updated to use it
0.960 2006-05-31
- added into and into_config to config
- 100% test coverage... almost!
- fix bug that prevented validation of opt lists with must_be=class
0.954 2006-05-11
- tweaks to Data::OptList, moving toward its own dist: now it exports
- expand_opt_list is now opt_list_as_hash
0.953 2006-05-10
- require Params::Util for craftier opt list validation
- use reinstall, rather than install, to avoid warnings on redef
0.952 2006-04-30
- add missing file to manifest
0.951 2006-04-30
- fix util-mixin.t to skip if prereqs are missing
- various changes to improve blessed/weird generators
- (thanks to Yuval Kogman for pointing problems out)
0.95 2006-04-26
- break out Data::OptList for future disting
- remove an "optimization" that broke expand_opt_list
- improve detection of group generators
- improve data passed to hooks (if you relied on the guts, you'll
break) the ::Util module
0.93 2006-03-26
- internal refactoring
- add more arguments to collector hook calls
0.92 2006-03-16
- FIX BUG in nested imports: when importing groups A and B, and group B
includes group A, the nested group would be ignored, even though it
was not recursing
- allow 'into_level' parameter to setup_exporter
- rewrite collection collector to be more efficient
- rewrite opt list handlers to be more efficient
- restate some code to improve clarity and coverage (now 100%)
- better diagnostic messages
0.91 2006-03-16
- added "import elsewhere" option to generated exporter (thanks
chansen!)
0.90 2006-03-11
- first public release
LICENSE 100644 000765 000024 46307 15246740770 14454 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992 This software is copyright (c) 2007 by Ricardo Signes.
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) 2007 by Ricardo Signes.
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.
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, see .
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
Moe Ghoul, President of Vice
That's all there is to it!
--- The Perl Artistic License 1.0 ---
This software is Copyright (c) 2007 by Ricardo Signes.
This is free software, licensed under:
The Perl 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 as specified below.
"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 uunet.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) give non-standard executables non-standard names, and clearly
document 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. You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded.
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 whoever generated
them, and may be sold commercially, and may be aggregated with this
Package. If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.
7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.
8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution. Such use shall not be
construed as a distribution of this Package.
9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
dist.ini 100644 000765 000024 364 15246740770 15044 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992 name = Sub-Exporter
author = Ricardo Signes
license = Perl_5
copyright_holder = Ricardo Signes
copyright_year = 2007
[@RJBS]
perl-window = long-term
[RemovePrereqs]
remove = E::Parent
remove = Package::Generator
META.yml 100644 000765 000024 31470 15246740770 14713 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992 ---
abstract: 'a sophisticated exporter for custom-built routines'
author:
- 'Ricardo Signes '
build_requires:
Exporter: '0'
ExtUtils::MakeMaker: '0'
File::Spec: '0'
Test::More: '0.96'
base: '0'
lib: '0'
overload: '0'
subs: '0'
configure_requires:
ExtUtils::MakeMaker: '6.78'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.037, CPAN::Meta::Converter version 2.150013'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Sub-Exporter
requires:
Carp: '0'
Data::OptList: '0.100'
Params::SomeUtil: '0.14'
Sub::Install: '0.92'
perl: '5.012'
strict: '0'
warnings: '0'
resources:
bugtracker: https://github.com/rjbs/Sub-Exporter/issues
homepage: https://github.com/rjbs/Sub-Exporter
repository: https://github.com/rjbs/Sub-Exporter.git
version: '0.992'
x_Dist_Zilla:
perl:
version: '5.040001'
plugins:
-
class: Dist::Zilla::Plugin::Git::GatherDir
config:
Dist::Zilla::Plugin::GatherDir:
exclude_filename: []
exclude_match: []
include_dotfiles: 0
prefix: ''
prune_directory: []
root: .
Dist::Zilla::Plugin::Git::GatherDir:
include_untracked: 0
name: '@RJBS/Git::GatherDir'
version: '2.052'
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@RJBS/CheckPrereqsIndexed'
version: '0.022'
-
class: Dist::Zilla::Plugin::CheckExtraTests
name: '@RJBS/CheckExtraTests'
version: '0.029'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
Dist::Zilla::Plugin::PromptIfStale:
check_all_plugins: 0
check_all_prereqs: 0
modules:
- Dist::Zilla::PluginBundle::RJBS
phase: build
run_under_travis: 0
skip: []
name: '@RJBS/RJBS-Outdated'
version: '0.060'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
Dist::Zilla::Plugin::PromptIfStale:
check_all_plugins: 1
check_all_prereqs: 0
modules: []
phase: release
run_under_travis: 0
skip:
- Dist::Zilla::Plugin::RJBSMisc
name: '@RJBS/CPAN-Outdated'
version: '0.060'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Filter/PruneCruft'
version: '6.037'
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Filter/ManifestSkip'
version: '6.037'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Filter/MetaYAML'
version: '6.037'
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Filter/License'
version: '6.037'
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Filter/Readme'
version: '6.037'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Filter/ExecDir'
version: '6.037'
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Filter/ShareDir'
version: '6.037'
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Filter/Manifest'
version: '6.037'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Filter/TestRelease'
version: '6.037'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Filter/ConfirmRelease'
version: '6.037'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Filter/UploadToCPAN'
version: '6.037'
-
class: Dist::Zilla::Plugin::MakeMaker
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 9
name: '@RJBS/MakeMaker'
version: '6.037'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
version: '6.037'
-
class: Dist::Zilla::Plugin::Git::NextVersion
config:
Dist::Zilla::Plugin::Git::NextVersion:
first_version: '0.001'
version_by_branch: 1
version_regexp: (?^:^([0-9]+\.[0-9]+)$)
Dist::Zilla::Role::Git::Repo:
git_version: '2.50.1 (Apple Git-155)'
repo_root: .
name: '@RJBS/Git::NextVersion'
version: '2.052'
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
version: '6.037'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
version: '6.037'
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
version: '6.037'
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
version: '6.037'
-
class: Dist::Zilla::Plugin::Test::ChangesHasContent
name: '@RJBS/Test::ChangesHasContent'
version: '0.011'
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
version: '6.037'
-
class: Dist::Zilla::Plugin::Test::ReportPrereqs
name: '@RJBS/Test::ReportPrereqs'
version: '0.029'
-
class: Dist::Zilla::Plugin::Git::Remote::Check
name: '@RJBS/Git::Remote::Check'
version: 0.1.2
-
class: Dist::Zilla::Plugin::Test::Compile
config:
Dist::Zilla::Plugin::Test::Compile:
bail_out_on_fail: 1
fail_on_warning: author
fake_home: 0
filename: xt/author/00-compile.t
module_finder:
- ':InstallModules'
needs_display: 0
phase: develop
script_finder:
- ':PerlExecFiles'
skips: []
switch: []
name: '@RJBS/Test::Compile'
version: '2.059'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: test
type: requires
name: '@RJBS/TestMoreWithSubtests'
version: '6.037'
-
class: Dist::Zilla::Plugin::PodWeaver
config:
Dist::Zilla::Plugin::PodWeaver:
config_plugins:
- '@RJBS'
finder:
- ':InstallModules'
- ':PerlExecFiles'
plugins:
-
class: Pod::Weaver::Plugin::EnsurePod5
name: '@CorePrep/EnsurePod5'
version: '4.020'
-
class: Pod::Weaver::Plugin::H1Nester
name: '@CorePrep/H1Nester'
version: '4.020'
-
class: Pod::Weaver::Plugin::SingleEncoding
name: '@RJBS/SingleEncoding'
version: '4.020'
-
class: Pod::Weaver::Section::Name
name: '@RJBS/Name'
version: '4.020'
-
class: Pod::Weaver::Section::Version
name: '@RJBS/Version'
version: '4.020'
-
class: Pod::Weaver::Section::Region
name: '@RJBS/Prelude'
version: '4.020'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Synopsis'
version: '4.020'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Description'
version: '4.020'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Overview'
version: '4.020'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Stability'
version: '4.020'
-
class: Pod::Weaver::Section::GenerateSection
name: '@RJBS/PerlSupport'
version: '4.020'
-
class: Pod::Weaver::Section::Collect
name: Attributes
version: '4.020'
-
class: Pod::Weaver::Section::Collect
name: Methods
version: '4.020'
-
class: Pod::Weaver::Section::Collect
name: Functions
version: '4.020'
-
class: Pod::Weaver::Section::Leftovers
name: '@RJBS/Leftovers'
version: '4.020'
-
class: Pod::Weaver::Section::Region
name: '@RJBS/postlude'
version: '4.020'
-
class: Pod::Weaver::Section::Authors
name: '@RJBS/Authors'
version: '4.020'
-
class: Pod::Weaver::Section::Contributors
name: '@RJBS/Contributors'
version: '0.009'
-
class: Pod::Weaver::Section::Legal
name: '@RJBS/Legal'
version: '4.020'
-
class: Pod::Weaver::Plugin::Transformer
name: '@RJBS/List'
version: '4.020'
name: '@RJBS/PodWeaver'
version: '4.010'
-
class: Dist::Zilla::Plugin::RJBSMisc
name: '@RJBS/RJBSMisc'
version: '5.036'
-
class: Dist::Zilla::Plugin::GithubMeta
name: '@RJBS/GithubMeta'
version: '0.58'
-
class: Dist::Zilla::Plugin::Git::Check
config:
Dist::Zilla::Plugin::Git::Check:
untracked_files: die
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Changes
- dist.ini
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: '2.50.1 (Apple Git-155)'
repo_root: .
name: '@RJBS/@Git/Check'
version: '2.052'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
Dist::Zilla::Plugin::Git::Commit:
add_files_in: []
commit_msg: v%V%n%n%c
signoff: 0
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Changes
- dist.ini
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: '2.50.1 (Apple Git-155)'
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@RJBS/@Git/Commit'
version: '2.052'
-
class: Dist::Zilla::Plugin::Git::Tag
config:
Dist::Zilla::Plugin::Git::Tag:
branch: ~
changelog: Changes
signed: 0
tag: '0.992'
tag_format: '%v'
tag_message: v%V
Dist::Zilla::Role::Git::Repo:
git_version: '2.50.1 (Apple Git-155)'
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@RJBS/@Git/Tag'
version: '2.052'
-
class: Dist::Zilla::Plugin::Git::Push
config:
Dist::Zilla::Plugin::Git::Push:
push_to:
- 'github :'
remotes_must_exist: 0
Dist::Zilla::Role::Git::Repo:
git_version: '2.50.1 (Apple Git-155)'
repo_root: .
name: '@RJBS/@Git/Push'
version: '2.052'
-
class: Dist::Zilla::Plugin::Git::Contributors
config:
Dist::Zilla::Plugin::Git::Contributors:
git_version: '2.50.1 (Apple Git-155)'
include_authors: 0
include_releaser: 1
order_by: name
paths: []
remove: ...
name: '@RJBS/Git::Contributors'
version: '0.039'
-
class: Dist::Zilla::Plugin::RemovePrereqs
config:
Dist::Zilla::Plugin::RemovePrereqs:
modules_to_remove:
- E::Parent
- Package::Generator
name: RemovePrereqs
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExtraTestFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':PerlExecFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
version: '6.037'
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
version: '6.037'
x_contributors:
- 'David Steinbrunner '
- 'everybody '
- 'George Hartzell '
- 'Hans Dieter Pearcey '
- 'Karen Etheridge '
- 'Ricardo Signes '
- 'Yves Orton '
x_generated_by_perl: v5.40.1
x_rjbs_perl_window: long-term
x_serialization_backend: 'YAML::Tiny version 1.76'
x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
MANIFEST 100644 000765 000024 1601 15246740770 14544 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.037
Changes
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
dist.ini
lib/Sub/Exporter.pm
lib/Sub/Exporter/Cookbook.pod
lib/Sub/Exporter/Tutorial.pod
lib/Sub/Exporter/Util.pm
t/00-report-prereqs.dd
t/00-report-prereqs.t
t/col-init.t
t/collection.t
t/expand-group.t
t/faux-export.t
t/gen-callable.t
t/group-generator.t
t/inherited.t
t/into-level.t
t/lib/Test/SubExporter/DashSetup.pm
t/lib/Test/SubExporter/Faux.pm
t/lib/Test/SubExporter/GroupGen.pm
t/lib/Test/SubExporter/GroupGenSubclass.pm
t/lib/Test/SubExporter/ObjGen.pm
t/lib/Test/SubExporter/s_e.pm
t/real-export-groupgen.t
t/real-export-href.t
t/real-export-setup.t
t/util-curry.t
t/util-currychain.t
t/util-like.t
t/util-merge.t
t/util-mixin.t
t/util-namemap.t
t/valid-config.t
xt/author/00-compile.t
xt/author/pod-syntax.t
xt/release/changes_has_content.t
META.json 100644 000765 000024 50056 15246740770 15064 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992 {
"abstract" : "a sophisticated exporter for custom-built routines",
"author" : [
"Ricardo Signes "
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.037, CPAN::Meta::Converter version 2.150013",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
},
"name" : "Sub-Exporter",
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.78"
}
},
"develop" : {
"requires" : {
"Encode" : "0",
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Test::More" : "0.94",
"Test::Pod" : "1.41"
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
"Data::OptList" : "0.100",
"Params::SomeUtil" : "0.14",
"Sub::Install" : "0.92",
"perl" : "5.012",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
"recommends" : {
"CPAN::Meta" : "2.120900"
},
"requires" : {
"Exporter" : "0",
"ExtUtils::MakeMaker" : "0",
"File::Spec" : "0",
"Test::More" : "0.96",
"base" : "0",
"lib" : "0",
"overload" : "0",
"subs" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/rjbs/Sub-Exporter/issues"
},
"homepage" : "https://github.com/rjbs/Sub-Exporter",
"repository" : {
"type" : "git",
"url" : "https://github.com/rjbs/Sub-Exporter.git",
"web" : "https://github.com/rjbs/Sub-Exporter"
}
},
"version" : "0.992",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.040001"
},
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::Git::GatherDir",
"config" : {
"Dist::Zilla::Plugin::GatherDir" : {
"exclude_filename" : [],
"exclude_match" : [],
"include_dotfiles" : 0,
"prefix" : "",
"prune_directory" : [],
"root" : "."
},
"Dist::Zilla::Plugin::Git::GatherDir" : {
"include_untracked" : 0
}
},
"name" : "@RJBS/Git::GatherDir",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@RJBS/CheckPrereqsIndexed",
"version" : "0.022"
},
{
"class" : "Dist::Zilla::Plugin::CheckExtraTests",
"name" : "@RJBS/CheckExtraTests",
"version" : "0.029"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
"config" : {
"Dist::Zilla::Plugin::PromptIfStale" : {
"check_all_plugins" : 0,
"check_all_prereqs" : 0,
"modules" : [
"Dist::Zilla::PluginBundle::RJBS"
],
"phase" : "build",
"run_under_travis" : 0,
"skip" : []
}
},
"name" : "@RJBS/RJBS-Outdated",
"version" : "0.060"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
"config" : {
"Dist::Zilla::Plugin::PromptIfStale" : {
"check_all_plugins" : 1,
"check_all_prereqs" : 0,
"modules" : [],
"phase" : "release",
"run_under_travis" : 0,
"skip" : [
"Dist::Zilla::Plugin::RJBSMisc"
]
}
},
"name" : "@RJBS/CPAN-Outdated",
"version" : "0.060"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Filter/PruneCruft",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Filter/ManifestSkip",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Filter/MetaYAML",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Filter/License",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Filter/Readme",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Filter/ExecDir",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Filter/ShareDir",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Filter/Manifest",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Filter/TestRelease",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Filter/ConfirmRelease",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Filter/UploadToCPAN",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 9
}
},
"name" : "@RJBS/MakeMaker",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Git::NextVersion",
"config" : {
"Dist::Zilla::Plugin::Git::NextVersion" : {
"first_version" : "0.001",
"version_by_branch" : 1,
"version_regexp" : "(?^:^([0-9]+\\.[0-9]+)$)"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1 (Apple Git-155)",
"repo_root" : "."
}
},
"name" : "@RJBS/Git::NextVersion",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Test::ChangesHasContent",
"name" : "@RJBS/Test::ChangesHasContent",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
"name" : "@RJBS/Test::ReportPrereqs",
"version" : "0.029"
},
{
"class" : "Dist::Zilla::Plugin::Git::Remote::Check",
"name" : "@RJBS/Git::Remote::Check",
"version" : "0.1.2"
},
{
"class" : "Dist::Zilla::Plugin::Test::Compile",
"config" : {
"Dist::Zilla::Plugin::Test::Compile" : {
"bail_out_on_fail" : 1,
"fail_on_warning" : "author",
"fake_home" : 0,
"filename" : "xt/author/00-compile.t",
"module_finder" : [
":InstallModules"
],
"needs_display" : 0,
"phase" : "develop",
"script_finder" : [
":PerlExecFiles"
],
"skips" : [],
"switch" : []
}
},
"name" : "@RJBS/Test::Compile",
"version" : "2.059"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "test",
"type" : "requires"
}
},
"name" : "@RJBS/TestMoreWithSubtests",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
"config" : {
"Dist::Zilla::Plugin::PodWeaver" : {
"config_plugins" : [
"@RJBS"
],
"finder" : [
":InstallModules",
":PerlExecFiles"
],
"plugins" : [
{
"class" : "Pod::Weaver::Plugin::EnsurePod5",
"name" : "@CorePrep/EnsurePod5",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Plugin::H1Nester",
"name" : "@CorePrep/H1Nester",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Plugin::SingleEncoding",
"name" : "@RJBS/SingleEncoding",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Name",
"name" : "@RJBS/Name",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Version",
"name" : "@RJBS/Version",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@RJBS/Prelude",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Synopsis",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Description",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Overview",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Stability",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::GenerateSection",
"name" : "@RJBS/PerlSupport",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Attributes",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Methods",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Functions",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Leftovers",
"name" : "@RJBS/Leftovers",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@RJBS/postlude",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Authors",
"name" : "@RJBS/Authors",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Contributors",
"name" : "@RJBS/Contributors",
"version" : "0.009"
},
{
"class" : "Pod::Weaver::Section::Legal",
"name" : "@RJBS/Legal",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Plugin::Transformer",
"name" : "@RJBS/List",
"version" : "4.020"
}
]
}
},
"name" : "@RJBS/PodWeaver",
"version" : "4.010"
},
{
"class" : "Dist::Zilla::Plugin::RJBSMisc",
"name" : "@RJBS/RJBSMisc",
"version" : "5.036"
},
{
"class" : "Dist::Zilla::Plugin::GithubMeta",
"name" : "@RJBS/GithubMeta",
"version" : "0.58"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"config" : {
"Dist::Zilla::Plugin::Git::Check" : {
"untracked_files" : "die"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [
"Changes",
"dist.ini"
],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1 (Apple Git-155)",
"repo_root" : "."
}
},
"name" : "@RJBS/@Git/Check",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"config" : {
"Dist::Zilla::Plugin::Git::Commit" : {
"add_files_in" : [],
"commit_msg" : "v%V%n%n%c",
"signoff" : 0
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [
"Changes",
"dist.ini"
],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1 (Apple Git-155)",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@RJBS/@Git/Commit",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"config" : {
"Dist::Zilla::Plugin::Git::Tag" : {
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
"tag" : "0.992",
"tag_format" : "%v",
"tag_message" : "v%V"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1 (Apple Git-155)",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@RJBS/@Git/Tag",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
"config" : {
"Dist::Zilla::Plugin::Git::Push" : {
"push_to" : [
"github :"
],
"remotes_must_exist" : 0
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1 (Apple Git-155)",
"repo_root" : "."
}
},
"name" : "@RJBS/@Git/Push",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::Git::Contributors",
"config" : {
"Dist::Zilla::Plugin::Git::Contributors" : {
"git_version" : "2.50.1 (Apple Git-155)",
"include_authors" : 0,
"include_releaser" : 1,
"order_by" : "name",
"paths" : [],
"remove" : "..."
}
},
"name" : "@RJBS/Git::Contributors",
"version" : "0.039"
},
{
"class" : "Dist::Zilla::Plugin::RemovePrereqs",
"config" : {
"Dist::Zilla::Plugin::RemovePrereqs" : {
"modules_to_remove" : [
"E::Parent",
"Package::Generator"
]
}
},
"name" : "RemovePrereqs",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExtraTestFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":PerlExecFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
"version" : "6.037"
}
],
"zilla" : {
"class" : "Dist::Zilla::Dist::Builder",
"config" : {
"is_trial" : 0
},
"version" : "6.037"
}
},
"x_contributors" : [
"David Steinbrunner ",
"everybody ",
"George Hartzell ",
"Hans Dieter Pearcey ",
"Karen Etheridge ",
"Ricardo Signes ",
"Yves Orton "
],
"x_generated_by_perl" : "v5.40.1",
"x_rjbs_perl_window" : "long-term",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.40",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
}
Makefile.PL 100644 000765 000024 3107 15246740770 15370 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.037
use strict;
use warnings;
use 5.012;
use ExtUtils::MakeMaker 6.78;
my %WriteMakefileArgs = (
"ABSTRACT" => "a sophisticated exporter for custom-built routines",
"AUTHOR" => "Ricardo Signes ",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.78"
},
"DISTNAME" => "Sub-Exporter",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.012",
"NAME" => "Sub::Exporter",
"PREREQ_PM" => {
"Carp" => 0,
"Data::OptList" => "0.100",
"Params::SomeUtil" => "0.14",
"Sub::Install" => "0.92",
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"Exporter" => 0,
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"Test::More" => "0.96",
"base" => 0,
"lib" => 0,
"overload" => 0,
"subs" => 0
},
"VERSION" => "0.992",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Carp" => 0,
"Data::OptList" => "0.100",
"Exporter" => 0,
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"Params::SomeUtil" => "0.14",
"Sub::Install" => "0.92",
"Test::More" => "0.96",
"base" => 0,
"lib" => 0,
"overload" => 0,
"strict" => 0,
"subs" => 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);
t 000755 000765 000024 0 15246740770 13520 5 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992 col-init.t 100644 000765 000024 2165 15246740770 15567 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
=head1 TEST PURPOSE
These tests exercise the handling of collections in the exporter option lists.
=cut
use Test::More tests => 3;
use Data::OptList qw(mkopt_hash);
BEGIN { use_ok('Sub::Exporter'); }
sub is_defined {
my ($class, $value, $arg) = @_;
return defined $value;
}
my $counter = 0;
my $config = {
exports => [ qw(circsaw drill handsaw nailgun) ],
collectors => [
INIT => sub {
my ($value, $arg) = @_;
return 0 if @{$arg->{import_args}}; # in other words, fail if args
$_[0] = [ $counter++ ];
return 1;
},
]
};
$config->{$_} = mkopt_hash($config->{$_}) for qw(exports collectors);
{
my $collection = Sub::Exporter::_collect_collections(
$config,
[ ],
'main',
);
is_deeply(
$collection,
{ INIT => [ 0 ] },
"collection returned properly from collector",
);
}
{
my $collection = eval {
Sub::Exporter::_collect_collections(
$config,
[ [ handsaw => undef ] ],
'main',
);
};
like(
$@,
qr/INIT failed/,
"the init collector is run even when other things are here",
);
}
inherited.t 100644 000765 000024 1131 15246740770 16014 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
=head1 TEST PURPOSE
These tests check that the inherited form of a routine is the exported one.
=cut
use Test::More tests => 3;
BEGIN { use_ok('Sub::Exporter'); }
package E::Parent;
use Sub::Exporter -setup => { exports => [ qw(foo) ] };
sub foo { return 1; }
package E::Child;
use base qw(E::Parent);
sub foo { return 2; }
package Test::Sub::Exporter::EPARENT;
E::Parent->import('foo');
main::is(foo(), 1, "get result of parent's import");
package Test::Sub::Exporter::ECHILD;
E::Child->import('foo');
main::is(foo(), 2, "get result of child's import");
util-like.t 100644 000765 000024 6024 15246740770 15746 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
use Test::More tests => 11;
BEGIN { use_ok("Sub::Exporter"); }
use lib 't/lib';
use Test::SubExporter::Faux;
my ($generator, $installer, $reset, $exports);
BEGIN { ($generator, $installer, $reset, $exports) = faux_installer; }
my %generator;
BEGIN {
%generator = (
foo => sub { sub { 1 } },
bar => sub { sub { 2 } },
baz => sub { sub { 3 } },
BAR => sub { sub { 4 } },
xyzzy => sub { sub { 5 } },
);
}
BEGIN {
isa_ok($installer, 'CODE');
package Thing;
BEGIN { main::use_ok('Sub::Exporter::Util', 'like'); }
use Sub::Exporter -setup => {
installer => $installer,
generator => $generator,
collectors => {
-like => like
},
exports => \%generator,
};
}
package main;
my $code = sub {
$reset->();
Thing->import(@_);
};
$code->(qw(foo xyzzy));
exports_ok(
$exports,
[ [ foo => {} ], [ xyzzy => {} ] ],
"the basics work normally"
);
$code->(-like => qr/^b/i);
exports_ok(
$exports,
[ [ BAR => {} ], [ baz => {} ], [ bar => {} ] ],
"give me everything starting with b or B (qr//)"
);
$code->(-like => [ qr/^b/i ]);
exports_ok(
$exports,
[ [ BAR => {} ], [ baz => {} ], [ bar => {} ] ],
"give me everything starting with b or B ([qr//])"
);
$code->(-like => [ qr/^b/i => undef ]);
exports_ok(
$exports,
[ [ BAR => {} ], [ baz => {} ], [ bar => {} ] ],
"give me everything starting with b or B ([qr//=>undef])"
);
# XXX: must use verbose exporter
my %col = ( -like => [
qr/^b/i => { -prefix => 'like_' },
qr/zz/i => { -suffix => '_y2' },
]);
$code->(%col);
everything_ok(
$exports,
[
[
BAR => {
class => 'Thing',
generator => $generator{BAR},
name => 'BAR',
arg => {},
collection => \%col,
as => 'like_BAR',
into => 'main',
},
],
[
bar => {
class => 'Thing',
generator => $generator{bar},
name => 'bar',
arg => {},
collection => \%col,
as => 'like_bar',
into => 'main',
},
],
[
baz => {
class => 'Thing',
generator => $generator{baz},
name => 'baz',
arg => {},
collection => \%col,
as => 'like_baz',
into => 'main',
},
],
[
xyzzy => {
class => 'Thing',
generator => $generator{xyzzy},
name => 'xyzzy',
arg => {},
collection => \%col,
as => 'xyzzy_y2',
into => 'main',
},
],
],
'give me everything starting with b or B as like_$_ ([qr//=>{...}])'
);
{
my $like = Sub::Exporter::Util::like();
is(ref($like), 'CODE', 'like() gives us a generator');
eval { $like->() };
like($@, qr/no regex supplied/, "exception with no args to like->()");
eval { $like->([ "fake*reg{3}exp" => { a => 1 } ]) };
like($@, qr/not a regex/i, "exception with non qr// pattern in like");
}
collection.t 100644 000765 000024 5512 15246740770 16203 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
=head1 TEST PURPOSE
These tests exercise the handling of collections in the exporter option lists.
=cut
use Test::More tests => 8;
use Data::OptList qw(mkopt_hash);
BEGIN { use_ok('Sub::Exporter'); }
sub is_defined {
my ($class, $value, $arg) = @_;
return defined $value;
}
my $config = {
exports => [
qw(circsaw drill handsaw nailgun),
hammer => sub { sub { print "BANG BANG BANG\n" } },
],
groups => {
default => [
'handsaw',
'hammer' => { claw => 1 },
],
cutters => [ qw(circsaw handsaw), circsaw => { as => 'buzzsaw' } ],
},
collectors => [
'defaults',
brand_preference => sub { 0 },
model_preference => sub { 1 },
sets_own_value => sub { $_[0] = { foo => 10 } },
definedp => \'is_defined',
]
};
$config->{$_} = mkopt_hash($config->{$_})
for qw(exports collectors);
{
my $collection = Sub::Exporter::_collect_collections(
$config,
[ [ circsaw => undef ], [ defaults => { foo => 1, bar => 2 } ] ],
'main',
);
is_deeply(
$collection,
{ defaults => { foo => 1, bar => 2 } },
"collection returned properly from collector",
);
}
{
my $collection = Sub::Exporter::_collect_collections(
$config,
[ [ sets_own_value => undef ] ],
'main',
);
is_deeply(
$collection,
{ sets_own_value => { foo => 10} },
"a collector can alter the stack to change its own value",
);
}
{
my $arg = [ [ defaults => [ 1 ] ], [ defaults => { foo => 1, bar => 2 } ] ];
eval { Sub::Exporter::_collect_collections($config, $arg, 'main'); };
like(
$@,
qr/collection \S+ provided multiple/,
"can't provide multiple collection values",
);
}
{
# because the brand_preference validator always fails, this should die
my $arg = [ [ brand_preference => [ 1, 2, 3 ] ] ];
eval { Sub::Exporter::_collect_collections($config, $arg, 'main') };
like(
$@,
qr/brand_preference failed validation/,
"collector validator prevents bad export"
);
}
{
# the definedp collector should require a defined value; this should be ok
my $arg = [ [ definedp => {} ] ];
my $collection = Sub::Exporter::_collect_collections($config, $arg, 'main');
is_deeply(
$collection,
{ definedp => {} },
"collector validator allows collection"
);
}
{
# the definedp collector should require a defined value; this should die
my $arg = [ [ definedp => undef ] ];
eval { Sub::Exporter::_collect_collections($config, $arg, 'main') };
like(
$@,
qr/definedp failed validation/,
"collector validator prevents bad export"
);
}
{
my $arg = [ [ model_preference => [ 1, 2, 3 ] ] ];
my $collection = Sub::Exporter::_collect_collections($config, $arg, 'main');
is_deeply(
$collection,
{ model_preference => [ 1, 2, 3 ] },
"true-returning validator allows collection",
);
}
into-level.t 100644 000765 000024 6056 15246740770 16132 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
=head1 TEST PURPOSE
These tests exercise the "into" and "into_level" special arguments to the built
exporter.
=cut
use Test::More tests => 14;
BEGIN {
use_ok('Sub::Exporter');
}
BEGIN {
package Test::SubExport::FROM;
use strict;
use warnings;
use Sub::Exporter -setup => {
exports => [ qw(A B) ],
groups => {
default => [ ':all' ],
a => [ 'A' ],
b => [ 'B' ]
}
};
sub A { 'A' }
sub B { 'B' }
1;
}
BEGIN {
package Test::SubExport::HAS_DEFAULT_INTO_LEVEL;
use strict;
use warnings;
use Sub::Exporter -setup => {
exports => [ qw(C) ],
into_level => 1,
};
sub C { 'C' }
1;
}
BEGIN {
package Test::SubExport::HAS_DEFAULT_INTO;
use strict;
use warnings;
use Sub::Exporter -setup => {
exports => [ qw(foo) ],
into => 'Test::SubExport::DEFAULT_INTO',
};
sub foo { 'foo' }
1;
}
BEGIN {
package Test::SubExport::INTO;
use strict;
use warnings;
sub import {
my $package = shift;
my $caller = caller(0);
Test::SubExport::FROM->import( { into => $caller }, @_ );
}
1;
}
BEGIN {
package Test::SubExport::LEVEL;
use strict;
use warnings;
sub import {
my $package = shift;
Test::SubExport::FROM->import( { into_level => 1 }, @_ );
}
1;
}
BEGIN {
package Test::SubExport::DEFAULT_LEVEL;
use strict;
use warnings;
sub import {
my $package = shift;
Test::SubExport::HAS_DEFAULT_INTO_LEVEL->import(@_);
}
1;
}
package Test::SubExport::INTO::A;
Test::SubExport::INTO->import('A');
main::can_ok(__PACKAGE__, 'A' );
main::cmp_ok(
__PACKAGE__->can('A'), '==', Test::SubExport::FROM->can('A'),
'sub A was exported'
);
package Test::SubExport::INTO::ALL;
Test::SubExport::INTO->import(':all');
main::can_ok(__PACKAGE__, 'A', 'B' );
main::cmp_ok(
__PACKAGE__->can('A'), '==', Test::SubExport::FROM->can('A'),
'sub A was exported'
);
main::cmp_ok(
__PACKAGE__->can('B'), '==', Test::SubExport::FROM->can('B'),
'sub B was exported'
);
package Test::SubExport::LEVEL::ALL;
Test::SubExport::LEVEL->import(':all');
main::can_ok(__PACKAGE__, 'A', 'B' );
main::cmp_ok(
__PACKAGE__->can('A'), '==', Test::SubExport::FROM->can('A'),
'sub A was exported'
);
main::cmp_ok(
__PACKAGE__->can('B'), '==', Test::SubExport::FROM->can('B'),
'sub B was exported'
);
package Test::SubExport::LEVEL::DEFAULT;
Test::SubExport::DEFAULT_LEVEL->import(':all');
main::can_ok(__PACKAGE__, 'C');
main::cmp_ok(
__PACKAGE__->can('C'),
'==',
Test::SubExport::HAS_DEFAULT_INTO_LEVEL->can('C'),
'sub C was exported'
);
package Test::SubExport::NON_DEFAULT_INTO;
main::is(
Test::SubExport::DEFAULT_INTO->can('foo'),
undef,
"before import, 'default into' target can't foo",
);
Test::SubExport::HAS_DEFAULT_INTO->import('-all');
main::is(
__PACKAGE__->can('foo'),
undef,
"after import, calling package can't foo",
);
main::is(
Test::SubExport::DEFAULT_INTO->can('foo'),
\&Test::SubExport::HAS_DEFAULT_INTO::foo,
"after import, calling package can't foo",
);
util-curry.t 100644 000765 000024 3273 15246740770 16171 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
use Test::More tests => 10;
BEGIN { use_ok("Sub::Exporter"); }
BEGIN {
package Thing;
BEGIN { main::use_ok('Sub::Exporter::Util', 'curry_class'); }
use Sub::Exporter -setup => {
exports => {
return_invocant => curry_class,
talkback => curry_class('return_invocant'),
},
};
sub new { bless { key => "value" } => $_[0] }
sub return_invocant { return $_[0] }
}
BEGIN {
package Thing::Subclass;
our @ISA = qw(Thing);
}
package Test::SubExporter::CURRY::0;
BEGIN { Thing->import(qw(return_invocant)); }
main::is(
Thing->return_invocant,
"Thing",
"method call on Thing returns Thing",
);
main::is(
Thing::Subclass->return_invocant,
"Thing::Subclass",
"method call on Thing::Subclass returns Thing::Subclass",
);
main::is(
return_invocant(),
'Thing',
'return of method class-curried from Thing is Thing'
);
package Test::SubExporter::CURRY::1;
BEGIN { Thing::Subclass->import(qw(return_invocant)); }
main::is(
Thing->return_invocant,
"Thing",
"method call on Thing returns Thing",
);
main::is(
Thing::Subclass->return_invocant,
"Thing::Subclass",
"method call on Thing::Subclass returns Thing::Subclass",
);
main::is(
return_invocant(),
'Thing::Subclass',
'return of method class-curried from Thing::Subclass is Thing::Subclass'
);
package Test::SubExporter::CURRY::2;
BEGIN { Thing->import(qw(talkback)); }
main::is(
talkback(),
'Thing',
'imported talkback acts like return_invocant'
);
package Test::SubExporter::CURRY::Object;
BEGIN { Thing->new->import(qw(talkback)); }
main::isa_ok(
talkback(),
'Thing',
'the result of object-curried talkback'
);
util-merge.t 100644 000765 000024 3314 15246740770 16120 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
use Test::More tests => 8;
BEGIN { use_ok("Sub::Exporter"); }
BEGIN {
package Thing;
BEGIN { main::use_ok("Sub::Exporter::Util", 'merge_col'); }
use Sub::Exporter -setup => {
collectors => [ qw(defaults etc) ],
exports => {
merge_col(
defaults => {
stack => sub { my @x = @_; sub { return @x } },
kcats => \'_kcats_gen',
},
empty => {
bogus => sub { my @x = @_; sub { return @x } },
klame => sub { my @x = @_; sub { return @x } },
},
etc => {
other => sub { my @x = @_; sub { return @x } },
},
),
plain => sub { my @x = @_; sub { return @x } },
},
};
sub _kcats_gen {
my @x = @_;
sub { return reverse @x }
}
}
package Test::SubExporter::MERGE::0;
my %col;
BEGIN {
Thing->import(
defaults => ($col{defaults} = { x => 10 }),
etc => ($col{etc} = { home => "Kansas" }),
stack => { x => 20, y => 30 },
kcats => { y => 3 },
bogus => undef,
klame => { bar => 99 },
other => undef,
plain => { foo => 10 },
);
}
my %tests = (
stack => [ 'Thing', 'stack', { x => 20, y => 30 }, \%col ],
kcats => [ \%col, { x => 10, y => 3 }, 'kcats', 'Thing' ],
bogus => [ 'Thing', 'bogus', {}, \%col ],
klame => [ 'Thing', 'klame', { bar => 99 }, \%col ],
other => [ 'Thing', 'other', { home => "Kansas" }, \%col ],
plain => [ 'Thing', 'plain', { foo => 10 }, \%col ],
);
while (my ($name, $expected) = each %tests) {
main::is_deeply(
[ __PACKAGE__->$name ],
$expected,
"$name returned proper value",
);
}
util-mixin.t 100644 000765 000024 5337 15246740770 16154 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
use Test::More;
BEGIN {
if (eval { require Package::Generator; 1; }) {
plan 'no_plan';
} else {
plan skip_all => "the mixin exporter requires Package::Generator";
}
}
BEGIN { use_ok("Sub::Exporter"); }
BEGIN {
package Thing;
use Sub::Exporter -setup => {
exports => {
bar => sub { sub { 1 } },
foo => sub {
my ($c, $n, $a) = @_;
sub { return $c . ($a->{arg}) }
}
},
};
}
BEGIN {
package Thing::Mixin;
BEGIN { main::use_ok("Sub::Exporter::Util", 'mixin_installer'); }
use Sub::Exporter -setup => {
installer => mixin_installer,
exports => {
bar => sub { sub { 1 } },
foo => sub {
my ($c, $n, $a) = @_;
sub { return $c . ($a->{arg}) }
}
},
};
}
package Test::SubExporter::MIXIN::0;
BEGIN {
Thing->import(
{ installer => Sub::Exporter::Util::mixin_installer },
-all => { arg => '0' },
);
}
package Test::SubExporter::MIXIN::1;
BEGIN {
Thing->import(
{ installer => Sub::Exporter::Util::mixin_installer },
-all => { arg => '1' },
);
}
package Test::SubExporter::MIXIN::2;
BEGIN {
Thing::Mixin->import(
-all => { arg => '2' },
);
}
package Test::SubExporter::MIXIN::3;
BEGIN {
Thing::Mixin->import(
-all => { arg => '3' },
);
}
package main;
my @pkg = map { "Test::SubExporter::MIXIN::$_" } (0 .. 3);
for (0 .. $#pkg) {
my $ext = $_ > 1 ? '::Mixin' : '';
my $val = eval { $pkg[$_]->foo } || ($@ ? "died: $@" : undef);
is(
$val,
"Thing$ext$_",
"mixed in method in $pkg[$_] returns correctly"
);
is($pkg[$_]->bar, 1, "bar method for $pkg[$_] is ok, too");
}
my @super = map {; no strict 'refs'; [ @{$_ . "::ISA"} ] } @pkg;
for my $x (0 .. $#pkg) {
is(@{$super[$x]}, 1, "one parent for $pkg[$x]: @{$super[$x]}");
for my $y (($x + 1) .. $#pkg) {
isnt("@{$super[$x]}", "@{$super[$y]}", "parent($x) ne parent($y)")
}
}
{
package Test::SubExporter::OBJECT;
sub new { bless {} => shift }
sub plugh { "plugh" }
}
package main;
my $obj_1 = Test::SubExporter::OBJECT->new;
isa_ok($obj_1, "Test::SubExporter::OBJECT", "first object");
is(ref $obj_1, "Test::SubExporter::OBJECT", "first object's ref is TSEO");
my $obj_2 = Test::SubExporter::OBJECT->new;
isa_ok($obj_2, "Test::SubExporter::OBJECT", "second object");
is(ref $obj_2, "Test::SubExporter::OBJECT", "second object's ref is TSEO");
Thing::Mixin->import({ into => $obj_1 }, qw(bar));
pass("mixin-exporting to an object didn't die");
is(
eval { $obj_1->bar },
1,
"now that object has a bar method"
);
isa_ok($obj_1, "Test::SubExporter::OBJECT");
isnt(ref $obj_1, "Test::SubExporter::OBJECT", "but its actual class isnt TSEO");
faux-export.t 100644 000765 000024 5730 15246740770 16334 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
=head1 TEST PURPOSE
These tests check the output of build_installer when handed an alternate
installer that returns its plan.
=cut
use Test::More tests => 11;
BEGIN { use_ok('Sub::Exporter'); }
use lib 't/lib';
use Test::SubExporter::Faux;
my $config = {
exports => [
qw(circsaw drill handsaw nailgun),
hammer => sub { sub { print "BANG BANG BANG\n" } },
],
groups => {
default => [
'handsaw',
'hammer' => { claw => 1 },
],
cutters => [ qw(circsaw handsaw), circsaw => { -as => 'buzzsaw' } ],
},
collectors => [
'defaults',
'brand_preference' => sub { 0 },
]
};
{
my ($generator, $installer, $reset, $exports) = faux_installer;
my $code = sub {
$reset->();
splice @_, 1, 0, { generator => $generator, installer => $installer };
Sub::Exporter::build_exporter($config)->(@_);
};
$code->('Tools::Power');
exports_ok(
$exports,
[ [ handsaw => {} ], [ hammer => { claw => 1 } ] ],
"exporting with no arguments gave us default group"
);
$code->('Tools::Power', ':all');
exports_ok(
[ sort { $a->[0] cmp $b->[0] } @$exports ],
[ map { [ $_ => {} ] } sort qw(circsaw drill handsaw nailgun hammer), ],
"exporting :all gave us all exports",
);
$code->('Tools::Power', drill => { -as => 'auger' });
exports_ok(
$exports,
[ [ drill => {} ] ],
"'-as' parameter is not passed to generators",
);
$code->('Tools::Power', ':cutters');
exports_ok(
$exports,
[ [ circsaw => {} ], [ handsaw => {} ], [ circsaw => {} ] ],
"group with two export instances of one export",
);
eval { $code->('Tools::Power', 'router') };
like($@, qr/not exported/, "can't export un-exported export (got that?)");
eval { $code->('Tools::Power', ':sockets') };
like($@, qr/not exported/, "can't export nonexistent group, either");
# because the brand_preference validator always fails, this should die
eval { $code->('Tools::Power', brand_preference => [ '...' ]) };
like(
$@,
qr/brand_preference failed validation/,
"collector validator prevents bad export"
);
}
{
my ($generator, $installer, $reset, $exports) = faux_installer;
my $code = sub {
$reset->();
splice @_, 1, 0, { generator => $generator, installer => $installer };
Sub::Exporter::build_exporter({ exports => [ 'foo' ] })->(@_);
};
$code->('Example::Foo');
exports_ok(
$exports,
[ ],
"exporting with no arguments gave us default default group, i.e., nothing"
);
$code->('Tools::Power', ':all');
exports_ok(
$exports,
[ [ foo => {} ] ],
"exporting :all gave us all exports, i.e., foo",
);
}
{
package Test::SubExport::FAUX;
my ($generator, $installer, $reset, $exports) = main::faux_installer;
Sub::Exporter::setup_exporter({
exports => [ 'X' ],
installer => $installer,
generator => $generator,
});
__PACKAGE__->import(':all');
main::exports_ok($exports, [ [ X => {} ] ], "setup (not built) exporter");
}
expand-group.t 100644 000765 000024 12414 15246740770 16500 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
=head1 TEST PURPOSE
These tests check export group expansion, name prefixing, and option merging.
=cut
use Test::More tests => 55;
BEGIN { use_ok('Sub::Exporter'); }
my $import_target;
my $config = {
exports => [ qw(a b c) ],
groups => {
A => [ 'a' ],
B => [ qw(b c) ],
C => [ qw(a b :C) ],
D => [ qw(:A :B) ],
a_as_b => [ a => { -as => 'b' } ],
prefixed_A => [ -A => { -prefix => 'alfa_' } ],
suffixed_A => [ -A => { -suffix => '_yankee' } ],
diprefixed_A => [ -prefixed_A => { -prefix => 'bravo_' } ],
disuffixed_A => [ -suffixed_A => { -suffix => '_zulu' } ],
presuffixed_A=> [ -A => { -prefix => 'freakin_', -suffix => '_right' } ],
a_to_subref => [ a => { -as => \$import_target }, 'b' ],
prefixed_a_s => [ -a_to_subref => { -prefix => 'alfa_' } ],
}
};
my @single_tests = (
[ "simple group 1", [ ':A' => undef ] => [ [ a => undef ] ] ],
[ "simple group 2", [ ':B' => undef ] => [ [ b => undef ], [ c => undef ] ] ],
[
"group of groups",
[ ':D' => undef ],
[ [ a => undef ], [ b => undef ], [ c => undef ] ],
],
[
"recursive group",
[ ':C' => undef ],
[ [ a => undef ], [b => undef ] ],
],
[
"group with empty args",
[ -A => { } ],
[ [ a => undef ] ],
],
[
"group with prefix",
[ -A => { -prefix => 'alpha_' } ],
[ [ a => { -as => 'alpha_a' } ] ],
],
[
"group with suffix",
[ -A => { -suffix => '_import' } ],
[ [ a => { -as => 'a_import' } ] ],
],
[
"recursive group with prefix",
[ -C => { -prefix => 'kappa_' } ],
[ [ a => { -as => 'kappa_a' } ], [ b => { -as => 'kappa_b' } ] ],
],
[
"recursive group with suffix",
[ -C => { -suffix => '_etc' } ],
[ [ a => { -as => 'a_etc' } ], [ b => { -as => 'b_etc' } ] ],
],
[
"group that renames",
[ -a_as_b => undef ],
[ [ a => { -as => 'b' } ] ],
],
[
"group that renames, with options",
[ -a_as_b => { foo => 10 } ],
[ [ a => { -as => 'b', foo => 10 } ] ],
],
[
"group that renames, with a prefix",
[ -a_as_b => { -prefix => 'not_really_' } ],
[ [ a => { -as => 'not_really_b' } ] ],
],
[
"group that renames, with a suffix",
[ -a_as_b => { -suffix => '_or_not' } ],
[ [ a => { -as => 'b_or_not' } ] ],
],
[
"group that renames, with a prefix and suffix",
[ -a_as_b => { -prefix => 'not_really_' } ],
[ [ a => { -as => 'not_really_b' } ] ],
],
[
"recursive group with a built-in prefix",
[ -prefixed_A => undef ],
[ [ a => { -as => 'alfa_a' } ] ],
],
[
"recursive group with built-in and passed-in prefix",
[ -prefixed_A => { -prefix => 'bravo_' } ],
[ [ a => { -as => 'bravo_alfa_a' } ] ],
],
[
"recursive group with built-in and passed-in suffix",
[ -suffixed_A => { -suffix => '_zulu' } ],
[ [ a => { -as => 'a_yankee_zulu' } ] ],
],
[
"multi-prefixed group",
[ -diprefixed_A => undef ],
[ [ a => { -as => 'bravo_alfa_a' } ] ],
],
[
"multi-suffixed group",
[ -disuffixed_A => undef ],
[ [ a => { -as => 'a_yankee_zulu' } ] ],
],
[
"multi-prefixed group with prefix",
[ -diprefixed_A => { -prefix => 'charlie_' } ],
[ [ a => { -as => 'charlie_bravo_alfa_a' } ] ],
],
[
"group with built-in prefix and suffix",
[ -presuffixed_A => undef ],
[ [ a => { -as => 'freakin_a_right' } ] ],
],
[
"group with built-in prefix and suffix, plus prefix",
[ -presuffixed_A => { -prefix => 'totally_' } ],
[ [ a => { -as => 'totally_freakin_a_right' } ] ],
],
[
"group with built-in prefix and suffix, plus suffix",
[ -presuffixed_A => { -suffix => '_dude' } ],
[ [ a => { -as => 'freakin_a_right_dude' } ] ],
],
[
"group with built-in prefix and suffix, plus prefix and suffix",
[ -presuffixed_A => { -prefix => 'totally_', -suffix => '_dude' } ],
[ [ a => { -as => 'totally_freakin_a_right_dude' } ] ],
],
[
"group that exports to scalar (unusual)",
[ -a_to_subref => undef ],
[ [ a => { -as => \$import_target } ], [ b => undef ] ],
],
[
"group that exports to scalar, with prefix",
[ -a_to_subref => { -prefix => 'jubju' } ],
[ [ a => { -as => \$import_target } ], [ b => { -as => 'jubjub' } ] ],
],
);
for my $test (@single_tests) {
my ($label, $given, $expected) = @$test;
my @got = Sub::Exporter::_expand_group(
'Class',
$config,
$given,
{},
);
is_deeply(\@got, $expected, "expand_group: $label");
}
for my $test (@single_tests) {
my ($label, $given, $expected) = @$test;
my $got = Sub::Exporter::_expand_groups(
'Class',
$config,
[ $given ],
);
is_deeply($got, $expected, "expand_groups: $label [single test]");
}
my @multi_tests = (
[
"group and export",
[ [ ':A', undef ], [ c => undef ] ],
[ [ a => undef ], [ c => undef ] ]
],
[
"two groups with different merges",
[ [ -A => { -prefix => 'A_' } ], [ -prefixed_A => { -suffix => '_p' } ] ],
[
[ a => { -as => 'A_a' } ],
[ a => { -as => 'alfa_a_p' } ],
]
],
);
for my $test (@multi_tests) {
my ($label, $given, $expected) = @$test;
my $got = Sub::Exporter::_expand_groups(
'Class',
$config,
$given,
);
is_deeply($got, $expected, "expand_groups: $label");
}
gen-callable.t 100644 000765 000024 1062 15246740770 16352 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
use Test::More tests => 8;
use lib 't/lib';
BEGIN {
use_ok("Sub::Exporter");
use_ok("Test::SubExporter::ObjGen", 'baz', '-meta', 'quux', '-ringo');
}
is(quux(), 'QUUX', 'blessed coderef generator');
is(baz(), 'BAZ', 'object with &{} as generator');
is(foo(), 'FOO', 'object with &{} as group generator (1/2)');
is(bar(), 'BAR', 'object with &{} as group generator (2/2)');
is(ringo(), 'starr', 'blessed coderef as group generator (1/2)');
is(richard(), 'starkey', 'blessed coderef as group generator (2/2)');
util-namemap.t 100644 000765 000024 1054 15246740770 16436 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
use Test::More skip_all => 'not actually offerring this feature yet';
# use Test::More tests => 3;
BEGIN { use_ok("Sub::Exporter::Util", 'name_map'); }
is_deeply(
{
name_map(
'_?_gen' => [ qw(fee fie) ],
'_make_?' => [ qw(foo bar) ],
),
},
{
fee => \'_fee_gen',
fie => \'_fie_gen',
foo => \'_make_foo',
bar => \'_make_bar',
},
'example from docs works just dandy',
);
eval { name_map(foo => [ qw(bar) ] ) };
like($@, qr/no \?/, 'exception raised with no ? in template');
valid-config.t 100644 000765 000024 2415 15246740770 16411 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/t #!perl
use strict;
use warnings;
=head1 TEST PURPOSE
These tests make sure that invalid configurations passed to
setup/build_exporter throw exceptions.
=cut
use Test::More tests => 6;
BEGIN { use_ok('Sub::Exporter'); }
eval {
Sub::Exporter::build_exporter({
exports => [ qw(foo) ],
collectors => [ qw(foo) ],
})
};
like($@, qr/used in both/, "can't use one name in exports and collectors");
eval {
Sub::Exporter::build_exporter({
collections => [ qw(foo) ], # This one gets me all the time. Live & learn.
})
};
like($@, qr/unknown options/, "unknown options raise an exception");
eval {
Sub::Exporter::setup_exporter({
into => 'Your::Face',
into_level => 5,
})
};
like(
$@,
qr/may not both/,
"into and into_level are mutually exclusive (in setup_exporter)"
);
eval {
Sub::Exporter::build_exporter({})->(
Class => {
into => 'Your::Face',
into_level => 1
}
);
};
like(
$@,
qr/may not both/,
"into and into_level are mutually exclusive (in exporter)"
);
eval {
Sub::Exporter::build_exporter({
into => "This::Doesnt::Matter",
into_level => 0,
})
};
like(
$@,
qr(^into and into_level may not both be supplied to exporter),
"can't use one name in exports and collectors"
);
Sub 000755 000765 000024 0 15246740770 14554 5 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/lib Exporter.pm 100644 000765 000024 172014 15246740770 17127 0 ustar 00rjbs staff 000000 000000 Sub-Exporter-0.992/lib/Sub use v5.12.0;
use warnings;
package Sub::Exporter 0.992;
# ABSTRACT: a sophisticated exporter for custom-built routines
use Carp ();
use Data::OptList 0.100 ();
use Params::SomeUtil 0.14 (); # _CODELIKE
use Sub::Install 0.92 ();
#pod =head1 SYNOPSIS
#pod
#pod Sub::Exporter must be used in two places. First, in an exporting module:
#pod
#pod # in the exporting module:
#pod package Text::Tweaker;
#pod use Sub::Exporter -setup => {
#pod exports => [
#pod qw(squish titlecase), # always works the same way
#pod reformat => \&build_reformatter, # generator to build exported function
#pod trim => \&build_trimmer,
#pod indent => \&build_indenter,
#pod ],
#pod collectors => [ 'defaults' ],
#pod };
#pod
#pod Then, in an importing module:
#pod
#pod # in the importing module:
#pod use Text::Tweaker
#pod 'squish',
#pod indent => { margin => 5 },
#pod reformat => { width => 79, justify => 'full', -as => 'prettify_text' },
#pod defaults => { eol => 'CRLF' };
#pod
#pod With this setup, the importing module ends up with three routines: C,
#pod C, and C. The latter two have been built to the
#pod specifications of the importer -- they are not just copies of the code in the
#pod exporting package.
#pod
#pod =head1 DESCRIPTION
#pod
#pod B If you're not familiar with Exporter or exporting, read
#pod L first!
#pod
#pod =head2 Why Generators?
#pod
#pod The biggest benefit of Sub::Exporter over existing exporters (including the
#pod ubiquitous Exporter.pm) is its ability to build new coderefs for export, rather
#pod than to simply export code identical to that found in the exporting package.
#pod
#pod If your module's consumers get a routine that works like this:
#pod
#pod use Data::Analyze qw(analyze);
#pod my $value = analyze($data, $tolerance, $passes);
#pod
#pod and they constantly pass only one or two different set of values for the
#pod non-C<$data> arguments, your code can benefit from Sub::Exporter. By writing a
#pod simple generator, you can let them do this, instead:
#pod
#pod use Data::Analyze
#pod analyze => { tolerance => 0.10, passes => 10, -as => analyze10 },
#pod analyze => { tolerance => 0.15, passes => 50, -as => analyze50 };
#pod
#pod my $value = analyze10($data);
#pod
#pod The package with the generator for that would look something like this:
#pod
#pod package Data::Analyze;
#pod use Sub::Exporter -setup => {
#pod exports => [
#pod analyze => \&build_analyzer,
#pod ],
#pod };
#pod
#pod sub build_analyzer {
#pod my ($class, $name, $arg) = @_;
#pod
#pod return sub {
#pod my $data = shift;
#pod my $tolerance = shift || $arg->{tolerance};
#pod my $passes = shift || $arg->{passes};
#pod
#pod analyze($data, $tolerance, $passes);
#pod }
#pod }
#pod
#pod Your module's user now has to do less work to benefit from it -- and remember,
#pod you're often your own user! Investing in customized subroutines is an
#pod investment in future laziness.
#pod
#pod This also avoids a common form of ugliness seen in many modules: package-level
#pod configuration. That is, you might have seen something like the above
#pod implemented like so:
#pod
#pod use Data::Analyze qw(analyze);
#pod $Data::Analyze::default_tolerance = 0.10;
#pod $Data::Analyze::default_passes = 10;
#pod
#pod This might save time, until you have multiple modules using Data::Analyze.
#pod Because there is only one global configuration, they step on each other's toes
#pod and your code begins to have mysterious errors.
#pod
#pod Generators can also allow you to export class methods to be called as
#pod subroutines:
#pod
#pod package Data::Methodical;
#pod use Sub::Exporter -setup => { exports => { some_method => \&_curry_class } };
#pod
#pod sub _curry_class {
#pod my ($class, $name) = @_;
#pod sub { $class->$name(@_); };
#pod }
#pod
#pod Because of the way that exporters and Sub::Exporter work, any package that
#pod inherits from Data::Methodical can inherit its exporter and override its
#pod C. If a user imports C from that package, he'll
#pod receive a subroutine that calls the method on the subclass, rather than on
#pod Data::Methodical itself. Keep in mind that if you re-setup Sub::Exporter in a
#pod package that inherits from Data::Methodical you will, of course, be entirely
#pod replacing the exporter from Data::Methodical. C is a method, and is
#pod hidden by the same means as any other method.
#pod
#pod =head2 Other Customizations
#pod
#pod Building custom routines with generators isn't the only way that Sub::Exporters
#pod allows the importing code to refine its use of the exported routines. They may
#pod also be renamed to avoid naming collisions.
#pod
#pod Consider the following code:
#pod
#pod # this program determines to which circle of Hell you will be condemned
#pod use Morality qw(sin virtue); # for calculating viciousness
#pod use Math::Trig qw(:all); # for dealing with circles
#pod
#pod The programmer has inadvertently imported two C routines. The solution,
#pod in Exporter.pm-based modules, would be to import only one and then call the
#pod other by its fully-qualified name. Alternately, the importer could write a
#pod routine that did so, or could mess about with typeglobs.
#pod
#pod How much easier to write:
#pod
#pod # this program determines to which circle of Hell you will be condemned
#pod use Morality qw(virtue), sin => { -as => 'offense' };
#pod use Math::Trig -all => { -prefix => 'trig_' };
#pod
#pod and to have at one's disposal C and C -- not to mention
#pod C and C.
#pod
#pod =head1 EXPORTER CONFIGURATION
#pod
#pod You can configure an exporter for your package by using Sub::Exporter like so:
#pod
#pod package Tools;
#pod use Sub::Exporter
#pod -setup => { exports => [ qw(function1 function2 function3) ] };
#pod
#pod This is the simplest way to use the exporter, and is basically equivalent to
#pod this:
#pod
#pod package Tools;
#pod use base qw(Exporter);
#pod our @EXPORT_OK = qw(function1 function2 function3);
#pod
#pod Any basic use of Sub::Exporter will look like this:
#pod
#pod package Tools;
#pod use Sub::Exporter -setup => \%config;
#pod
#pod The following keys are valid in C<%config>:
#pod
#pod exports - a list of routines to provide for exporting; each routine may be
#pod followed by generator
#pod groups - a list of groups to provide for exporting; each must be followed by
#pod either (a) a list of exports, possibly with arguments for each
#pod export, or (b) a generator
#pod
#pod collectors - a list of names into which values are collected for use in
#pod routine generation; each name may be followed by a validator
#pod
#pod In addition to the basic options above, a few more advanced options may be
#pod passed:
#pod
#pod into_level - how far up the caller stack to look for a target (default 0)
#pod into - an explicit target (package) into which to export routines
#pod
#pod In other words: Sub::Exporter installs a C routine which, when called,
#pod exports routines to the calling namespace. The C and C
#pod options change where those exported routines are installed.
#pod
#pod generator - a callback used to produce the code that will be installed
#pod default: Sub::Exporter::default_generator
#pod
#pod installer - a callback used to install the code produced by the generator
#pod default: Sub::Exporter::default_installer
#pod
#pod For information on how these callbacks are used, see the documentation for
#pod C> and C>.
#pod
#pod =head2 Export Configuration
#pod
#pod The C list may be provided as an array reference or a hash reference.
#pod The list is processed in such a way that the following are equivalent:
#pod
#pod { exports => [ qw(foo bar baz), quux => \&quux_generator ] }
#pod
#pod { exports =>
#pod { foo => undef, bar => undef, baz => undef, quux => \&quux_generator } }
#pod
#pod Generators are code that return coderefs. They are called with four
#pod parameters:
#pod
#pod $class - the class whose exporter has been called (the exporting class)
#pod $name - the name of the export for which the routine is being build
#pod \%arg - the arguments passed for this export
#pod \%col - the collections for this import
#pod
#pod Given the configuration in the L, the following C