Class-Autouse-2.02/ 000770 000766 000024 00000000000 15047426332 014403 5 ustar 00ether staff 000000 000000 Class-Autouse-2.02/INSTALL 000644 000766 000024 00000004562 15047426332 015446 0 ustar 00ether staff 000000 000000 This is the Perl distribution Class-Autouse.
Installing Class-Autouse is straightforward.
## Installation with cpanm
If you have cpanm, you only need one line:
% cpanm Class::Autouse
If it does not have permission to install modules to the current perl, cpanm
will automatically set up and install to a local::lib in your home directory.
See the local::lib documentation (https://metacpan.org/pod/local::lib) for
details on enabling it in your environment.
## Installing with the CPAN shell
Alternatively, if your CPAN shell is set up, you should just be able to do:
% cpan Class::Autouse
## Manual installation
As a last resort, you can manually install it. If you have not already
downloaded the release tarball, you can find the download link on the module's
MetaCPAN page: https://metacpan.org/pod/Class::Autouse
Untar the tarball, install configure prerequisites (see below), then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
On Windows platforms, you should use `dmake` or `nmake`, instead of `make`.
If your perl is system-managed, you can create a local::lib in your home
directory to install modules to. For details, see the local::lib documentation:
https://metacpan.org/pod/local::lib
The prerequisites of this distribution will also have to be installed manually. The
prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated
by running the manual build process described above.
## Configure Prerequisites
This distribution requires other modules to be installed before this
distribution's installer can be run. They can be found under the
"configure_requires" key of META.yml or the
"{prereqs}{configure}{requires}" key of META.json.
## Other Prerequisites
This distribution may require additional modules to be installed after running
Makefile.PL.
Look for prerequisites in the following phases:
* to run make, PHASE = build
* to use the module code itself, PHASE = runtime
* to run tests, PHASE = test
They can all be found in the "PHASE_requires" key of MYMETA.yml or the
"{prereqs}{PHASE}{requires}" key of MYMETA.json.
## Documentation
Class-Autouse documentation is available as POD.
You can run `perldoc` from a shell to read the documentation:
% perldoc Class::Autouse
For more information on installing Perl modules via CPAN, please see:
https://www.cpan.org/modules/INSTALL.html
Class-Autouse-2.02/LICENSE 000644 000766 000024 00000046301 15047426332 015417 0 ustar 00ether staff 000000 000000 This software is copyright (c) 2002 by Adam Kennedy.
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) 2002 by Adam Kennedy.
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) 2002 by Adam Kennedy.
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
Class-Autouse-2.02/CONTRIBUTING 000644 000766 000024 00000007514 15047426332 016247 0 ustar 00ether staff 000000 000000
CONTRIBUTING
Thank you for considering contributing to this distribution. This file
contains instructions that will help you work with the source code.
PLEASE NOTE that if you have any questions or difficulties, you can reach the
maintainer(s) through the bug queue described later in this document
(preferred), or by emailing the releaser directly. You are not required to
follow any of the steps in this document to submit a patch or bug report;
these are just recommendations, intended to help you (and help us help you
faster).
The distribution is managed with Dist::Zilla (https://metacpan.org/release/Dist-Zilla).
This means than many of the usual files you might expect are not in the
repository, but are generated at release time (e.g. Makefile.PL).
However, you can run tests directly using the 'prove' tool:
$ prove -l
$ prove -lv t/some_test_file.t
$ prove -lvr t/
In most cases, 'prove' is entirely sufficient for you to test any patches you
have.
You may need to satisfy some dependencies. The easiest way to satisfy
dependencies is to install the last release -- this is available at
https://metacpan.org/release/Class-Autouse
If you use cpanminus, you can do it without downloading the tarball first:
$ cpanm --reinstall --installdeps --with-recommends Class::Autouse
Dist::Zilla is a very powerful authoring tool, but requires a number of
author-specific plugins. If you would like to use it for contributing,
install it from CPAN, then run one of the following commands, depending on
your CPAN client:
$ cpan `dzil authordeps --missing`
or
$ dzil authordeps --missing | cpanm
You should then also install any additional requirements not needed by the
dzil build but may be needed by tests or other development:
$ cpan `dzil listdeps --author --missing`
or
$ dzil listdeps --author --missing | cpanm
Or, you can use the 'dzil stale' command to install all requirements at once:
$ cpan Dist::Zilla::App::Command::stale
$ cpan `dzil stale --all`
or
$ cpanm Dist::Zilla::App::Command::stale
$ dzil stale --all | cpanm
You can also do this via cpanm directly:
$ cpanm --reinstall --installdeps --with-develop --with-recommends Class::Autouse
Once installed, here are some dzil commands you might try:
$ dzil build
$ dzil test
$ dzil test --release
$ dzil xtest
$ dzil listdeps --json
$ dzil build --notgz
You can learn more about Dist::Zilla at http://dzil.org/.
The code for this distribution is hosted at GitHub. The repository is:
https://github.com/karenetheridge/Class-Autouse
You can submit code changes by forking the repository, pushing your code
changes to your clone, and then submitting a pull request. Please include a
suitable end-user-oriented entry in the Changes file describing your change.
Detailed instructions for doing that is available here:
https://help.github.com/articles/creating-a-pull-request
Generated files such as README, CONTRIBUTING, Makefile.PL, LICENSE etc should
*not* be included in your pull request, as they will be updated automatically
during the next release.
If you have found a bug, but do not have an accompanying patch to fix it, you
can submit an issue report here:
https://rt.cpan.org/Public/Dist/Display.html?Name=Class-Autouse
or via email: bug-Class-Autouse@rt.cpan.org
This is a good place to send your questions about the usage of this distribution.
If you send me a patch or pull request, your name and email address will be
included in the documentation as a contributor (using the attribution on the
commit or patch), unless you specifically request for it not to be. If you
wish to be listed under a different name or address, you should submit a pull
request to the .mailmap file to contain the correct mapping.
This file was generated via Dist::Zilla::Plugin::GenerateFile::FromShareDir 0.015
from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.167.
Class-Autouse-2.02/Changes 000640 000766 000024 00000014553 15047426332 015705 0 ustar 00ether staff 000000 000000 Revision history for Perl extension Class-Autouse
2.02 2025-08-14 18:37:11Z
- distribution tooling updates
2.01 Fri 3 Feb 2012
- Removing the use of "defined @array" deprecated in 5.16
2.00 Tue 18 Jan 2011
- Switching to a production release
1.99_04 Thu 13 Jan 2011
- Upgrading to Module::Install::DSL 1.00
- Bumping minimum version of Perl to 5.006
- Fixing indenting, style and layout issues.
- Added debugging entries to all the new code.
- Removed on use of _load_ancestors that was not needed
- Updating copyright a couple of times :/
1.99_03 Fri 4 Jul 2008
- Upgrading to Module::Install 0.76
- Localising $@ during evals
1.99_02 Thu 24 Jan 2008
- Fixing some back-compatibility bugs in the new tests
1.99_01 Tue 15 Jan 2008
- Vast swathes of additional functionality from Scott Smith
1.29 Mon 12 Nov 2007
- No functional changes
- Upgrading to Module::Install 0.68
- Updating to newer author tests
- Removing the use of base.pm
1.28 Tue 17 Jul 2007
- No functional changes
- Upgrading to Module::Install 0.65
- Updating List::Util dependency to 1.19.
(Fixes memory leak AND resolving the Win32 problem listed below)
1.27 Mon 4 Sep 2006
- Upgrading to Module::Install 0.64
1.26 Wed Apr 12 2006
- Debugging change in 1.25 regressed an undocumented 5.6-related
bug first fixed in 1.20. Make sure $DEBUG is always defined
(Michael Schwern)
- Re-introduced the List::Util 1.18 dependency, but stay at 1.17
if on a Win32 (and cygwin, just in case) platform.
- Module::Install updated to pre-release of 0.62
1.25 Fri Apr 7 2006
- Expands the can hook to also hook isa (Michael Schwern)
- Minor change to debugging (Michael Schwern)
- Optimised out the warnings.pm hook change (Michael Schwern)
- Module::Install updated to 0.61
1.24 Fri Jan 13 2006
- No functional changes. No need to upgrade.
- Updated copyright notice to 2006.
- Added t/05_base.t to try and chase down base.pm bug
(Failed to find it, but left test so CPAN Tests can validate my
assumptions on what should happen and that it happens for them)
- Added base.pm as a dep (although unversioned dep) to make sure
it is installed on older perls.
- Module::Install updated to 0.52
- Decrement List::Util dep to 1.17 as 1.18 fails to build on some
platforms.
1.23 Thu Dec 29 2005
- In moving from CVS to SVN I forgot to bring ::Parent with it.
(The tests passed spuriously because it found the old version.)
- Upgraded Module::Install and shrunk Makefile.PL again to reflect
the new features in it.
- Upgraded List::Util dependency to 1.18 because of memory leaks
and problems with non XS versions of functions we use.
1.22 Wed Dec 21 2005
- Apparently generating spurious warnings on Perl 5.8.1
on Mac OS X when using SVK. Tentatively applying solution.
- No change in functionality on any platform.
- No need to upgrade unless you are seeing lots of warnings.
- Rolled back the File::Spec dependency from 0.82 to 0.80
to avoid needless upgrades in some 5.005 and 5.006 situations.
- Moved from older CVS repository to newer SVN repository
- Updated Makefile.PL to Module::Install 0.45
1.21 Wed Sep 28 2005
- Documenting ->autouse(@classes)
- Tidying up the POD a little to refer to features
in an order much more relevant to the reader.
1.20 Tue Aug 18 2005
- Catch and rethrow all error when autoloading during a ->can.
- Debugging can now only be done at compile time, and thus is
optimised out. The :debug flag is removed and instead you need
to preset $Class::Autouse::DEBUG.
Given that this was only for my benefit in the first place, it's
not appropriate to slow down everything else because of it.
1.18 Tue Jul 26 2005
- Added :nostat module to disable the initial stat checks
of modules.
1.17 Tue Mar 8 2005
- Added include('ExtUtils::AutoInstall') by request, to make
life easier when installing svk, although I have NFI why :/
1.16 Tue Feb 15 2005
- Removing braindead pass-through Build.PL file
1.15 Wed Feb 9 2005
- Reorganisation of method order over the last half a dozen
versions allowed some invalid uses of indirect object syntax
to slip in. This was stupid of me, and I've gotten a lot more
explicit in the calling of internal functions now.
1.14 Wed Jan 19 2005
- Allowed a bug to slip in to autouse_recursive (resolved)
- Added regression test for the case
1.13 Tue Jan 11 2005
- Updated copyright date
- Added no_index entry to makefile to prevent indexing A.pm etc
1.12 Mon Nov 15 2004
- A small change to compile properly when prefork not installed
1.11 Sun Nov 14 2004
- Made dependency on prefork optional
- Removed useless $UNIX variable
- A few other housekeeping items
1.10 Sat Nov 13 2004
- Integrated with prefork.pm
- devel loads all outstanding modules when called
- Added some more unit tests
1.04 Mon Jul 6 2004
- Only hijack UNIVERSAL::can for the period that we have
live autoload hooks
- Various other small improvements
1.03 Mon Dec 8 2003
- Adding another couple of minor error validating changes
1.02 Wed Dec 3 2003
- Minor optimisation, and some pod bugs fixed.
1.01 Sun Nov 9 2003
- Another bug in _can
1.0 Sun Sep 21 2003
- Fixed a bug in _can
0.9 Unknown Date
- Unknown Changes
0.8 Unknown Date
- Converted to File::Spec.
- Added Class::Autouse::Parent
- Major changes in the load sequencing to support ->SUPER::
- Lots and lots of general refactoring
0.7 Fri Nov 1 15:52:01 2002
- Debugging Fix
- Remove some warnings
- Documentation updates
0.6 Wed Apr 3 20:31:41 2002
- Fixed a serious bug that was missed.
- Added a load cache to cut back on stat calls
- Minor logic speed ups in recursive code
0.5 Fri Mar 15 20:53:34 2002
- Better, nested debugging messages
- Debug can be enabled in pragma
- One major bug fix
- Various minor speed improvements
0.4 Wed Nov 7 14:03:48 2001
- Added autouse_recursive and load_recursive
- Fixed major bug in class_exists
- Miscellaneous code clean ups
- Cleaned up comments
0.3 Wed Sep 26 23:18:10 2001
- Improved hook and loader efficiency
- Fixed load method. It works now
- Added class_exists method
- Documentation tweaks
0.2 Wed Aug 29 22:14:41 2001
- Code cleaned up and much more solid
- Added developer mode
- Added superloader
- Behaves with Carp properly
0.1 Wed Jan 17 11:46:41 2001
- original version
Class-Autouse-2.02/MANIFEST 000644 000766 000024 00000002401 15047426332 015534 0 ustar 00ether staff 000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.033.
CONTRIBUTING
Changes
INSTALL
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
dist.ini
lib/Class/Autouse.pm
lib/Class/Autouse/Parent.pm
t/00-report-prereqs.dd
t/00-report-prereqs.t
t/01_compile.t
t/02_main.t
t/03_parent.t
t/04_prefork.t
t/05_recursive.t
t/06_base.t
t/07_isa.t
t/08_dynamic.t
t/09_callback_example.t
t/10_recursion.t
t/11_number_in_class_word.t
t/12_callback_no_exist.t
t/13_no_exist.t
t/14_sugar.t
t/15_regex.t
t/lib/A.pm
t/lib/A/B.pm
t/lib/C.pm
t/lib/D.pm
t/lib/E.pm
t/lib/F.pm
t/lib/G.pm
t/lib/H.pm
t/lib/I.pm
t/lib/J.pm
t/lib/T.pm
t/lib/T/A.pm
t/lib/T/B.pm
t/lib/T/B/G.pm
t/lib/baseA.pm
t/lib/baseB.pm
t/lib/baseC.pm
t/lib/baseD.pm
t/modules/A.pm
t/modules/A/B.pm
t/modules/C.pm
t/modules/D.pm
t/modules/E.pm
t/modules/F.pm
t/modules/G.pm
t/modules/H.pm
t/modules/I.pm
t/modules/J.pm
t/modules/T.pm
t/modules/T/A.pm
t/modules/T/B.pm
t/modules/T/B/G.pm
t/modules/baseA.pm
t/modules/baseB.pm
t/modules/baseC.pm
t/modules/baseD.pm
xt/author/00-compile.t
xt/author/clean-namespaces.t
xt/author/distmeta.t
xt/author/kwalitee.t
xt/author/minimum-version.t
xt/author/mojibake.t
xt/author/pod-no404s.t
xt/author/pod-syntax.t
xt/author/portability.t
xt/release/changes_has_content.t
Class-Autouse-2.02/t/ 000770 000766 000024 00000000000 15047426332 014646 5 ustar 00ether staff 000000 000000 Class-Autouse-2.02/xt/ 000770 000766 000024 00000000000 15047426332 015036 5 ustar 00ether staff 000000 000000 Class-Autouse-2.02/README 000644 000766 000024 00000000613 15047426332 015266 0 ustar 00ether staff 000000 000000 This archive contains the distribution Class-Autouse,
version 2.02:
Run-time load a class the first time you call a method in it.
This software is copyright (c) 2002 by Adam Kennedy.
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.033.
Class-Autouse-2.02/META.yml 000644 000766 000024 00000050322 15047426332 015661 0 ustar 00ether staff 000000 000000 ---
abstract: 'Run-time load a class the first time you call a method in it.'
author:
- 'Adam Kennedy '
build_requires:
ExtUtils::MakeMaker: '0'
File::Spec: '0.80'
File::Spec::Functions: '0'
File::Temp: '0'
IO::File: '0'
Test::More: '0'
base: '0'
lib: '0'
perl: '5.006'
warnings: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
perl: '5.006'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.033, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Class-Autouse
no_index:
directory:
- t
- xt
provides:
Class::Autouse:
file: lib/Class/Autouse.pm
version: '2.02'
Class::Autouse::Parent:
file: lib/Class/Autouse/Parent.pm
version: '2.02'
requires:
Carp: '0'
Exporter: '0'
File::Spec: '0.80'
List::Util: '1.18'
Scalar::Util: '0'
UNIVERSAL: '0'
constant: '0'
perl: '5.006'
prefork: '0'
strict: '0'
vars: '0'
resources:
bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Class-Autouse
homepage: https://github.com/karenetheridge/Class-Autouse
repository: https://github.com/karenetheridge/Class-Autouse.git
version: '2.02'
x_Dist_Zilla:
perl:
version: '5.043001'
plugins:
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: develop
type: recommends
name: '@Author::ETHER/pluginbundle version'
version: '6.033'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
Dist::Zilla::Plugin::PromptIfStale:
check_all_plugins: 0
check_all_prereqs: 0
modules:
- Dist::Zilla::PluginBundle::Author::ETHER
phase: build
run_under_travis: 0
skip: []
name: '@Author::ETHER/stale modules, build'
version: '0.060'
-
class: Dist::Zilla::Plugin::FileFinder::ByName
name: '@Author::ETHER/Examples'
version: '6.033'
-
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: '@Author::ETHER/Git::GatherDir'
version: '2.051'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@Author::ETHER/MetaYAML'
version: '6.033'
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@Author::ETHER/MetaJSON'
version: '6.033'
-
class: Dist::Zilla::Plugin::Readme
name: '@Author::ETHER/Readme'
version: '6.033'
-
class: Dist::Zilla::Plugin::Manifest
name: '@Author::ETHER/Manifest'
version: '6.033'
-
class: Dist::Zilla::Plugin::License
name: '@Author::ETHER/License'
version: '6.033'
-
class: Dist::Zilla::Plugin::GenerateFile::FromShareDir
config:
Dist::Zilla::Plugin::GenerateFile::FromShareDir:
destination_filename: CONTRIBUTING
dist: Dist-Zilla-PluginBundle-Author-ETHER
encoding: UTF-8
has_xs: 0
location: build
source_filename: CONTRIBUTING
Dist::Zilla::Role::RepoFileInjector:
allow_overwrite: 1
repo_root: .
version: '0.009'
name: '@Author::ETHER/generate CONTRIBUTING'
version: '0.015'
-
class: Dist::Zilla::Plugin::InstallGuide
config:
Dist::Zilla::Role::ModuleMetadata:
Module::Metadata: '1.000038'
version: '0.006'
name: '@Author::ETHER/InstallGuide'
version: '1.200014'
-
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'
- '@Author::ETHER/Examples'
skips: []
switch: []
name: '@Author::ETHER/Test::Compile'
version: '2.058'
-
class: Dist::Zilla::Plugin::MetaTests
name: '@Author::ETHER/MetaTests'
version: '6.033'
-
class: Dist::Zilla::Plugin::Test::ChangesHasContent
name: '@Author::ETHER/Test::ChangesHasContent'
version: '0.011'
-
class: Dist::Zilla::Plugin::Test::MinimumVersion
config:
Dist::Zilla::Plugin::Test::MinimumVersion:
max_target_perl: '5.006'
name: '@Author::ETHER/Test::MinimumVersion'
version: '2.000011'
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@Author::ETHER/PodSyntaxTests'
version: '6.033'
-
class: Dist::Zilla::Plugin::Test::Pod::No404s
name: '@Author::ETHER/Test::Pod::No404s'
version: '1.004'
-
class: Dist::Zilla::Plugin::Test::Kwalitee
config:
Dist::Zilla::Plugin::Test::Kwalitee:
filename: xt/author/kwalitee.t
skiptest: []
name: '@Author::ETHER/Test::Kwalitee'
version: '2.12'
-
class: Dist::Zilla::Plugin::MojibakeTests
name: '@Author::ETHER/MojibakeTests'
version: '0.8'
-
class: Dist::Zilla::Plugin::Test::ReportPrereqs
name: '@Author::ETHER/Test::ReportPrereqs'
version: '0.029'
-
class: Dist::Zilla::Plugin::Test::Portability
config:
Dist::Zilla::Plugin::Test::Portability:
options: ''
name: '@Author::ETHER/Test::Portability'
version: '2.001003'
-
class: Dist::Zilla::Plugin::Test::CleanNamespaces
config:
Dist::Zilla::Plugin::Test::CleanNamespaces:
filename: xt/author/clean-namespaces.t
skips: []
name: '@Author::ETHER/Test::CleanNamespaces'
version: '0.006'
-
class: Dist::Zilla::Plugin::Git::Describe
name: '@Author::ETHER/Git::Describe'
version: '0.008'
-
class: Dist::Zilla::Plugin::GithubMeta
name: '@Author::ETHER/GithubMeta'
version: '0.58'
-
class: Dist::Zilla::Plugin::AutoMetaResources
name: '@Author::ETHER/AutoMetaResources'
version: '1.21'
-
class: Dist::Zilla::Plugin::Authority
name: '@Author::ETHER/Authority'
version: '1.009'
-
class: Dist::Zilla::Plugin::MetaNoIndex
name: '@Author::ETHER/MetaNoIndex'
version: '6.033'
-
class: Dist::Zilla::Plugin::MetaProvides::Package
config:
Dist::Zilla::Plugin::MetaProvides::Package:
finder:
- ':InstallModules'
finder_objects:
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
version: '6.033'
include_underscores: 0
Dist::Zilla::Role::MetaProvider::Provider:
$Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004'
inherit_missing: 0
inherit_version: 0
meta_noindex: 1
Dist::Zilla::Role::ModuleMetadata:
Module::Metadata: '1.000038'
version: '0.006'
name: '@Author::ETHER/MetaProvides::Package'
version: '2.004003'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@Author::ETHER/MetaConfig'
version: '6.033'
-
class: Dist::Zilla::Plugin::Keywords
config:
Dist::Zilla::Plugin::Keywords:
keywords: []
name: '@Author::ETHER/Keywords'
version: '0.007'
-
class: Dist::Zilla::Plugin::UseUnsafeInc
config:
Dist::Zilla::Plugin::UseUnsafeInc:
dot_in_INC: 0
name: '@Author::ETHER/UseUnsafeInc'
version: '0.002'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@Author::ETHER/AutoPrereqs'
version: '6.033'
-
class: Dist::Zilla::Plugin::Prereqs::AuthorDeps
name: '@Author::ETHER/Prereqs::AuthorDeps'
version: '0.007'
-
class: Dist::Zilla::Plugin::MinimumPerl
name: '@Author::ETHER/MinimumPerl'
version: '1.006'
-
class: Dist::Zilla::Plugin::MakeMaker
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 9
name: '@Author::ETHER/MakeMaker'
version: '6.033'
-
class: Dist::Zilla::Plugin::Git::Contributors
config:
Dist::Zilla::Plugin::Git::Contributors:
git_version: 2.50.1
include_authors: 0
include_releaser: 1
order_by: commits
paths: []
name: '@Author::ETHER/Git::Contributors'
version: '0.038'
-
class: Dist::Zilla::Plugin::StaticInstall
config:
Dist::Zilla::Plugin::StaticInstall:
dry_run: 1
mode: auto
name: '@Author::ETHER/StaticInstall'
version: '0.012'
-
class: Dist::Zilla::Plugin::RunExtraTests
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 9
name: '@Author::ETHER/RunExtraTests'
version: '0.029'
-
class: Dist::Zilla::Plugin::CheckSelfDependency
config:
Dist::Zilla::Plugin::CheckSelfDependency:
finder:
- ':InstallModules'
Dist::Zilla::Role::ModuleMetadata:
Module::Metadata: '1.000038'
version: '0.006'
name: '@Author::ETHER/CheckSelfDependency'
version: '0.011'
-
class: Dist::Zilla::Plugin::Run::AfterBuild
config:
Dist::Zilla::Plugin::Run::Role::Runner:
fatal_errors: 1
quiet: 1
run:
- "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\""
version: '0.050'
name: '@Author::ETHER/.ackrc'
version: '0.050'
-
class: Dist::Zilla::Plugin::Run::AfterBuild
config:
Dist::Zilla::Plugin::Run::Role::Runner:
eval:
- "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }"
fatal_errors: 0
quiet: 1
version: '0.050'
name: '@Author::ETHER/.latest'
version: '0.050'
-
class: Dist::Zilla::Plugin::CheckStrictVersion
name: '@Author::ETHER/CheckStrictVersion'
version: '0.001'
-
class: Dist::Zilla::Plugin::CheckMetaResources
name: '@Author::ETHER/CheckMetaResources'
version: '0.001'
-
class: Dist::Zilla::Plugin::EnsureLatestPerl
config:
Dist::Zilla::Plugin::EnsureLatestPerl:
Module::CoreList: '5.20250720'
name: '@Author::ETHER/EnsureLatestPerl'
version: '0.010'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
Dist::Zilla::Plugin::PromptIfStale:
check_all_plugins: 1
check_all_prereqs: 1
modules: []
phase: release
run_under_travis: 0
skip: []
name: '@Author::ETHER/stale modules, release'
version: '0.060'
-
class: Dist::Zilla::Plugin::Git::Check
config:
Dist::Zilla::Plugin::Git::Check:
untracked_files: die
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty: []
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.50.1
repo_root: .
name: '@Author::ETHER/initial check'
version: '2.051'
-
class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts
config:
Dist::Zilla::Role::Git::Repo:
git_version: 2.50.1
repo_root: .
name: '@Author::ETHER/Git::CheckFor::MergeConflicts'
version: '0.014'
-
class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch
config:
Dist::Zilla::Role::Git::Repo:
git_version: 2.50.1
repo_root: .
name: '@Author::ETHER/Git::CheckFor::CorrectBranch'
version: '0.014'
-
class: Dist::Zilla::Plugin::Git::Remote::Check
name: '@Author::ETHER/Git::Remote::Check'
version: 0.1.2
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@Author::ETHER/CheckPrereqsIndexed'
version: '0.022'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@Author::ETHER/TestRelease'
version: '6.033'
-
class: Dist::Zilla::Plugin::Git::Check
config:
Dist::Zilla::Plugin::Git::Check:
untracked_files: die
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty: []
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.50.1
repo_root: .
name: '@Author::ETHER/after tests'
version: '2.051'
-
class: Dist::Zilla::Plugin::CheckIssues
name: '@Author::ETHER/CheckIssues'
version: '0.011'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@Author::ETHER/UploadToCPAN'
version: '6.033'
-
class: Dist::Zilla::Plugin::CopyFilesFromRelease
config:
Dist::Zilla::Plugin::CopyFilesFromRelease:
filename:
- CONTRIBUTING
- INSTALL
- LICENCE
- LICENSE
- ppport.h
match: []
name: '@Author::ETHER/copy generated files'
version: '0.007'
-
class: Dist::Zilla::Plugin::ReadmeAnyFromPod
config:
Dist::Zilla::Role::FileWatcher:
version: '0.006'
name: '@Author::ETHER/ReadmeAnyFromPod'
version: '0.163250'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: develop
type: recommends
name: '@Author::ETHER/@Git::VersionManager/pluginbundle version'
version: '6.033'
-
class: Dist::Zilla::Plugin::RewriteVersion::Transitional
config:
Dist::Zilla::Plugin::RewriteVersion:
add_tarball_name: 0
finders:
- ':ExecFiles'
- ':InstallModules'
global: 1
skip_version_provider: 0
Dist::Zilla::Plugin::RewriteVersion::Transitional: {}
name: '@Author::ETHER/@Git::VersionManager/RewriteVersion::Transitional'
version: '0.009'
-
class: Dist::Zilla::Plugin::MetaProvides::Update
name: '@Author::ETHER/@Git::VersionManager/MetaProvides::Update'
version: '0.007'
-
class: Dist::Zilla::Plugin::CopyFilesFromRelease
config:
Dist::Zilla::Plugin::CopyFilesFromRelease:
filename:
- Changes
match: []
name: '@Author::ETHER/@Git::VersionManager/CopyFilesFromRelease'
version: '0.007'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
Dist::Zilla::Plugin::Git::Commit:
add_files_in:
- .
commit_msg: '%N-%v%t%n%n%c'
signoff: 0
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Changes
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.50.1
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::ETHER/@Git::VersionManager/release snapshot'
version: '2.051'
-
class: Dist::Zilla::Plugin::Git::Tag
config:
Dist::Zilla::Plugin::Git::Tag:
branch: ~
changelog: Changes
signed: 0
tag: v2.02
tag_format: v%V
tag_message: v%v%t
Dist::Zilla::Role::Git::Repo:
git_version: 2.50.1
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::ETHER/@Git::VersionManager/Git::Tag'
version: '2.051'
-
class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional
config:
Dist::Zilla::Plugin::BumpVersionAfterRelease:
finders:
- ':InstallModules'
global: 1
munge_makefile_pl: 1
Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {}
name: '@Author::ETHER/@Git::VersionManager/BumpVersionAfterRelease::Transitional'
version: '0.009'
-
class: Dist::Zilla::Plugin::NextRelease
name: '@Author::ETHER/@Git::VersionManager/NextRelease'
version: '6.033'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
Dist::Zilla::Plugin::Git::Commit:
add_files_in: []
commit_msg: 'increment $VERSION after %v release'
signoff: 0
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Build.PL
- Changes
- Makefile.PL
allow_dirty_match:
- (?^:^lib/.*\.pm$)
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.50.1
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::ETHER/@Git::VersionManager/post-release commit'
version: '2.051'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: x_Dist_Zilla
type: requires
name: '@Author::ETHER/@Git::VersionManager/prereqs for @Git::VersionManager'
version: '6.033'
-
class: Dist::Zilla::Plugin::Git::Push
config:
Dist::Zilla::Plugin::Git::Push:
push_to:
- origin
remotes_must_exist: 1
Dist::Zilla::Role::Git::Repo:
git_version: 2.50.1
repo_root: .
name: '@Author::ETHER/Git::Push'
version: '2.051'
-
class: Dist::Zilla::Plugin::GitHub::Update
config:
Dist::Zilla::Plugin::GitHub::Update:
metacpan: 1
name: '@Author::ETHER/GitHub::Update'
version: '0.49'
-
class: Dist::Zilla::Plugin::Run::AfterRelease
config:
Dist::Zilla::Plugin::Run::Role::Runner:
fatal_errors: 0
quiet: 0
run:
- REDACTED
version: '0.050'
name: '@Author::ETHER/install release'
version: '0.050'
-
class: Dist::Zilla::Plugin::Run::AfterRelease
config:
Dist::Zilla::Plugin::Run::Role::Runner:
eval:
- 'print "release complete!\xa"'
fatal_errors: 1
quiet: 1
version: '0.050'
name: '@Author::ETHER/release complete'
version: '0.050'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@Author::ETHER/ConfirmRelease'
version: '6.033'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: x_Dist_Zilla
type: requires
name: '@Author::ETHER/prereqs for @Author::ETHER'
version: '6.033'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
version: '6.033'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
version: '6.033'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
version: '6.033'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExtraTestFiles'
version: '6.033'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
version: '6.033'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':PerlExecFiles'
version: '6.033'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
version: '6.033'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
version: '6.033'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
version: '6.033'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
version: '6.033'
-
class: Dist::Zilla::Plugin::VerifyPhases
name: '@Author::ETHER/PHASE VERIFICATION'
version: '0.016'
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
version: '6.033'
x_authority: cpan:ADAMK
x_contributors:
- 'Adam Kennedy '
- 'Scott Smith '
- 'Alexandr Ciornii '
- 'Karen Etheridge '
x_generated_by_perl: v5.43.1
x_serialization_backend: 'YAML::Tiny version 1.76'
x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
x_use_unsafe_inc: 0
Class-Autouse-2.02/lib/ 000770 000766 000024 00000000000 15047426332 015151 5 ustar 00ether staff 000000 000000 Class-Autouse-2.02/Makefile.PL 000644 000766 000024 00000003357 15047426332 016370 0 ustar 00ether staff 000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.033.
use strict;
use warnings;
use 5.006;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "Run-time load a class the first time you call a method in it.",
"AUTHOR" => "Adam Kennedy ",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Class-Autouse",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.006",
"NAME" => "Class::Autouse",
"PREREQ_PM" => {
"Carp" => 0,
"Exporter" => 0,
"File::Spec" => "0.80",
"List::Util" => "1.18",
"Scalar::Util" => 0,
"UNIVERSAL" => 0,
"constant" => 0,
"prefork" => 0,
"strict" => 0,
"vars" => 0
},
"TEST_REQUIRES" => {
"ExtUtils::MakeMaker" => 0,
"File::Spec" => "0.80",
"File::Spec::Functions" => 0,
"File::Temp" => 0,
"IO::File" => 0,
"Test::More" => 0,
"base" => 0,
"lib" => 0,
"warnings" => 0
},
"VERSION" => "2.02",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Carp" => 0,
"Exporter" => 0,
"ExtUtils::MakeMaker" => 0,
"File::Spec" => "0.80",
"File::Spec::Functions" => 0,
"File::Temp" => 0,
"IO::File" => 0,
"List::Util" => "1.18",
"Scalar::Util" => 0,
"Test::More" => 0,
"UNIVERSAL" => 0,
"base" => 0,
"constant" => 0,
"lib" => 0,
"prefork" => 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);
Class-Autouse-2.02/META.json 000644 000766 000024 00000106441 15047426332 016035 0 ustar 00ether staff 000000 000000 {
"abstract" : "Run-time load a class the first time you call a method in it.",
"author" : [
"Adam Kennedy "
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.033, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
},
"name" : "Class-Autouse",
"no_index" : {
"directory" : [
"t",
"xt"
]
},
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0",
"perl" : "5.006"
}
},
"develop" : {
"recommends" : {
"Dist::Zilla::PluginBundle::Author::ETHER" : "0.167",
"Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007"
},
"requires" : {
"Encode" : "0",
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Test::CPAN::Meta" : "0",
"Test::CleanNamespaces" : "0.15",
"Test::Kwalitee" : "1.21",
"Test::MinimumVersion" : "0",
"Test::Mojibake" : "0",
"Test::More" : "0.94",
"Test::Pod" : "1.41",
"Test::Pod::No404s" : "0",
"Test::Portability::Files" : "0",
"warnings" : "0"
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
"Exporter" : "0",
"File::Spec" : "0.80",
"List::Util" : "1.18",
"Scalar::Util" : "0",
"UNIVERSAL" : "0",
"constant" : "0",
"perl" : "5.006",
"prefork" : "0",
"strict" : "0",
"vars" : "0"
}
},
"test" : {
"recommends" : {
"CPAN::Meta" : "2.120900"
},
"requires" : {
"ExtUtils::MakeMaker" : "0",
"File::Spec" : "0.80",
"File::Spec::Functions" : "0",
"File::Temp" : "0",
"IO::File" : "0",
"Test::More" : "0",
"base" : "0",
"lib" : "0",
"perl" : "5.006",
"warnings" : "0"
}
},
"x_Dist_Zilla" : {
"requires" : {
"Dist::Zilla" : "5",
"Dist::Zilla::Plugin::Authority" : "1.009",
"Dist::Zilla::Plugin::AutoMetaResources" : "0",
"Dist::Zilla::Plugin::AutoPrereqs" : "5.038",
"Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : "0.004",
"Dist::Zilla::Plugin::CheckIssues" : "0",
"Dist::Zilla::Plugin::CheckMetaResources" : "0",
"Dist::Zilla::Plugin::CheckPrereqsIndexed" : "0.019",
"Dist::Zilla::Plugin::CheckSelfDependency" : "0",
"Dist::Zilla::Plugin::CheckStrictVersion" : "0",
"Dist::Zilla::Plugin::ConfirmRelease" : "0",
"Dist::Zilla::Plugin::CopyFilesFromRelease" : "0",
"Dist::Zilla::Plugin::EnsureLatestPerl" : "0",
"Dist::Zilla::Plugin::FileFinder::ByName" : "0",
"Dist::Zilla::Plugin::GenerateFile::FromShareDir" : "0",
"Dist::Zilla::Plugin::Git::Check" : "0",
"Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch" : "0.004",
"Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts" : "0",
"Dist::Zilla::Plugin::Git::Commit" : "2.020",
"Dist::Zilla::Plugin::Git::Contributors" : "0.029",
"Dist::Zilla::Plugin::Git::Describe" : "0.004",
"Dist::Zilla::Plugin::Git::GatherDir" : "2.016",
"Dist::Zilla::Plugin::Git::Push" : "0",
"Dist::Zilla::Plugin::Git::Remote::Check" : "0",
"Dist::Zilla::Plugin::Git::Tag" : "0",
"Dist::Zilla::Plugin::GitHub::Update" : "0.40",
"Dist::Zilla::Plugin::GithubMeta" : "0.54",
"Dist::Zilla::Plugin::InstallGuide" : "1.200005",
"Dist::Zilla::Plugin::Keywords" : "0.004",
"Dist::Zilla::Plugin::License" : "5.038",
"Dist::Zilla::Plugin::MakeMaker" : "0",
"Dist::Zilla::Plugin::Manifest" : "0",
"Dist::Zilla::Plugin::MetaConfig" : "0",
"Dist::Zilla::Plugin::MetaJSON" : "0",
"Dist::Zilla::Plugin::MetaNoIndex" : "0",
"Dist::Zilla::Plugin::MetaProvides::Package" : "1.15000002",
"Dist::Zilla::Plugin::MetaTests" : "0",
"Dist::Zilla::Plugin::MetaYAML" : "0",
"Dist::Zilla::Plugin::MinimumPerl" : "1.006",
"Dist::Zilla::Plugin::MojibakeTests" : "0.8",
"Dist::Zilla::Plugin::NextRelease" : "5.033",
"Dist::Zilla::Plugin::PodSyntaxTests" : "5.040",
"Dist::Zilla::Plugin::Prereqs" : "0",
"Dist::Zilla::Plugin::Prereqs::AuthorDeps" : "0.006",
"Dist::Zilla::Plugin::PromptIfStale" : "0",
"Dist::Zilla::Plugin::Readme" : "0",
"Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.142180",
"Dist::Zilla::Plugin::RewriteVersion::Transitional" : "0.006",
"Dist::Zilla::Plugin::Run::AfterBuild" : "0.041",
"Dist::Zilla::Plugin::Run::AfterRelease" : "0.038",
"Dist::Zilla::Plugin::RunExtraTests" : "0.024",
"Dist::Zilla::Plugin::StaticInstall" : "0.005",
"Dist::Zilla::Plugin::Test::ChangesHasContent" : "0",
"Dist::Zilla::Plugin::Test::CleanNamespaces" : "0.006",
"Dist::Zilla::Plugin::Test::Compile" : "2.039",
"Dist::Zilla::Plugin::Test::Kwalitee" : "2.10",
"Dist::Zilla::Plugin::Test::MinimumVersion" : "2.000010",
"Dist::Zilla::Plugin::Test::Pod::No404s" : "1.003",
"Dist::Zilla::Plugin::Test::Portability" : "2.000007",
"Dist::Zilla::Plugin::Test::ReportPrereqs" : "0.022",
"Dist::Zilla::Plugin::TestRelease" : "0",
"Dist::Zilla::Plugin::UploadToCPAN" : "0",
"Dist::Zilla::Plugin::UseUnsafeInc" : "0",
"Dist::Zilla::PluginBundle::Author::ETHER" : "0.119",
"Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007",
"Software::License::Perl_5" : "0"
}
}
},
"provides" : {
"Class::Autouse" : {
"file" : "lib/Class/Autouse.pm",
"version" : "2.02"
},
"Class::Autouse::Parent" : {
"file" : "lib/Class/Autouse/Parent.pm",
"version" : "2.02"
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"mailto" : "bug-Class-Autouse@rt.cpan.org",
"web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Class-Autouse"
},
"homepage" : "https://github.com/karenetheridge/Class-Autouse",
"repository" : {
"type" : "git",
"url" : "https://github.com/karenetheridge/Class-Autouse.git",
"web" : "https://github.com/karenetheridge/Class-Autouse"
}
},
"version" : "2.02",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.043001"
},
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "develop",
"type" : "recommends"
}
},
"name" : "@Author::ETHER/pluginbundle version",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
"config" : {
"Dist::Zilla::Plugin::PromptIfStale" : {
"check_all_plugins" : 0,
"check_all_prereqs" : 0,
"modules" : [
"Dist::Zilla::PluginBundle::Author::ETHER"
],
"phase" : "build",
"run_under_travis" : 0,
"skip" : []
}
},
"name" : "@Author::ETHER/stale modules, build",
"version" : "0.060"
},
{
"class" : "Dist::Zilla::Plugin::FileFinder::ByName",
"name" : "@Author::ETHER/Examples",
"version" : "6.033"
},
{
"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" : "@Author::ETHER/Git::GatherDir",
"version" : "2.051"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@Author::ETHER/MetaYAML",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@Author::ETHER/MetaJSON",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@Author::ETHER/Readme",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@Author::ETHER/Manifest",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@Author::ETHER/License",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::GenerateFile::FromShareDir",
"config" : {
"Dist::Zilla::Plugin::GenerateFile::FromShareDir" : {
"destination_filename" : "CONTRIBUTING",
"dist" : "Dist-Zilla-PluginBundle-Author-ETHER",
"encoding" : "UTF-8",
"has_xs" : 0,
"location" : "build",
"source_filename" : "CONTRIBUTING"
},
"Dist::Zilla::Role::RepoFileInjector" : {
"allow_overwrite" : 1,
"repo_root" : ".",
"version" : "0.009"
}
},
"name" : "@Author::ETHER/generate CONTRIBUTING",
"version" : "0.015"
},
{
"class" : "Dist::Zilla::Plugin::InstallGuide",
"config" : {
"Dist::Zilla::Role::ModuleMetadata" : {
"Module::Metadata" : "1.000038",
"version" : "0.006"
}
},
"name" : "@Author::ETHER/InstallGuide",
"version" : "1.200014"
},
{
"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",
"@Author::ETHER/Examples"
],
"skips" : [],
"switch" : []
}
},
"name" : "@Author::ETHER/Test::Compile",
"version" : "2.058"
},
{
"class" : "Dist::Zilla::Plugin::MetaTests",
"name" : "@Author::ETHER/MetaTests",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Test::ChangesHasContent",
"name" : "@Author::ETHER/Test::ChangesHasContent",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::Test::MinimumVersion",
"config" : {
"Dist::Zilla::Plugin::Test::MinimumVersion" : {
"max_target_perl" : "5.006"
}
},
"name" : "@Author::ETHER/Test::MinimumVersion",
"version" : "2.000011"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@Author::ETHER/PodSyntaxTests",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Test::Pod::No404s",
"name" : "@Author::ETHER/Test::Pod::No404s",
"version" : "1.004"
},
{
"class" : "Dist::Zilla::Plugin::Test::Kwalitee",
"config" : {
"Dist::Zilla::Plugin::Test::Kwalitee" : {
"filename" : "xt/author/kwalitee.t",
"skiptest" : []
}
},
"name" : "@Author::ETHER/Test::Kwalitee",
"version" : "2.12"
},
{
"class" : "Dist::Zilla::Plugin::MojibakeTests",
"name" : "@Author::ETHER/MojibakeTests",
"version" : "0.8"
},
{
"class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
"name" : "@Author::ETHER/Test::ReportPrereqs",
"version" : "0.029"
},
{
"class" : "Dist::Zilla::Plugin::Test::Portability",
"config" : {
"Dist::Zilla::Plugin::Test::Portability" : {
"options" : ""
}
},
"name" : "@Author::ETHER/Test::Portability",
"version" : "2.001003"
},
{
"class" : "Dist::Zilla::Plugin::Test::CleanNamespaces",
"config" : {
"Dist::Zilla::Plugin::Test::CleanNamespaces" : {
"filename" : "xt/author/clean-namespaces.t",
"skips" : []
}
},
"name" : "@Author::ETHER/Test::CleanNamespaces",
"version" : "0.006"
},
{
"class" : "Dist::Zilla::Plugin::Git::Describe",
"name" : "@Author::ETHER/Git::Describe",
"version" : "0.008"
},
{
"class" : "Dist::Zilla::Plugin::GithubMeta",
"name" : "@Author::ETHER/GithubMeta",
"version" : "0.58"
},
{
"class" : "Dist::Zilla::Plugin::AutoMetaResources",
"name" : "@Author::ETHER/AutoMetaResources",
"version" : "1.21"
},
{
"class" : "Dist::Zilla::Plugin::Authority",
"name" : "@Author::ETHER/Authority",
"version" : "1.009"
},
{
"class" : "Dist::Zilla::Plugin::MetaNoIndex",
"name" : "@Author::ETHER/MetaNoIndex",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::MetaProvides::Package",
"config" : {
"Dist::Zilla::Plugin::MetaProvides::Package" : {
"finder" : [
":InstallModules"
],
"finder_objects" : [
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
"version" : "6.033"
}
],
"include_underscores" : 0
},
"Dist::Zilla::Role::MetaProvider::Provider" : {
"$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004",
"inherit_missing" : 0,
"inherit_version" : 0,
"meta_noindex" : 1
},
"Dist::Zilla::Role::ModuleMetadata" : {
"Module::Metadata" : "1.000038",
"version" : "0.006"
}
},
"name" : "@Author::ETHER/MetaProvides::Package",
"version" : "2.004003"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Author::ETHER/MetaConfig",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Keywords",
"config" : {
"Dist::Zilla::Plugin::Keywords" : {
"keywords" : []
}
},
"name" : "@Author::ETHER/Keywords",
"version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::UseUnsafeInc",
"config" : {
"Dist::Zilla::Plugin::UseUnsafeInc" : {
"dot_in_INC" : 0
}
},
"name" : "@Author::ETHER/UseUnsafeInc",
"version" : "0.002"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@Author::ETHER/AutoPrereqs",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps",
"name" : "@Author::ETHER/Prereqs::AuthorDeps",
"version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::MinimumPerl",
"name" : "@Author::ETHER/MinimumPerl",
"version" : "1.006"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 9
}
},
"name" : "@Author::ETHER/MakeMaker",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Git::Contributors",
"config" : {
"Dist::Zilla::Plugin::Git::Contributors" : {
"git_version" : "2.50.1",
"include_authors" : 0,
"include_releaser" : 1,
"order_by" : "commits",
"paths" : []
}
},
"name" : "@Author::ETHER/Git::Contributors",
"version" : "0.038"
},
{
"class" : "Dist::Zilla::Plugin::StaticInstall",
"config" : {
"Dist::Zilla::Plugin::StaticInstall" : {
"dry_run" : 1,
"mode" : "auto"
}
},
"name" : "@Author::ETHER/StaticInstall",
"version" : "0.012"
},
{
"class" : "Dist::Zilla::Plugin::RunExtraTests",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 9
}
},
"name" : "@Author::ETHER/RunExtraTests",
"version" : "0.029"
},
{
"class" : "Dist::Zilla::Plugin::CheckSelfDependency",
"config" : {
"Dist::Zilla::Plugin::CheckSelfDependency" : {
"finder" : [
":InstallModules"
]
},
"Dist::Zilla::Role::ModuleMetadata" : {
"Module::Metadata" : "1.000038",
"version" : "0.006"
}
},
"name" : "@Author::ETHER/CheckSelfDependency",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::Run::AfterBuild",
"config" : {
"Dist::Zilla::Plugin::Run::Role::Runner" : {
"fatal_errors" : 1,
"quiet" : 1,
"run" : [
"bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\""
],
"version" : "0.050"
}
},
"name" : "@Author::ETHER/.ackrc",
"version" : "0.050"
},
{
"class" : "Dist::Zilla::Plugin::Run::AfterBuild",
"config" : {
"Dist::Zilla::Plugin::Run::Role::Runner" : {
"eval" : [
"if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }"
],
"fatal_errors" : 0,
"quiet" : 1,
"version" : "0.050"
}
},
"name" : "@Author::ETHER/.latest",
"version" : "0.050"
},
{
"class" : "Dist::Zilla::Plugin::CheckStrictVersion",
"name" : "@Author::ETHER/CheckStrictVersion",
"version" : "0.001"
},
{
"class" : "Dist::Zilla::Plugin::CheckMetaResources",
"name" : "@Author::ETHER/CheckMetaResources",
"version" : "0.001"
},
{
"class" : "Dist::Zilla::Plugin::EnsureLatestPerl",
"config" : {
"Dist::Zilla::Plugin::EnsureLatestPerl" : {
"Module::CoreList" : "5.20250720"
}
},
"name" : "@Author::ETHER/EnsureLatestPerl",
"version" : "0.010"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
"config" : {
"Dist::Zilla::Plugin::PromptIfStale" : {
"check_all_plugins" : 1,
"check_all_prereqs" : 1,
"modules" : [],
"phase" : "release",
"run_under_travis" : 0,
"skip" : []
}
},
"name" : "@Author::ETHER/stale modules, release",
"version" : "0.060"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"config" : {
"Dist::Zilla::Plugin::Git::Check" : {
"untracked_files" : "die"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1",
"repo_root" : "."
}
},
"name" : "@Author::ETHER/initial check",
"version" : "2.051"
},
{
"class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts",
"config" : {
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1",
"repo_root" : "."
}
},
"name" : "@Author::ETHER/Git::CheckFor::MergeConflicts",
"version" : "0.014"
},
{
"class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch",
"config" : {
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1",
"repo_root" : "."
}
},
"name" : "@Author::ETHER/Git::CheckFor::CorrectBranch",
"version" : "0.014"
},
{
"class" : "Dist::Zilla::Plugin::Git::Remote::Check",
"name" : "@Author::ETHER/Git::Remote::Check",
"version" : "0.1.2"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@Author::ETHER/CheckPrereqsIndexed",
"version" : "0.022"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@Author::ETHER/TestRelease",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"config" : {
"Dist::Zilla::Plugin::Git::Check" : {
"untracked_files" : "die"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1",
"repo_root" : "."
}
},
"name" : "@Author::ETHER/after tests",
"version" : "2.051"
},
{
"class" : "Dist::Zilla::Plugin::CheckIssues",
"name" : "@Author::ETHER/CheckIssues",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@Author::ETHER/UploadToCPAN",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::CopyFilesFromRelease",
"config" : {
"Dist::Zilla::Plugin::CopyFilesFromRelease" : {
"filename" : [
"CONTRIBUTING",
"INSTALL",
"LICENCE",
"LICENSE",
"ppport.h"
],
"match" : []
}
},
"name" : "@Author::ETHER/copy generated files",
"version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod",
"config" : {
"Dist::Zilla::Role::FileWatcher" : {
"version" : "0.006"
}
},
"name" : "@Author::ETHER/ReadmeAnyFromPod",
"version" : "0.163250"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "develop",
"type" : "recommends"
}
},
"name" : "@Author::ETHER/@Git::VersionManager/pluginbundle version",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional",
"config" : {
"Dist::Zilla::Plugin::RewriteVersion" : {
"add_tarball_name" : 0,
"finders" : [
":ExecFiles",
":InstallModules"
],
"global" : 1,
"skip_version_provider" : 0
},
"Dist::Zilla::Plugin::RewriteVersion::Transitional" : {}
},
"name" : "@Author::ETHER/@Git::VersionManager/RewriteVersion::Transitional",
"version" : "0.009"
},
{
"class" : "Dist::Zilla::Plugin::MetaProvides::Update",
"name" : "@Author::ETHER/@Git::VersionManager/MetaProvides::Update",
"version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::CopyFilesFromRelease",
"config" : {
"Dist::Zilla::Plugin::CopyFilesFromRelease" : {
"filename" : [
"Changes"
],
"match" : []
}
},
"name" : "@Author::ETHER/@Git::VersionManager/CopyFilesFromRelease",
"version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"config" : {
"Dist::Zilla::Plugin::Git::Commit" : {
"add_files_in" : [
"."
],
"commit_msg" : "%N-%v%t%n%n%c",
"signoff" : 0
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [
"Changes"
],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::ETHER/@Git::VersionManager/release snapshot",
"version" : "2.051"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"config" : {
"Dist::Zilla::Plugin::Git::Tag" : {
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
"tag" : "v2.02",
"tag_format" : "v%V",
"tag_message" : "v%v%t"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::ETHER/@Git::VersionManager/Git::Tag",
"version" : "2.051"
},
{
"class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional",
"config" : {
"Dist::Zilla::Plugin::BumpVersionAfterRelease" : {
"finders" : [
":InstallModules"
],
"global" : 1,
"munge_makefile_pl" : 1
},
"Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {}
},
"name" : "@Author::ETHER/@Git::VersionManager/BumpVersionAfterRelease::Transitional",
"version" : "0.009"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@Author::ETHER/@Git::VersionManager/NextRelease",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"config" : {
"Dist::Zilla::Plugin::Git::Commit" : {
"add_files_in" : [],
"commit_msg" : "increment $VERSION after %v release",
"signoff" : 0
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [
"Build.PL",
"Changes",
"Makefile.PL"
],
"allow_dirty_match" : [
"(?^:^lib/.*\\.pm$)"
],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::ETHER/@Git::VersionManager/post-release commit",
"version" : "2.051"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "x_Dist_Zilla",
"type" : "requires"
}
},
"name" : "@Author::ETHER/@Git::VersionManager/prereqs for @Git::VersionManager",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
"config" : {
"Dist::Zilla::Plugin::Git::Push" : {
"push_to" : [
"origin"
],
"remotes_must_exist" : 1
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.50.1",
"repo_root" : "."
}
},
"name" : "@Author::ETHER/Git::Push",
"version" : "2.051"
},
{
"class" : "Dist::Zilla::Plugin::GitHub::Update",
"config" : {
"Dist::Zilla::Plugin::GitHub::Update" : {
"metacpan" : 1
}
},
"name" : "@Author::ETHER/GitHub::Update",
"version" : "0.49"
},
{
"class" : "Dist::Zilla::Plugin::Run::AfterRelease",
"config" : {
"Dist::Zilla::Plugin::Run::Role::Runner" : {
"fatal_errors" : 0,
"quiet" : 0,
"run" : [
"REDACTED"
],
"version" : "0.050"
}
},
"name" : "@Author::ETHER/install release",
"version" : "0.050"
},
{
"class" : "Dist::Zilla::Plugin::Run::AfterRelease",
"config" : {
"Dist::Zilla::Plugin::Run::Role::Runner" : {
"eval" : [
"print \"release complete!\\xa\""
],
"fatal_errors" : 1,
"quiet" : 1,
"version" : "0.050"
}
},
"name" : "@Author::ETHER/release complete",
"version" : "0.050"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@Author::ETHER/ConfirmRelease",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "x_Dist_Zilla",
"type" : "requires"
}
},
"name" : "@Author::ETHER/prereqs for @Author::ETHER",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExtraTestFiles",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":PerlExecFiles",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
"version" : "6.033"
},
{
"class" : "Dist::Zilla::Plugin::VerifyPhases",
"name" : "@Author::ETHER/PHASE VERIFICATION",
"version" : "0.016"
}
],
"zilla" : {
"class" : "Dist::Zilla::Dist::Builder",
"config" : {
"is_trial" : 0
},
"version" : "6.033"
}
},
"x_authority" : "cpan:ADAMK",
"x_contributors" : [
"Adam Kennedy ",
"Scott Smith ",
"Alexandr Ciornii ",
"Karen Etheridge "
],
"x_generated_by_perl" : "v5.43.1",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.39",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_use_unsafe_inc" : 0
}
Class-Autouse-2.02/dist.ini 000640 000766 000024 00000000676 15047426332 016057 0 ustar 00ether staff 000000 000000 name = Class-Autouse
author = Adam Kennedy
copyright_holder = Adam Kennedy
copyright_year = 2002
license = Perl_5
[@Author::ETHER]
:version = 0.119
authority = cpan:ADAMK
installer = MakeMaker
-remove = PodWeaver
-remove = Test::EOL
-remove = Test::NoTabs
-remove = PodCoverageTests
-remove = Test::Pod::Coverage::TrustMe
-remove = Test::PodSpelling
-remove = Test::CPAN::Changes
Class-Autouse-2.02/lib/Class/ 000770 000766 000024 00000000000 15047426332 016216 5 ustar 00ether staff 000000 000000 Class-Autouse-2.02/lib/Class/Autouse/ 000770 000766 000024 00000000000 15047426332 017643 5 ustar 00ether staff 000000 000000 Class-Autouse-2.02/lib/Class/Autouse.pm 000750 000766 000024 00000114166 15047426332 020213 0 ustar 00ether staff 000000 000000 package Class::Autouse; # git description: c42b80d
# See POD at end of file for documentation
use 5.006;
use strict;
no strict 'refs'; # We _really_ abuse refs :)
use UNIVERSAL ();
# Load required modules
# Luckily, these are so common they are basically free
use Carp ();
use Exporter ();
use File::Spec 0.80 ();
use List::Util 1.18 ();
use Scalar::Util ();
# Globals
use vars qw{ $VERSION @ISA $DB $DEBUG };
use vars qw{ $DEVEL $SUPERLOAD $NOSTAT $NOPREBLESS $STATICISA }; # Load environment
use vars qw{ %SPECIAL %LOADED %BAD %TRIED_CLASS %TRIED_METHOD }; # Special cases
use vars qw{ @LOADERS @SUGAR $HOOKS $ORIGINAL_CAN $ORIGINAL_ISA }; # Working information
# Handle optimisation switches via constants to allow debugging and
# similar functions to be optimised out at compile time if not in use.
BEGIN {
$DB = 0 unless defined &DB::DB;
$DEBUG = 0 unless defined $DEBUG;
}
use constant DB => !! $DB;
use constant DEBUG => !! $DEBUG;
print "Class::Autouse -> Debugging Activated.\n" if DEBUG;
our $VERSION = '2.02';
# Compile-time Initialisation and Optimisation
BEGIN {
# Become an exporter so we don't get complaints when we act as a pragma.
# I don't fully understand the reason for this, but it works and I can't
# recall how to replicate the problem, so leaving it in to avoid any
# possible reversion. Besides, so many things use Exporter it should
# be practically free to do this.
@ISA = qw{ Exporter };
# We always start with the superloader off
$SUPERLOAD = 0;
# When set, disables $obj->isa/can where $obj is blessed before its class is loaded
# Things will operate more quickly when set, but this breaks things if you're
# unserializing objects from Data::Dumper, etc., and relying on this module to
# load the related classes on demand.
$NOPREBLESS = 0;
# Disable stating for situations where modules are on remote disks
$NOSTAT = 0;
# AUTOLOAD hook counter
$HOOKS = 0;
# ERRATA
# Special classes are internal and should be left alone.
# Loaded modules are those already loaded by us.
# Bad classes are those that are incompatible with us.
%BAD = map { $_ => 1 } qw{
IO::File
};
%SPECIAL = map { $_ => 1 } qw{
CORE main UNIVERSAL
ARRAY HASH SCALAR REF GLOB
};
%LOADED = map { $_ => 1 } qw{
UNIVERSAL
Carp
Exporter
File::Spec
List::Util
Scalar::Util
Class::Autouse
};
# "Have we tried to autoload a class before?"
# Per-class loop protection and improved shortcutting.
# Defaults to specials+preloaded to prevent attempting them.
%TRIED_CLASS = ( %SPECIAL, %LOADED );
# "Have we tried to autoload a method before?"
# Per-method loop protection and improved shortcutting
%TRIED_METHOD = ();
# Storage for dynamic loaders (regular and sugar)
@LOADERS = ();
@SUGAR = ();
# We play with UNIVERSAL:: functions, so save backup copies
$ORIGINAL_CAN = \&UNIVERSAL::can;
$ORIGINAL_ISA = \&UNIVERSAL::isa;
}
#####################################################################
# Configuration and Setting up
# Developer mode flag.
# Cannot be turned off once turned on.
sub devel {
_debug(\@_, 1) if DEBUG;
# Enable if not already
return 1 if $DEVEL++;
# Load any unloaded modules.
# Most of the time there should be nothing here.
foreach my $class ( grep { $INC{$_} eq 'Class::Autouse' } keys %INC ) {
$class =~ s/\//::/;
$class =~ s/\.pm$//i;
Class::Autouse->load($class);
}
}
# Happy Fun Super Loader!
# The process here is to replace the &UNIVERSAL::AUTOLOAD sub
# ( which is just a dummy by default ) with a flexible class loader.
sub superloader {
_debug(\@_, 1) if DEBUG;
# Shortcut if needed
return 1 if $SUPERLOAD++;
# Enable the global hooks
_GLOBAL_HOOKS();
return 1;
}
sub sugar {
# Operate as a function or a method
shift if $_[0] eq 'Class::Autouse';
# Ignore calls with no arguments
return 1 unless @_;
_debug(\@_) if DEBUG;
foreach my $callback ( grep { $_ } @_ ) {
# Handle a callback or regex
unless ( ref $callback eq 'CODE' ) {
die(
__PACKAGE__
. ' takes a code reference for syntactic sugar handlers'
. ": unexpected value $callback has type "
. ref($callback)
);
}
push @SUGAR, $callback;
# Enable global hooking
_GLOBAL_HOOKS();
}
return 1;
}
# The main autouse sub
sub autouse {
# Operate as a function or a method
shift if $_[0] eq 'Class::Autouse';
# Ignore calls with no arguments
return 1 unless @_;
_debug(\@_) if DEBUG;
foreach my $class ( grep { $_ } @_ ) {
if ( ref $class ) {
unless ( ref $class eq 'Regexp' or ref $class eq 'CODE') {
die( __PACKAGE__
. ' can autouse explicit class names, or take a regex or subroutine reference'
. ": unexpected value $class has type "
. ref($class)
);
}
push @LOADERS, $class;
# Enable the global hooks
_GLOBAL_HOOKS();
# Reset shortcut cache, since we may have previously
# tried a class and failed, which could now work
%TRIED_CLASS = ( %SPECIAL, %LOADED );
next;
}
# Control flag handling
if ( substr($class, 0, 1) eq ':' ) {
if ( $class eq ':superloader' ) {
# Turn on the superloader
Class::Autouse->superloader;
} elsif ( $class eq ':devel' ) {
# Turn on devel mode
Class::Autouse->devel(1);
} elsif ( $class eq ':nostat' ) {
# Disable stat checks
$NOSTAT = 1;
} elsif ( $class eq ':noprebless') {
# Disable support for objects blessed before their class module is loaded
$NOPREBLESS = 1;
} elsif ( $class eq ':staticisa') {
# Expect that @ISA won't change after loading
# This allows some performance tweaks
$STATICISA = 1;
}
next;
}
# Load now if in devel mode, or if its a bad class
if ( $DEVEL || $BAD{$class} ) {
Class::Autouse->load($class);
next;
}
# Does the file for the class exist?
my $file = _class_file($class);
next if exists $INC{$file};
unless ( $NOSTAT or _file_exists($file) ) {
my $inc = join ', ', @INC;
_cry("Can't locate $file in \@INC (\@INC contains: $inc)");
}
# Don't actually do anything if the superloader is on.
# It will catch all AUTOLOAD calls.
next if $SUPERLOAD;
# Add the AUTOLOAD hook and %INC lock to prevent 'use'ing
*{"${class}::AUTOLOAD"} = \&_AUTOLOAD;
$INC{$file} = 'Class::Autouse';
# When we add the first hook, hijack UNIVERSAL::can/isa
_UPDATE_HOOKS() unless $HOOKS++;
}
return 1;
}
# Import behaves the same as autouse
sub import {
shift->autouse(@_);
}
#####################################################################
# Explicit Actions
# Completely load a class ( The class and all its dependencies ).
sub load {
_debug(\@_, 1) if DEBUG;
my $class = $_[1] or _cry('No class name specified to load');
return 1 if $LOADED{$class};
my @search = _super( $class, \&_load );
# If called an an array context, return the ISA tree.
# In scalar context, just return true.
wantarray ? @search : 1;
}
# Is a particular class installed in out @INC somewhere
# OR is it loaded in our program already
sub class_exists {
_debug(\@_, 1) if DEBUG;
_namespace_occupied($_[1]) or _file_exists($_[1]);
}
# A more general method to answer the question
# "Can I call a method on this class and expect it to work"
# Returns undef if the class does not exist
# Returns 0 if the class is not loaded ( or autouse'd )
# Returns 1 if the class can be used.
sub can_call_methods {
_debug(\@_, 1) if DEBUG;
_namespace_occupied($_[1]) or exists $INC{_class_file($_[1])};
}
# Recursive methods currently only work withing the scope of the single @INC
# entry containing the "top" module, and will probably stay this way
# Autouse not only a class, but all others below it.
sub autouse_recursive {
_debug(\@_, 1) if DEBUG;
# Just load if in devel mode
return Class::Autouse->load_recursive($_[1]) if $DEVEL;
# Don't need to do anything if the super loader is on
return 1 if $SUPERLOAD;
# Find all the child classes, and hand them to the autouse method
Class::Autouse->autouse( $_[1], _children($_[1]) );
}
# Load not only a class and all others below it
sub load_recursive {
_debug(\@_, 1) if DEBUG;
# Load the parent class, and its children
foreach ( $_[1], _children($_[1]) ) {
Class::Autouse->load($_);
}
return 1;
}
#####################################################################
# Symbol Table Hooks
# These get hooked to various places on the symbol table,
# to enable the autoload functionality
# Linked to each individual class via the symbol table
sub _AUTOLOAD {
_debug(\@_, 0, ", AUTOLOAD = '$Class::Autouse::AUTOLOAD'") if DEBUG;
# Loop detection (just in case)
my $method = $Class::Autouse::AUTOLOAD or _cry('Missing method name');
_cry("Undefined subroutine &$method called") if ++$TRIED_METHOD{$method} > 10;
# Don't bother with special classes
my ($class, $function) = $method =~ m/^(.*)::(.*)\z/s;
_cry("Undefined subroutine &$method called") if $SPECIAL{$class};
# Load the class and it's dependancies, and get the search path
my @search = Class::Autouse->load($class);
# Find and go to the named method
my $found = List::Util::first {
defined *{"${_}::$function"}{CODE}
} @search;
goto &{"${found}::$function"} if $found;
# Check for package AUTOLOADs
foreach my $c ( @search ) {
if ( defined *{"${c}::AUTOLOAD"}{CODE} ) {
# Simulate a normal autoload call
${"${c}::AUTOLOAD"} = $method;
goto &{"${c}::AUTOLOAD"};
}
}
# Can't find the method anywhere. Throw the same error Perl does.
_cry("Can't locate object method \"$function\" via package \"$class\"");
}
# This is a special version of the above for use in UNIVERSAL
# It does the :superloader, and/or also any regex or callback (code ref) loaders
sub _UNIVERSAL_AUTOLOAD {
_debug(\@_, 0, ", \$AUTOLOAD = '$Class::Autouse::AUTOLOAD'") if DEBUG;
# Loop detection ( Just in case )
my $method = $Class::Autouse::AUTOLOAD or _cry('Missing method name');
_cry("Undefined subroutine &$method called") if ++$TRIED_METHOD{ $method } > 10;
# Don't bother with special classes
my ($class, $function) = $method =~ m/^(.*)::(.*)\z/s;
_cry("Undefined subroutine &$method called") if $SPECIAL{$class};
my @search;
if ( $SUPERLOAD ) {
# Only try direct loading of the class if the superloader is active.
# This might be installed in universal for either the superloader, special loaders, or both.
# Load the class and it's dependancies, and get the search path
@search = Class::Autouse->load($class);
}
unless ( @search ) {
# The special loaders will attempt to dynamically instantiate the class.
# They will not fire if the superloader is turned on and has already loaded the class.
if ( _try_loaders($class, $function, @_) ) {
my $fref = $ORIGINAL_CAN->($class, $function);
if ( $fref ) {
goto $fref;
} else {
@search = _super($class);
}
}
}
# Find and go to the named method
my $found = List::Util::first { defined *{"${_}::$function"}{CODE} } @search;
goto &{"${found}::$function"} if $found;
# Check for package AUTOLOADs
foreach my $c ( @search ) {
if ( defined *{"${c}::AUTOLOAD"}{CODE} ) {
# Simulate a normal autoload call
${"${c}::AUTOLOAD"} = $method;
goto &{"${c}::AUTOLOAD"};
}
}
for my $callback ( @SUGAR ) {
my $rv = $callback->( $class, $function, @_ );
goto $rv if $rv;
}
# Can't find the method anywhere. Throw the same error Perl does.
_cry("Can't locate object method \"$function\" via package \"$class\"");
}
# This just handles the call and does nothing.
# It prevents destroy calls going through to the AUTOLOAD hooks.
sub _UNIVERSAL_DESTROY {
_debug(\@_) if DEBUG;
}
sub _isa {
# Optional performance hack
goto $ORIGINAL_ISA if ref $_[0] and $NOPREBLESS;
# Load the class, unless we are sure it is already
my $class = ref $_[0] || $_[0] || return undef;
unless ( $TRIED_CLASS{$class} or $LOADED{$class} ) {
_preload($_[0]);
}
goto &{$ORIGINAL_ISA};
}
# This is the replacement for UNIVERSAL::can
sub _can {
# Optional performance hack
goto $ORIGINAL_CAN if ref $_[0] and $NOPREBLESS;
# Load the class, unless we are sure it is already
my $class = ref $_[0] || $_[0] || return undef;
unless ( $TRIED_CLASS{$class} or $LOADED{$class} ) {
_preload($_[0]);
}
goto &{$ORIGINAL_CAN};
}
#####################################################################
# Support Functions
sub _preload {
_debug(\@_) if DEBUG;
# Does it look like a package?
my $class = ref $_[0] || $_[0];
unless ( $class and $class =~ /^[^\W\d]\w*(?:(?:\'|::)[^\W]\w*)*$/o ) {
return $LOADED{$class} = 1;
}
# Do we try to load the class
my $load = 0;
my $file = _class_file($class);
if ( defined $INC{$file} and $INC{$file} eq 'Class::Autouse' ) {
# It's an autoused class
$load = 1;
} elsif ( ! $SUPERLOAD ) {
# Superloader isn't on, don't load
$load = 0;
} elsif ( _namespace_occupied($class) ) {
# Superloader is on, but there is something already in the class
# This can't be the autouse loader, because we would have caught
# that case already.
$load = 0;
} else {
# The rules of the superloader say we assume loaded unless we can
# tell otherwise. Thus, we have to have a go at loading.
$load = 1;
}
# If needed, load the class and all its dependencies.
Class::Autouse->load($class) if $load;
unless ( $LOADED{$class} ) {
_try_loaders($class);
unless ( $LOADED{$class} ) {
if ( _namespace_occupied($class) ) {
# The class is not flagged as loaded by autouse, but exists
# to ensure its ancestry is loaded before calling $orig
$LOADED{$class} = 1;
_load_ancestors($class);
}
}
}
return 1;
}
sub _try_loaders {
_debug(\@_, 0) if DEBUG;
my ($class, $function, @optional_args) = @_;
# The function and args are only present to help callbacks whose main goal is to
# do "syntactic sugar" instead of really writing a class
# This allows us to shortcut out of re-checking a class
$TRIED_CLASS{$class}++;
if ( _namespace_occupied($class) ) {
$LOADED{$class} = 1;
_load_ancestors($class);
return 1;
}
# Try each of the special loaders, if there are any.
for my $loader ( @LOADERS ) {
my $ref = ref($loader);
if ( $ref ) {
if ( $ref eq "Regexp" ) {
next unless $class =~ $loader;
my $file = _class_file($class);
next unless grep { -e $_ . '/' . $file } @INC;
local $^W = 0;
local $@;
eval "use $class";
die "Class::Autouse found module $file for class $class matching regex '$loader',"
. " but it failed to compile with the following error: $@" if $@;
} elsif ( $ref eq "CODE" ) {
unless ( $loader->( $class,$function,@optional_args ) ) {
next;
}
} else {
die "Unexpected loader. Expected qr//, sub{}, or class name string."
}
$LOADED{$class} = 1;
_load_ancestors($class);
return 1;
} else {
die "Odd loader $loader passed to " . __PACKAGE__;
}
}
return;
}
# This is called after any class is hit by load/preload to ensure that parent classes are also loaded
sub _load_ancestors {
_debug(\@_, 0) if DEBUG;
my $class = $_[0];
my ($this_class,@ancestors) = _super($class);
for my $ancestor ( @ancestors ) {
# this is a bit ugly, _preload presumes either isa or can is being called,
# and does a goto at the end of it, we just want the core logic, not the redirection
# so we pass undef as the subref parameter
_preload($ancestor);
}
if ( $STATICISA ) {
# Optional performance optimization.
# After we have the entire ancestry,
# set the greatest grandparent's can/isa to the originals.
# This keeps the versions in this module from being used where they're not needed.
my $final_parent = $ancestors[-1] || $this_class;
no strict 'refs';
*{ $final_parent . '::can'} = $ORIGINAL_CAN;
*{ $final_parent . '::isa'} = $ORIGINAL_ISA;
}
return 1;
}
# This walks the @ISA tree, optionally calling a subref on each class
# and returns the inherited classes in a list, including $class itself.
sub _super {
_debug(\@_) if DEBUG;
my $class = shift;
my $load = shift;
my @stack = ( $class );
my %seen = ( UNIVERSAL => 1 );
my @search = ();
while ( my $c = shift @stack ) {
next if $seen{$c}++;
# This may load the class in question, so
# we call it before checking @ISA.
if ( $load and not $LOADED{$c} ) {
$load->($c);
}
# Add the class to the search list,
# and add the @ISA to the load stack.
push @search, $c;
unshift @stack, @{"${c}::ISA"};
}
return @search;
}
# Load a single class
sub _load ($) {
_debug(\@_) if DEBUG;
# Don't attempt to load special classes
my $class = shift or _cry('Did not specify a class to load');
$TRIED_CLASS{$class}++;
return 1 if $SPECIAL{$class};
# Run some checks
my $file = _class_file($class);
if ( defined $INC{$file} ) {
# If the %INC lock is set to any other value, the file is
# already loaded. We do not need to do anything.
if ( $INC{$file} ne 'Class::Autouse') {
return $LOADED{$class} = 1;
}
# Because we autoused it earlier, we know the file for this
# class MUST exist.
# Removing the AUTOLOAD hook and %INC lock is all we have to do
delete ${"${class}::"}{'AUTOLOAD'};
delete $INC{$file};
} elsif ( not _file_exists($file) ) {
# We might still be loaded, if the class was defined
# in some other module without it's own file.
if ( _namespace_occupied($class) ) {
return $LOADED{$class} = 1;
}
# Not loaded and no file either.
# Try to generate the class instead.
if ( _try_loaders($class) ) {
return 1;
}
# We've run out of options, it just doesn't exist
my $inc = join ', ', @INC;
_cry("Can't locate $file in \@INC (\@INC contains: $inc)");
}
# Load the file for this class
print _depth(1) . " Class::Autouse::load -> Loading in $file\n" if DEBUG;
eval {
CORE::require($file);
};
_cry($@) if $@;
# Give back UNIVERSAL::can/isa if there are no other hooks
--$HOOKS or _UPDATE_HOOKS();
$LOADED{$class} = 1;
_load_ancestors($class);
return 1;
}
# Find all the child classes for a parent class.
# Returns in the list context.
sub _children ($) {
_debug(\@_) if DEBUG;
# Find where it is in @INC
my $base_file = _class_file(shift);
my $inc_path = List::Util::first {
-f File::Spec->catfile($_, $base_file)
} @INC or return;
# Does the file have a subdirectory
# i.e. Are there child classes
my $child_path = substr( $base_file, 0, length($base_file) - 3 );
my $child_path_full = File::Spec->catdir( $inc_path, $child_path );
return 0 unless -d $child_path_full and -r _;
# Main scan loop
local *FILELIST;
my ($dir, @files, @modules) = ();
my @queue = ( $child_path );
while ( $dir = pop @queue ) {
my $full_dir = File::Spec->catdir($inc_path, $dir);
# Read in the raw file list
# Skip directories we can't open
opendir( FILELIST, $full_dir ) or next;
@files = readdir FILELIST;
closedir FILELIST;
# Iterate over them
@files = map { File::Spec->catfile($dir, $_) } # Full relative path
grep { ! /^\./ } @files; # Ignore hidden files
foreach my $file ( @files ) {
my $full_file = File::Spec->catfile($inc_path, $file);
# Add to the queue if its a directory we can descend
if ( -d $full_file and -r _ ) {
push @queue, $file;
next;
}
# We only want .pm files we can read
next unless substr( $file, length($file) - 3 ) eq '.pm';
next unless -f _;
push @modules, $file;
}
}
# Convert the file names into modules
map { join '::', File::Spec->splitdir($_) }
map { substr($_, 0, length($_) - 3) } @modules;
}
#####################################################################
# Private support methods
# Does a class or file exists somewhere in our include path. For
# convenience, returns the unresolved file name ( even if passed a class )
sub _file_exists ($) {
_debug(\@_) if DEBUG;
# What are we looking for?
my $file = shift or return undef;
return undef if $file =~ m/(?:\012|\015)/o;
# If provided a class name, convert it
$file = _class_file($file) if $file =~ /::/o;
# Scan @INC for the file
foreach ( @INC ) {
next if ref $_ eq 'CODE';
return $file if -f File::Spec->catfile($_, $file);
}
undef;
}
# Is a namespace occupied by anything significant
sub _namespace_occupied ($) {
_debug(\@_) if DEBUG;
# Handle the most likely case
my $class = shift or return undef;
return 1 if @{"${class}::ISA"};
# Get the list of glob names, ignoring namespaces
foreach ( keys %{"${class}::"} ) {
next if substr($_, -2) eq '::';
# Only check for methods, since that's all that's reliable
if (defined *{"${class}::$_"}{CODE}) {
if ($_ eq 'AUTOLOAD' and \&{"${class}::$_"} == \&_AUTOLOAD) {
# This is a Class::Autouse hook. Ignore.
next;
}
return 1;
}
}
'';
}
# For a given class, get the file name
sub _class_file ($) {
join( '/', split /(?:\'|::)/, shift ) . '.pm';
}
# Establish our call depth
sub _depth {
my $spaces = shift;
if ( DEBUG and ! $spaces ) {
_debug(\@_);
}
# Search up the caller stack to find the first call that isn't us.
my $level = 0;
while( $level++ < 1000 ) {
my @call = caller($level);
if ( @call ) {
next if $call[3] eq '(eval)';
next if $call[3] =~ /^Class::Autouse::\w+\z/;
}
# Subtract 1 for this sub's call
$level -= 1;
return $spaces ? join( '', (' ') x ($level - 2)) : $level;
}
Carp::croak('Infinite loop trying to find call depth');
}
# Die gracefully
sub _cry {
_debug() if DEBUG;
local $Carp::CarpLevel = $Carp::CarpLevel;
$Carp::CarpLevel += _depth();
$_[0] =~ s/\s+at\s+\S+Autouse\.pm line \d+\.$//;
Carp::croak($_[0]);
}
# Adaptive debug print generation
BEGIN {
eval <<'END_DEBUG' if DEBUG;
sub _debug {
my $args = shift;
my $method = !! shift;
my $message = shift || '';
my @c = caller(1);
my $msg = _depth(1) . $c[3];
if ( ref $args ) {
my @mapped = map { defined $_ ? "'$_'" : 'undef' } @$args;
shift @mapped if $method;
$msg .= @mapped ? '( ' . ( join ', ', @mapped ) . ' )' : '()';
}
print "$msg$message\n";
}
END_DEBUG
}
#####################################################################
# Final Initialisation
# The _UPDATE_HOOKS function is intended to turn our hijacking of UNIVERSAL::can
# on or off, depending on whether we have any live hooks. The idea being, if we
# don't have any live hooks, why bother intercepting UNIVERSAL::can calls?
sub _UPDATE_HOOKS () {
local $^W = 0;
*UNIVERSAL::can = $HOOKS ? \&_can : $ORIGINAL_CAN;
*UNIVERSAL::isa = $HOOKS ? \&_isa : $ORIGINAL_ISA;
}
# The _GLOBAL_HOOKS function turns on the universal autoloader hooks
sub _GLOBAL_HOOKS () {
return if \&UNIVERSAL::AUTOLOAD == \&_UNIVERSAL_AUTOLOAD;
# Overwrite UNIVERSAL::AUTOLOAD and catch any
# UNIVERSAL::DESTROY calls so they don't trigger
# UNIVERSAL::AUTOLOAD. Anyone handling DESTROY calls
# via an AUTOLOAD should be summarily shot.
*UNIVERSAL::AUTOLOAD = \&_UNIVERSAL_AUTOLOAD;
*UNIVERSAL::DESTROY = \&_UNIVERSAL_DESTROY;
# Because this will never go away, we increment $HOOKS such
# that it will never be decremented, and thus the
# UNIVERSAL::can/isa hijack will never be removed.
_UPDATE_HOOKS() unless $HOOKS++;
}
BEGIN {
# Optional integration with prefork.pm (if installed)
local $@;
eval { require prefork };
if ( $@ ) {
# prefork is not installed.
# Do manual detection of mod_perl
$DEVEL = 1 if $ENV{MOD_PERL};
} else {
# Go into devel mode when prefork is enabled
$LOADED{prefork} = 1;
local $@;
eval "prefork::notify( sub { Class::Autouse->devel(1) } )";
die $@ if $@;
}
}
1;
__END__
=pod
=head1 NAME
Class::Autouse - Run-time load a class the first time you call a method in it.
=head1 SYNOPSIS
##################################################################
# SAFE FEATURES
# Debugging (if you go that way) must be set before the first use
BEGIN {
$Class::Autouse::DEBUG = 1;
}
# Turn on developer mode (always load immediately)
use Class::Autouse qw{:devel};
# Load a class on method call
use Class::Autouse;
Class::Autouse->autouse( 'CGI' );
print CGI->b('Wow!');
# Use as a pragma
use Class::Autouse qw{CGI};
# Use a whole module tree
Class::Autouse->autouse_recursive('Acme');
# Disable module-existance check, and thus one additional 'stat'
# per module, at autouse-time if loading modules off a remote
# network drive such as NFS or SMB.
# (See below for other performance optimizations.)
use Class::Autouse qw{:nostat};
##################################################################
# UNSAFE FEATURES
# Turn on the Super Loader (load all classes on demand)
use Class::Autouse qw{:superloader};
# Autouse classes matching a given regular expression
use Class::Autouse qr/::Test$/;
# Install a class generator (instead of overriding UNIVERSAL::AUTOLOAD)
# (See below for a detailed example)
use Class::Autouse \&my_class_generator;
# Add a manual callback to UNIVERSAL::AUTOLOAD for syntactic sugar
Class::Autouse->sugar(\&my_magic);
=head1 DESCRIPTION
B is a runtime class loader that allows you to specify
classes that will only load when a method of that class is called.
For large classes or class trees that might not be used during the running
of a program, such as L, this can save you large amounts of
memory, and decrease the script load time a great deal.
B also provides a number of "unsafe" features for runtime
generation of classes and implementation of syntactic sugar. These features
make use of (evil) UNIVERSAL::AUTOLOAD hooking, and are implemented in
this class because these hooks can only be done by a one module, and
Class::Autouse serves as a useful place to centralise this kind of evil :)
=head2 Class, not Module
The terminology "class loading" instead of "module loading" is used
intentionally. Modules will only be loaded if they are acting as a class.
That is, they will only be loaded during a Class-Emethod call. If you try
to use a subroutine directly, say with C, the class will
not be loaded and a fatal error will mostly likely occur.
This limitation is made to allow more powerfull features in other areas,
because we can focus on just loading the modules, and not have
to deal with importing.
And really, if you are doing OO Perl, you should be avoiding importing
wherever possible.
=head2 Use as a pragma
Class::Autouse can be used as a pragma, specifying a list of classes
to load as the arguments. For example
use Class::Autouse qw{CGI Data::Manip This::That};
is equivalent to
use Class::Autouse;
Class::Autouse->autouse( 'CGI' );
Class::Autouse->autouse( 'Data::Manip' );
Class::Autouse->autouse( 'This::That' );
=head2 Developer Mode
C features a developer mode. In developer mode, classes
are loaded immediately, just like they would be with a normal 'use'
statement (although the import sub isn't called).
This allows error checking to be done while developing, at the expense of
a larger memory overhead. Developer mode is turned on either with the
C method, or using :devel in any of the pragma arguments.
For example, this would load CGI.pm immediately
use Class::Autouse qw{:devel CGI};
While developer mode is roughly equivalent to just using a normal use
command, for a large number of modules it lets you use autoloading
notation, and just comment or uncomment a single line to turn developer
mode on or off. You can leave it on during development, and turn it
off for speed reasons when deploying.
=head2 Recursive Loading
As an alternative to the super loader, the C and
C methods can be used to autouse or load an entire tree
of classes.
For example, the following would give you access to all the L
related classes installed on the machine.
Class::Autouse->autouse_recursive( 'URI' );
Please note that the loadings will only occur down a single branch of the
include path, whichever the top class is located in.
=head2 No-Stat Mode
For situations where a module exists on a remote disk or another relatively
expensive location, you can call C with the :nostat param
to disable initial file existance checking at hook time.
# Disable autoload-time file existance checking
use Class::Autouse qw{:nostat};
=head2 Super Loader Mode
Turning on the C super loader allows you to automatically
load B class without specifying it first. Thus, the following will
work and is completely legal.
use Class::Autouse qw{:superloader};
print CGI->b('Wow!');
The super loader can be turned on with either the
C>superloader> method, or the C<:superloader> pragma
argument.
Please note that unlike the normal one-at-a-time autoloading, the
super-loader makes global changes, and so is not completely self-contained.
It has the potential to cause unintended effects at a distance. If you
encounter unusual behaviour, revert to autousing one-at-a-time, or use
the recursive loading.
Use of the Super Loader is highly discouraged for widely distributed
public applications or modules unless unavoidable. B just
to be lazy and save a few lines of code.
=head2 Loading with Regular Expressions
As another alternative to the superloader and recursive loading, a compiled
regular expression (qr//) can be supplied as a loader. Note that this
loader implements UNIVERSAL::AUTOLOAD, and has the same side effects as the
superloader.
=head2 Registering a Callback for Dynamic Class Creation
If none of the above are sufficient, a CODE reference can be given
to Class::Autouse. Any attempt to call a method on a missing class
will launch each registered callback until one returns true.
Since overriding UNIVERSAL::AUTOLOAD can be done only once in a given
Perl application, this feature allows UNIVERSAL::AUTOLOAD to be shared.
Please use this instead of implementing your own UNIVERSAL::AUTOLOAD.
See the warnings under the L above which
apply to all of the features which override UNIVERSAL::AUTOLOAD.
It is up to the callback to define the class, the details of which
are beyond the scope of this document. See the example below for
a quick reference:
=head3 Callback Example
Any use of a class like Foo::Wrapper autogenerates that class as a proxy
around Foo.
use Class::Autouse sub {
my ($class) = @_;
if ($class =~ /(^.*)::Wrapper/) {
my $wrapped_class = $1;
eval "package $class; use Class::AutoloadCAN;";
die $@ if $@;
no strict 'refs';
*{$class . '::new' } = sub {
my $class = shift;
my $proxy = $wrapped_class->new(@_);
my $self = bless({proxy => $proxy},$class);
return $self;
};
*{$class . '::CAN' } = sub {
my ($obj,$method) = @_;
my $delegate = $wrapped_class->can($method);
return unless $delegate;
my $delegator = sub {
my $self = shift;
if (ref($self)) {
return $self->{proxy}->$method(@_);
}
else {
return $wrapped_class->$method(@_);
}
};
return *{ $class . '::' . $method } = $delegator;
};
return 1;
}
return;
};
package Foo;
sub new { my $class = shift; bless({@_},$class); }
sub class_method { 123 }
sub instance_method {
my ($self,$v) = @_;
return $v * $self->some_property
}
sub some_property { shift->{some_property} }
package main;
my $x = Foo::Wrapper->new(
some_property => 111,
);
print $x->some_property,"\n";
print $x->instance_method(5),"\n";
print Foo::Wrapper->class_method,"\n";
=head2 sugar
This method is provided to support "syntactic sugar": allowing the developer
to put things into Perl which do not look like regular Perl. There are
several ways to do this in Perl. Strategies which require overriding
UNIVERSAL::AUTOLOAD can use this interface instead to share that method
with the superloader, and with class gnerators.
When Perl is unable to find a subroutine/method, and all of the class loaders
are exhausted, callbacks registered via sugar() are called. The callbacks
recieve the class name, method name, and parameters of the call.
If the callback returns nothing, Class::Autouse will continue to iterate through
other callbacks. The first callback which returns a true value will
end iteration. That value is expected to be a CODE reference which will respond
to the AUTOLOAD call.
Note: The sugar callback(s) will only be fired by UNIVERSAL::AUTOLOAD after all
other attempts at loading the class are done, and after attempts to use regular
AUTOLOAD to handle the method call. It is never fired by isa() or can(). It
will fire repatedly for the same class. To generate classes, use the
regular CODE ref support in autouse().
=head3 Syntactic Sugar Example
use Class::Autouse;
Class::Autouse->sugar(
sub {
my $caller = caller(1);
my ($class,$method,@params) = @_;
shift @params;
my @words = ($method,$class,@params);
my $sentence = join(" ",@words);
return sub { $sentence };
}
);
$x = trolls have big ugly hairy feet;
print $x,"\n";
# trolls have big ugly hairy feet
=head2 mod_perl
The mechanism that C uses is not compatible with L.
In particular with reloader modules like L. C
detects the presence of mod_perl and acts as normal, but will always load
all classes immediately, equivalent to having developer mode enabled.
This is actually beneficial, as under mod_perl classes should be preloaded
in the parent mod_perl process anyway, to prevent them having to be loaded
by the Apache child classes. It also saves HUGE amounts of memory.
Note that dynamically generated classes and classes loaded via regex CANNOT
be pre-loaded automatically before forking child processes. They will still
be loaded on demand, often in the child process. See L below.
=head2 prefork
As with mod_perl, C is compatible with the L module,
and all modules specifically autoloaded will be loaded before forking correctly,
when requested by L.
Since modules generated via callback or regex cannot be loaded automatically
by prefork in a generic way, it's advised to use prefork directly to load/generate
classes when using mod_perl.
=head2 Performance Optimizatons
=over
=item :nostat
Described above, this option is useful when the module in question is on
remote disk.
=item :noprebless
When set, Class::Autouse presumes that objects which are already blessed
have their class loaded.
This is true in most cases, but will break if the developer intends to
reconstitute serialized objects from Data::Dumper, FreezeThaw or its
cousins, and has configured Class::Autouse to load the involved classes
just-in-time.
=item :staticisa
When set, presumes that @ISA will not change for a class once it is loaded.
The greatest grandparent of a class will be given back the original can/isa
implementations which are faster than those Class::Autouse installs into
UNIVERSAL. This is a performance tweak useful in most cases, but is left
off by default to prevent obscure bugs.
=back
=head2 The Internal Debugger
Class::Autouse provides an internal debugger, which can be used to debug
any weird edge cases you might encounter when using it.
If the C<$Class::Autouse::DEBUG> variable is true when C
is first loaded, debugging will be compiled in. This debugging prints
output like the following to STDOUT.
Class::Autouse::autouse_recursive( 'Foo' )
Class::Autouse::_recursive( 'Foo', 'load' )
Class::Autouse::load( 'Foo' )
Class::Autouse::_children( 'Foo' )
Class::Autouse::load( 'Foo::Bar' )
Class::Autouse::_file_exists( 'Foo/Bar.pm' )
Class::Autouse::load -> Loading in Foo/Bar.pm
Class::Autouse::load( 'Foo::More' )
etc...
Please note that because this is optimised out if not used, you can
no longer (since 1.20) enable debugging at run-time. This decision was
made to remove a large number of unneeded branching and speed up loading.
=head1 METHODS
=head2 autouse $class, ...
The autouse method sets one or more classes to be loaded as required.
=head2 load $class
The load method loads one or more classes into memory. This is functionally
equivalent to using require to load the class list in, except that load
will detect and remove the autoloading hook from a previously autoused
class, whereas as use effectively ignore the class, and not load it.
=head2 devel
The devel method sets development mode on (argument of 1) or off
(argument of 0).
If any classes have previously been autouse'd and not loaded when this
method is called, they will be loaded immediately.
=head2 superloader
The superloader method turns on the super loader.
Please note that once you have turned the superloader on, it cannot be
turned off. This is due to code that might be relying on it being there not
being able to autoload its classes when another piece of code decides
they don't want it any more, and turns the superloader off.
=head2 class_exists $class
Handy method when doing the sort of jobs that C does. Given
a class name, it will return true if the class can be loaded ( i.e. in @INC ),
false if the class can't be loaded, and undef if the class name is invalid.
Note that this does not actually load the class, just tests to see if it can
be loaded. Loading can still fail. For a more comprehensive set of methods
of this nature, see L.
=head2 autouse_recursive $class
The same as the C method, but autouses recursively.
=head2 load_recursive $class
The same as the C method, but loads recursively. Great for checking that
a large class tree that might not always be loaded will load correctly.
=head1 SUPPORT
Bugs should be always be reported via the CPAN bug tracker at
L
For other issues, or commercial enhancement or support, contact the author.
=head1 AUTHORS
Adam Kennedy Ecpan@ali.asE
Scott Smith Esakoht@cpan.orgE
Rob Napier Ernapier@employees.orgE
=head1 SEE ALSO
L, L
=head1 COPYRIGHT
Copyright 2002 - 2012 Adam Kennedy.
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the
LICENSE file included with this module.
=cut
Class-Autouse-2.02/lib/Class/Autouse/Parent.pm 000750 000766 000024 00000001366 15047426332 021441 0 ustar 00ether staff 000000 000000 package Class::Autouse::Parent;
# The package Class::Autouse::Parent can be inherited from to implement
# a parent class. That is, a class who's primary job is to load a series
# classes below it.
use 5.006;
use strict;
use Class::Autouse ();
our $VERSION = '2.02';
# Anti-loop protection.
# Maintain flags for "is the class in the process of loading"
my %LOADING = ();
sub import {
# If the parent value is ourselves, we were just
# 'use'd, not 'base'd.
my $parent = $_[0] ne __PACKAGE__ ? shift : return 1;
# Don't load if already loading
return 1 if $LOADING{$parent};
# Autoload in our children
$LOADING{$parent} = 1;
Class::Autouse->autouse_recursive($parent);
delete $LOADING{$parent};
return 1;
}
1;
Class-Autouse-2.02/xt/author/ 000770 000766 000024 00000000000 15047426332 016340 5 ustar 00ether staff 000000 000000 Class-Autouse-2.02/xt/release/ 000770 000766 000024 00000000000 15047426332 016456 5 ustar 00ether staff 000000 000000 Class-Autouse-2.02/xt/release/changes_has_content.t 000644 000766 000024 00000002100 15047426332 022634 0 ustar 00ether staff 000000 000000 use Test::More tests => 2;
note 'Checking Changes';
my $changes_file = 'Changes';
my $newver = '2.02';
my $trial_token = '-TRIAL';
my $encoding = 'UTF-8';
SKIP: {
ok(-e $changes_file, "$changes_file file exists")
or skip 'Changes is missing', 1;
ok(_get_changes($newver), "$changes_file has content for $newver");
}
done_testing;
sub _get_changes
{
my $newver = shift;
# parse changelog to find commit message
open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!";
my $changelog = join('', <$fh>);
if ($encoding) {
require Encode;
$changelog = Encode::decode($encoding, $changelog, Encode::FB_CROAK());
}
close $fh;
my @content =
grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented
split /\n/, $changelog;
shift @content; # drop the version line
# drop unindented last line and trailing blank lines
pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ );
# return number of non-blank lines
return scalar @content;
}
Class-Autouse-2.02/xt/author/mojibake.t 000644 000766 000024 00000000151 15047426332 020306 0 ustar 00ether staff 000000 000000 #!perl
use strict;
use warnings qw(all);
use Test::More;
use Test::Mojibake;
all_files_encoding_ok();
Class-Autouse-2.02/xt/author/kwalitee.t 000644 000766 000024 00000000275 15047426332 020341 0 ustar 00ether staff 000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12
use strict;
use warnings;
use Test::More 0.88;
use Test::Kwalitee 1.21 'kwalitee_ok';
kwalitee_ok();
done_testing;
Class-Autouse-2.02/xt/author/minimum-version.t 000644 000766 000024 00000000152 15047426332 021664 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
use Test::More;
use Test::MinimumVersion;
all_minimum_version_ok( qq{5.006} );
Class-Autouse-2.02/xt/author/00-compile.t 000644 000766 000024 00000002605 15047426332 020400 0 ustar 00ether staff 000000 000000 use 5.006;
use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058
use Test::More 0.94;
plan tests => 3;
my @module_files = (
'Class/Autouse.pm',
'Class/Autouse/Parent.pm'
);
# no fake home requested
my @switches = (
-d 'blib' ? '-Mblib' : '-Ilib',
);
use File::Spec;
use IPC::Open3;
use IO::Handle;
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
my @warnings;
for my $lib (@module_files)
{
# see L
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
if (@_warnings)
{
warn @_warnings;
push @warnings, @_warnings;
}
}
is(scalar(@warnings), 0, 'no warnings found')
or diag 'got warnings: ', explain(\@warnings);
BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing;
Class-Autouse-2.02/xt/author/pod-syntax.t 000644 000766 000024 00000000252 15047426332 020635 0 ustar 00ether staff 000000 000000 #!perl
# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
use strict; use warnings;
use Test::More;
use Test::Pod 1.41;
all_pod_files_ok();
Class-Autouse-2.02/xt/author/portability.t 000644 000766 000024 00000000130 15047426332 021064 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
use Test::More;
use Test::Portability::Files;
run_tests();
Class-Autouse-2.02/xt/author/distmeta.t 000644 000766 000024 00000000223 15047426332 020337 0 ustar 00ether staff 000000 000000 #!perl
# This file was automatically generated by Dist::Zilla::Plugin::MetaTests.
use strict;
use warnings;
use Test::CPAN::Meta;
meta_yaml_ok();
Class-Autouse-2.02/xt/author/pod-no404s.t 000644 000766 000024 00000000527 15047426332 020343 0 ustar 00ether staff 000000 000000 #!perl
use strict;
use warnings;
use Test::More;
foreach my $env_skip ( qw(
SKIP_POD_NO404S
AUTOMATED_TESTING
) ){
plan skip_all => "\$ENV{$env_skip} is set, skipping"
if $ENV{$env_skip};
}
eval "use Test::Pod::No404s";
if ( $@ ) {
plan skip_all => 'Test::Pod::No404s required for testing POD';
}
else {
all_pod_files_ok();
}
Class-Autouse-2.02/xt/author/clean-namespaces.t 000644 000766 000024 00000000361 15047426332 021727 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::CleanNamespaces 0.006
use Test::More 0.94;
use Test::CleanNamespaces 0.15;
subtest all_namespaces_clean => sub { all_namespaces_clean() };
done_testing;
Class-Autouse-2.02/t/07_isa.t 000640 000766 000024 00000000524 15047426332 016115 0 ustar 00ether staff 000000 000000 #!/usr/bin/perl
use strict;
use File::Spec ();
BEGIN {
$| = 1;
$^W = 1;
require lib;
lib->import(
File::Spec->catdir(
File::Spec->curdir, 't', 'modules',
)
);
}
use Test::More tests => 1;
use Scalar::Util 'refaddr';
use Class::Autouse;
Class::Autouse->autouse('baseB');
ok( baseB->isa('baseA'), 'isa() triggers autouse' );
Class-Autouse-2.02/t/14_sugar.t 000640 000766 000024 00000001235 15047426332 016460 0 ustar 00ether staff 000000 000000 #!/usr/bin/perl
use strict;
BEGIN {
$| = 1;
$^W = 1;
}
use Test::More tests => 4;
use Class::Autouse;
my $s;
eval {
Class::Autouse->sugar(\&magic);
sub magic {
my $caller = caller(1);
my ($class,$method,@params) = @_;
shift @params;
my @words = ($method,$class,@params);
my $sentence = join(" ",@words);
return sub { $sentence };
}
$s = trolls have big ugly hairy feet;
};
is($s, "trolls have big ugly hairy feet", "magic method works");
ok(!feet->can("hairy"), 'no unexpected methods in the namespace');
ok(!hairy->can("ugly"), 'no unexpected methods in the namespace');
ok(!ugly->can("big"), 'no unexpected methods in the namespace');
Class-Autouse-2.02/t/10_recursion.t 000640 000766 000024 00000002602 15047426332 017343 0 ustar 00ether staff 000000 000000 #!/usr/bin/perl
use strict;
BEGIN {
$| = 1;
$^W = 1;
}
use Test::More tests => 10;
use Class::Autouse \&my_loader;
my %tried;
sub my_loader {
my ($class) = @_;
if ($tried{$class}) {
print "throwing exception\n";
die "recursion\n"
}
$tried{$class}++;
return;
}
eval { Guppie->isa("Fish") };
ok(!$@, "isa() works on a nonsense class w/o recursion when there are dynamic loaders: $@");
is($tried{"Guppie"}, 1, "tried to dynamically load the class one time");
eval { Guppie->isa("Fish") };
ok(!$@, "isa() still works on a nonsense class w/o recursion when there are dynamic loaders: $@");
is($tried{"Guppie"}, 1, "still tried to dynamically load the class just one time");
Class::Autouse->autouse(
sub {
my $class = shift;
if ($class eq 'Guppie') {
eval "package Fish; sub swim { 123 }; package Guppie; use vars '\@ISA'; \@ISA=('Fish');";
die if $@;
return 1;
}
return;
}
);
%tried = ();
my $isa = eval { Guppie->isa("Fish") };
ok(!$@, "isa() works w/o error when we have a new loader: $@");
is($isa, 1, "the class has the correct inheritance");
is($tried{"Guppie"}, 1, "tried to dynamically load the class just one time since adding another loader");
my $can = eval { Guppie->can("swim") };
ok(!$@, "can() works w/o error");
ok($can, "the method is present");
is($tried{"Guppie"}, 1, "still tried to dynamically load the class just one time since adding another loader");
Class-Autouse-2.02/t/11_number_in_class_word.t 000640 000766 000024 00000003365 15047426332 021540 0 ustar 00ether staff 000000 000000 #!/usr/bin/perl
use strict;
BEGIN {
$| = 1;
$^W = 1;
}
use Test::More tests => 10;
use File::Temp;
use IO::File;
use Class::Autouse;
# write a temp directory of modules for testing
my $temp_dir;
BEGIN {
$temp_dir = File::Temp::tempdir(CLEANUP => 1);
}
use lib $temp_dir;
sub try_class {
my $class = shift;
my $msg = shift;
my $r;
eval { $r = $class->can("mymethod") };
ok(!$@, "no exception calling can() on class when $msg");
ok($r, "the can() method works for a real method when $msg");
eval { $r = $r->() };
is($r,"$class mymethod", "return value is as expected when $msg");
}
mkfile(class_name => 'SomeClass::123');
use_ok("SomeClass::123");
try_class("SomeClass::123", "used normally");
mkfile(class_name => 'SomeClass::456');
Class::Autouse->autouse("SomeClass::456");
try_class("SomeClass::456","used via Class::Autouse directly");
mkfile(class_name => 'SomeClass::789');
Class::Autouse->autouse(sub { my $class = shift; if ($class =~ /SomeClass::789/) { eval "use $class" } });
try_class("SomeClass::789","used via Class::Autouse via callback");
sub mkfile {
my (%args) = @_;
my $cname = $args{'class_name'};
my $fname = $cname;
$fname =~ s/::/\//g;
my $dname = $fname;
$dname =~ s/\/[^\/]+//;
mkdir( "$temp_dir/$dname" );
die $! unless -d "$temp_dir/$dname";
$fname =~ s/::/\//g;
my $n1 = "$temp_dir/${fname}.pm";
my $m1 = IO::File->new(">$n1");
die "failed to create file $n1: $!" unless $m1;
my $src = class_src(@_);
$m1->print($src);
$m1->close;
}
sub class_src {
my (%args) = @_;
my ($cname, $pname, $ptype, $has_autoload) = @args{'class_name','parent_class_name', 'parent_class_type', 'has_autoload'};
my $src = <