Commit 9921c2a4 authored by gregor herrmann's avatar gregor herrmann

New upstream version 0.38

parent e1f93cb5
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/Package-Stash
If you use cpanminus, you can do it without downloading the tarball first:
$ cpanm --reinstall --installdeps --with-recommends Package::Stash
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 Package::Stash
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/moose/Package-Stash
You can submit code changes by forking the repository, pushing your code
changes to your clone, and then submitting a pull request. Detailed
instructions for doing that is available here:
https://help.github.com/articles/creating-a-pull-request
All pull requests for this distribution will be automatically tested on Linux
by Travis at: https://travis-ci.com/moose/Package-Stash
All results will be visible in the pull request on GitHub. Follow the
appropriate links for details when tests fail.
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=Package-Stash
or via email: bug-Package-Stash@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.014
from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.145.
Revision history for Package-Stash
0.38 2018-12-31 03:25:07Z
- avoid new warning in 5.21.x regarding too many arguments for
printf/sprintf (Renée Bäcker)
- canonical repository moved to https://github.com/moose/Package-Stash
0.37 2014-09-21
- fix spurious warning in taint mode (Niko Tyni, #12)
......
This is the Perl distribution Package-Stash.
Installing Package-Stash is straightforward.
## Installation with cpanm
If you have cpanm, you only need one line:
% cpanm Package::Stash
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 Package::Stash
## Manual installation
As a last resort, you can manually install it. Download the tarball, untar it,
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
Package-Stash documentation is available as POD.
You can run `perldoc` from a shell to read the documentation:
% perldoc Package::Stash
For more information on installing Perl modules via CPAN, please see:
https://www.cpan.org/modules/INSTALL.html
This software is copyright (c) 2014 by Jesse Luehrs.
This software is copyright (c) 2018 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
......@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
This software is Copyright (c) 2014 by Jesse Luehrs.
This software is Copyright (c) 2018 by Jesse Luehrs.
This is free software, licensed under:
......@@ -272,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2014 by Jesse Luehrs.
This software is Copyright (c) 2018 by Jesse Luehrs.
This is free software, licensed under:
......
# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.020.
# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012.
CONTRIBUTING
Changes
INSTALL
LICENSE
MANIFEST
META.json
......@@ -13,6 +15,8 @@ lib/Package/Stash.pm
lib/Package/Stash/Conflicts.pm
lib/Package/Stash/PP.pm
t/00-compile.t
t/00-report-prereqs.dd
t/00-report-prereqs.t
t/addsub.t
t/anon-basic.t
t/anon.t
......@@ -40,9 +44,16 @@ t/stash-deletion.t
t/synopsis.t
t/warnings-taint.t
t/warnings.t
xt/author/changes_has_content.t
xt/author/eol.t
xt/author/kwalitee.t
xt/author/leaks-debug.t
xt/author/leaks.t
xt/release/eol.t
xt/release/no-tabs.t
xt/release/pod-coverage.t
xt/release/pod-syntax.t
xt/author/mojibake.t
xt/author/no-tabs.t
xt/author/pod-no404s.t
xt/author/pod-syntax.t
xt/author/portability.t
xt/release/changes_has_content.t
xt/release/cpan-changes.t
xt/release/distmeta.t
This diff is collapsed.
This diff is collapsed.
# This Makefile.PL for Package-Stash was generated by
# inc::MMPackageStash <self>
# and Dist::Zilla::Plugin::MakeMaker::Awesome 0.27.
# and Dist::Zilla::Plugin::MakeMaker::Awesome 0.47.
# Don't edit it but the dist.ini and plugins used to construct it.
use strict;
......@@ -25,6 +25,7 @@ my %WriteMakefileArgs = (
"bin/package-stash-conflicts"
],
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.008001",
"NAME" => "Package::Stash",
"PREREQ_PM" => {
"B" => 0,
......@@ -39,6 +40,7 @@ my %WriteMakefileArgs = (
"warnings" => 0
},
"TEST_REQUIRES" => {
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
......@@ -48,7 +50,7 @@ my %WriteMakefileArgs = (
"base" => 0,
"lib" => 0
},
"VERSION" => "0.37",
"VERSION" => "0.38",
"test" => {
"TESTS" => "t/*.t t/impl-selection/*.t"
}
......@@ -58,6 +60,7 @@ my %FallbackPrereqs = (
"B" => 0,
"Carp" => 0,
"Dist::CheckConflicts" => "0.02",
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"Getopt::Long" => 0,
"IO::Handle" => 0,
......@@ -75,7 +78,7 @@ my %FallbackPrereqs = (
"warnings" => 0
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
unless ( eval { ExtUtils::MakeMaker->VERSION('6.63_03') } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
......@@ -134,7 +137,7 @@ sub parse_args {
}
sub check_conflicts {
if ( eval { require 'lib/Package/Stash/Conflicts.pm'; 1; } ) {
if ( eval { require './lib/Package/Stash/Conflicts.pm'; 1; } ) {
if ( eval { Package::Stash::Conflicts->check_conflicts; 1 } ) {
return;
}
......
This archive contains the distribution Package-Stash,
version 0.37:
version 0.38:
routines for manipulating stashes
This software is copyright (c) 2014 by Jesse Luehrs.
This software is copyright (c) 2018 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
This README file was generated by Dist::Zilla::Plugin::Readme v5.020.
This README file was generated by Dist::Zilla::Plugin::Readme v6.012.
......@@ -4,7 +4,7 @@ use strict;
use warnings;
# PODNAME: package-stash-conflicts
# this script was generated with Dist::Zilla::Plugin::Conflicts 0.16
# this script was generated with Dist::Zilla::Plugin::Conflicts 0.19
use Getopt::Long;
use Package::Stash::Conflicts;
......@@ -33,7 +33,12 @@ package-stash-conflicts
=head1 VERSION
version 0.37
version 0.38
=head1 SUPPORT
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Stash>
(or L<bug-Package-Stash@rt.cpan.org|mailto:bug-Package-Stash@rt.cpan.org>).
=head1 AUTHOR
......@@ -41,7 +46,7 @@ Jesse Luehrs <doy@tozt.net>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Jesse Luehrs.
This software is copyright (c) 2018 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
......
......@@ -8,18 +8,29 @@ finder = :InstallModules
finder = :ExecFiles
skip = Conflicts.pm$
[@DOY]
:version = 0.14
dist = Package-Stash
repository = github
awesome = =inc::MMPackageStash
[@Author::ETHER]
:version = 0.119
authority = cpan:DOY
installer = none
ExecDir.dir = bin
PodWeaver.finder = WeaverFinder
PodWeaver.replacer = replace_with_nothing
PodWeaver.post_code_replacer = replace_with_nothing
AutoPrereqs.skip = Variable::Magic
Test::Compile.xt_mode = 0
Test::Compile.bail_out_on_fail = 0
; there's some bug with PodCoverageTests and Conflicts on travis that i can't
; seem to track down, so just disable that for now
-remove = PodCoverageTests
-remove = Test::CleanNamespaces
-remove = Test::PodSpelling
-remove = Test::MinimumVersion
[=inc::MMPackageStash]
[Metadata]
dynamic_config = 1
CompileTests_skip = [Cc]onflicts$
Authority_finder = WeaverFinder
PodWeaver_finder = WeaverFinder
[AutoPrereqs]
skip = Variable::Magic
[Prereqs / TestRequires]
Test::More = 0.88
[Prereqs / RuntimeRecommends]
; XXX keep this in sync with inc/MMPackageStash.pm
......
package Package::Stash;
BEGIN {
$Package::Stash::AUTHORITY = 'cpan:DOY';
}
$Package::Stash::VERSION = '0.37';
package Package::Stash; # git description: 5468b00
use strict;
use warnings;
use 5.008001;
# ABSTRACT: routines for manipulating stashes
our $VERSION = '0.38';
our $IMPLEMENTATION;
use Module::Implementation 0.06;
......@@ -50,7 +47,7 @@ Package::Stash - routines for manipulating stashes
=head1 VERSION
version 0.37
version 0.38
=head1 SYNOPSIS
......@@ -209,24 +206,6 @@ variables:
# No problem, modifying a copy, not the original
$Some::Namespace::name .= " world";
=head1 BUGS / CAVEATS
=over 4
=item * Prior to perl 5.10, scalar slots are only considered to exist if they are defined
This is due to a shortcoming within perl itself. See
L<perlref/Making References> point 7 for more information.
=item * GLOB and FORMAT variables are not (yet) accessible through this module.
=item * Also, see the BUGS section for the specific backends (L<Package::Stash::XS> and L<Package::Stash::PP>)
=back
Please report any bugs to GitHub Issues at
L<https://github.com/doy/package-stash/issues>.
=head1 SEE ALSO
=over 4
......@@ -253,7 +232,7 @@ L<https://metacpan.org/release/Package-Stash>
=item * Github
L<https://github.com/doy/package-stash>
L<https://github.com/moose/Package-Stash>
=item * RT: CPAN's request tracker
......@@ -270,13 +249,75 @@ L<http://cpanratings.perl.org/d/Package-Stash>
Based on code from L<Class::MOP::Package>, by Stevan Little and the Moose
Cabal.
=head1 BUGS / CAVEATS
=over 4
=item * Prior to perl 5.10, scalar slots are only considered to exist if they are defined
This is due to a shortcoming within perl itself. See
L<perlref/Making References> point 7 for more information.
=item * GLOB and FORMAT variables are not (yet) accessible through this module.
=item * Also, see the BUGS section for the specific backends (L<Package::Stash::XS> and L<Package::Stash::PP>)
=back
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Stash>
(or L<bug-Package-Stash@rt.cpan.org|mailto:bug-Package-Stash@rt.cpan.org>).
=head1 AUTHOR
Jesse Luehrs <doy@tozt.net>
=head1 CONTRIBUTORS
=for stopwords Karen Etheridge Carlos Lima Kent Fredric Justin Hunter Christian Walde Dave Rolsky Niko Tyni Renee Tim Bunce
=over 4
=item *
Karen Etheridge <ether@cpan.org>
=item *
Carlos Lima <carlos@multi>
=item *
Kent Fredric <kentfredric@gmail.com>
=item *
Justin Hunter <justin.d.hunter@gmail.com>
=item *
Christian Walde <walde.christian@googlemail.com>
=item *
Dave Rolsky <autarch@urth.org>
=item *
Niko Tyni <ntyni@debian.org>
=item *
Renee <reb@perl-services.de>
=item *
Tim Bunce <Tim.Bunce@pobox.com>
=back
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Jesse Luehrs.
This software is copyright (c) 2018 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
......
......@@ -4,7 +4,7 @@ package # hide from PAUSE
use strict;
use warnings;
# this module was generated with Dist::Zilla::Plugin::Conflicts 0.16
# this module was generated with Dist::Zilla::Plugin::Conflicts 0.19
use Dist::CheckConflicts
-dist => 'Package::Stash',
......
package Package::Stash::PP;
BEGIN {
$Package::Stash::PP::AUTHORITY = 'cpan:DOY';
}
$Package::Stash::PP::VERSION = '0.37';
use strict;
use warnings;
# ABSTRACT: pure perl implementation of the Package::Stash API
our $VERSION = '0.38';
use B;
use Carp qw(confess);
use Scalar::Util qw(blessed reftype weaken);
......@@ -424,7 +422,7 @@ Package::Stash::PP - pure perl implementation of the Package::Stash API
=head1 VERSION
version 0.37
version 0.38
=head1 SYNOPSIS
......@@ -434,31 +432,6 @@ version 0.37
This is a backend for L<Package::Stash> implemented in pure perl, for those without a compiler or who would like to use this inline in scripts.
=head1 BUGS
=over 4
=item * remove_symbol also replaces the associated typeglob
This can cause unexpected behavior when doing manipulation at compile time -
removing subroutines will still allow them to be called from within the package
as subroutines (although they will not be available as methods). This can be
considered a feature in some cases (this is how L<namespace::clean> works, for
instance), but should not be relied upon - use C<remove_glob> directly if you
want this behavior.
=item * Some minor memory leaks
The pure perl implementation has a couple minor memory leaks (see the TODO
tests in t/20-leaks.t) that I'm having a hard time tracking down - these may be
core perl bugs, it's hard to tell.
=back
Please report any bugs through RT: email
C<bug-package-stash at rt.cpan.org>, or browse to
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Package-Stash>.
=head1 SEE ALSO
=over 4
......@@ -479,10 +452,6 @@ You can also look for information at:
=over 4
=item * AnnoCPAN: Annotated CPAN documentation
L<http://annocpan.org/dist/Package-Stash>
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/Package-Stash>
......@@ -497,13 +466,6 @@ L<http://search.cpan.org/dist/Package-Stash>
=back
=head1 AUTHOR
Jesse Luehrs <doy at tozt dot net>
Mostly copied from code from L<Class::MOP::Package>, by Stevan Little and the
Moose Cabal.
=for Pod::Coverage BROKEN_ISA_ASSIGNMENT
add_symbol
get_all_symbols
......@@ -516,13 +478,40 @@ namespace
new
remove_glob
=head1 BUGS
=over 4
=item * remove_symbol also replaces the associated typeglob
This can cause unexpected behavior when doing manipulation at compile time -
removing subroutines will still allow them to be called from within the package
as subroutines (although they will not be available as methods). This can be
considered a feature in some cases (this is how L<namespace::clean> works, for
instance), but should not be relied upon - use C<remove_glob> directly if you
want this behavior.
=item * Some minor memory leaks
The pure perl implementation has a couple minor memory leaks (see the TODO
tests in t/20-leaks.t) that I'm having a hard time tracking down - these may be
core perl bugs, it's hard to tell.
=back
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Stash>
(or L<bug-Package-Stash@rt.cpan.org|mailto:bug-Package-Stash@rt.cpan.org>).
=head1 AUTHOR
Jesse Luehrs <doy@tozt.net>
Jesse Luehrs <doy at tozt dot net>
Mostly copied from code from L<Class::MOP::Package>, by Stevan Little and the
Moose Cabal.
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Jesse Luehrs.
This software is copyright (c) 2018 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
......
......@@ -2,11 +2,11 @@ use 5.006;
use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.043
use Test::More tests => 4 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058
use Test::More;
plan tests => 4 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
my @module_files = (
'Package/Stash.pm',
......@@ -20,7 +20,9 @@ my @scripts = (
# no fake home requested
my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
my @switches = (
-d 'blib' ? '-Mblib' : '-Ilib',
);
use File::Spec;
use IPC::Open3;
......@@ -34,12 +36,19 @@ for my $lib (@module_files)
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
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;
......@@ -53,17 +62,27 @@ foreach my $file (@scripts)
my $line = <$fh>;
close $fh and skip("$file isn't perl", 1) unless $line =~ /^#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/;
my @flags = $1 ? split(' ', $1) : ();
@switches = (@switches, split(' ', $1)) if $1;
close $fh and skip("$file uses -T; not testable with PERL5LIB", 1)
if grep { $_ eq '-T' } @switches and $ENV{PERL5LIB};
my $stderr = IO::Handle->new;
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, @flags, '-c', $file);
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
# in older perls, -c output is simply the file portion of the path being tested
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
# in older perls, -c output is simply the file portion of the path being tested
if (@_warnings = grep { !/\bsyntax OK$/ }
grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings)
{
......@@ -74,6 +93,7 @@ foreach my $file (@scripts)
is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
is(scalar(@warnings), 0, 'no warnings found')
or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING};
This diff is collapsed.
#!perl
use strict;
use warnings;
# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027
use Test::More tests => 1;
use ExtUtils::MakeMaker;
use File::Spec;
# from $version::LAX
my $lax_version_re =
qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )?
|
(?:\.[0-9]+) (?:_[0-9]+)?
) | (?:
v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )?
|
(?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)?
)