This is an automated email from the git hooks/post-receive script. kanashiro-guest pushed a commit to branch master in repository libalt-perl.
commit 970fb191212026043ca580c8ebd19f2e399b0abe Author: Lucas Kanashiro <kanashiro.dua...@gmail.com> Date: Wed Jul 22 23:51:02 2015 -0300 Imported Upstream version 0.19 --- CONTRIBUTING | 9 +++-- Changes | 9 +++++ MANIFEST | 2 +- META.json | 6 ++-- META.yml | 6 ++-- Makefile.PL | 10 +++--- README | 88 +++++++++++++++++++++++++++++----------------- lib/Alt.pm | 2 +- lib/Alt.pod | 92 +++++++++++++++++++++++++++++++------------------ lib/Alt/Assert.pod | 2 +- t/000-require-modules.t | 8 ++--- 11 files changed, 150 insertions(+), 84 deletions(-) diff --git a/CONTRIBUTING b/CONTRIBUTING index caa337b..dca4e2f 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -9,7 +9,7 @@ help you be an effective contributor to the Project. GitHub ------ -The code for this Project is hosted at GitHub. The repository is: +The code for this Project is hosted at GitHub. The URL is: https://github.com/ingydotnet/alt-pm @@ -36,7 +36,7 @@ Zilla::Dist This Project uses Zilla::Dist to prepare it for publishing to CPAN. Read: - https://metacpan.org/pod/distribution/Zilla-Dist/lib/Zilla/Dist/Contributing.pod + https://metacpan.org/pod/Zilla::Dist::Contributing for up-to-date instructions on what contributors like yourself need to know to use it. @@ -53,3 +53,8 @@ Join the channel. Join the team! Thanks in advance, Ingy döt Net + + + + +# This file generated by Zilla-Dist-0.0.180 diff --git a/Changes b/Changes index 86d088a..fa894ed 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,12 @@ +0.19 Mon Dec 29 14:24:59 PST 2014 + - Add PERL_ALT_INSTALL to docs + +0.18 Mon Dec 29 08:03:15 PST 2014 + - Update docs regarding versioning + +0.17 Sun Dec 28 19:50:06 PST 2014 + - Update docs with new best practices + 0.16 Sat Aug 16 14:52:27 PDT 2014 - Fix Meta copyright diff --git a/MANIFEST b/MANIFEST index 2e57e55..db3b05b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.019. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.029. CONTRIBUTING Changes LICENSE diff --git a/META.json b/META.json index 1fce7b4..a8874b4 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Ingy döt Net <i...@cpan.org>" ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.132830", + "generated_by" : "Dist::Zilla version 5.029, CPAN::Meta::Converter version 2.143240", "license" : [ "perl_5" ], @@ -24,7 +24,7 @@ "prereqs" : { "configure" : { "requires" : { - "ExtUtils::MakeMaker" : "6.30" + "ExtUtils::MakeMaker" : "0" } }, "develop" : { @@ -55,6 +55,6 @@ "web" : "https://github.com/ingydotnet/alt-pm" } }, - "version" : "0.16" + "version" : "0.19" } diff --git a/META.yml b/META.yml index 3562ea3..a9b6bd6 100644 --- a/META.yml +++ b/META.yml @@ -5,9 +5,9 @@ author: build_requires: Test::Exception: '0' configure_requires: - ExtUtils::MakeMaker: '6.30' + ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.132830' +generated_by: 'Dist::Zilla version 5.029, CPAN::Meta::Converter version 2.143240' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -25,4 +25,4 @@ resources: bugtracker: https://github.com/ingydotnet/alt-pm/issues homepage: https://github.com/ingydotnet/alt-pm repository: https://github.com/ingydotnet/alt-pm.git -version: '0.16' +version: '0.19' diff --git a/Makefile.PL b/Makefile.PL index 8016fc5..2f5abd2 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,11 +1,11 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.019. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.029. use strict; use warnings; use 5.008001; -use ExtUtils::MakeMaker 6.30; +use ExtUtils::MakeMaker; @@ -13,17 +13,18 @@ my %WriteMakefileArgs = ( "ABSTRACT" => "Alternate Module Implementations", "AUTHOR" => "Ingy d\x{f6}t Net <ingy\@cpan.org>", "CONFIGURE_REQUIRES" => { - "ExtUtils::MakeMaker" => "6.30" + "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Alt", "EXE_FILES" => [], "LICENSE" => "perl", + "MIN_PERL_VERSION" => "5.008001", "NAME" => "Alt", "PREREQ_PM" => {}, "TEST_REQUIRES" => { "Test::Exception" => 0 }, - "VERSION" => "0.16", + "VERSION" => "0.19", "test" => { "TESTS" => "t/*.t" } @@ -31,6 +32,7 @@ my %WriteMakefileArgs = ( my %FallbackPrereqs = ( + "ExtUtils::MakeMaker" => 0, "Test::Exception" => 0 ); diff --git a/README b/README index a8c7ebc..2cfbf24 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME Alt - Alternate Module Implementations SYNOPSIS - cpanm Alt::IO::All::crackfueled + PERL_ALT_INSTALL=OVERWRITE cpanm Alt::IO::All::Redux DESCRIPTION "Alt::" is the namespace for alternate implementations of CPAN modules. @@ -30,7 +30,7 @@ THE SOLUTION When a user installs your module like so: - cpanm Alt::Foo::Bar::better + PERL_ALT_INSTALL=OVERWRITE cpanm Alt::Foo::Bar::better they will get your version of the Foo::Bar framework (Foo::Bar, Foo::Bar::Baz). @@ -40,20 +40,11 @@ THE SOLUTION for an Alternate implementation. If they don't like it, they can simply reinstall the original Foo-Bar, or try some other alternate. -WHENCE ALT? - The Alt- concept was thought up by Ingy as he tried to figure out how to - revamp the somewhat popular IO::All and YAML.pm modules. Alternates can - now be released and alpha/beta tested, while the originals remain - stable. - - When Alt-IO-All-new is "community approved" it can replace IO-All. If - people want the old code, they can can install Alt-IO-All-old. - -GUIDELINES +ALT BEST PRACTICES This idea is new, and the details should be sorted out through proper discussions. Pull requests welcome. - Here are the basic guidelines for using the Alt namespace: + Here are the basic guidelines for best using the Alt namespace: Name Creation Names for alternate modules should be minted like this: @@ -61,9 +52,9 @@ GUIDELINES "Alt-$Original_Dist_Name-$phrase" For instance, if MSTROUT wants to make an alternate IO-All - distribution to make it even more crack fueled, he might call it: + distribution to have it be Moo-based, he might call it: - Alt-IO-All-crackfueled + Alt-IO-All-Moo He might also just call it: @@ -75,42 +66,77 @@ GUIDELINES alternate. If the alternate is meant to be short-lived, it can just be the author's CPAN id. + Makefile.PL Changes + Due to experience with <http://cpantesters.org/> problems, it is + important to make your Alt module not install without explicit + direction. You can accomplish this easily in a Makefile.PL, with + something like this: + + my $alt = $ENV{PERL_ALT_INSTALL} || ''; + $WriteMakefileArgs{DESTDIR} = + $alt ? $alt eq 'OVERWRITE' ? '' : $alt : 'no-install-alt'; + + Similar techniques should be available for other module release + frameworks. + Module for CPAN Indexing You will need to provide a module like "Alt::IO::All::MSTROUT" so that CPAN will index something that can cause your distribution to get installed by people: - cpanm Alt::IO::All::MSTROUT + PERL_ALT_INSTALL=OVERWRITE cpanm Alt::IO::All::MSTROUT Since you are adding this module, you should add some doc to it - explaining your Alternate version's improvements. + explaining your alternate version's improvements. - Versioning - The VERSION of the module you are providing an alternate version of - should be the same as the original module at the time you release - the alternate. This will make it play well with others. - - To use the IO::All example, if MSTROUT releases Alt-IO-All-MSTROUT - when IO::All is at version '0.46', his IO::All module should have - VERSION = '0.46', but his Alt::IO::All::MSTROUT could be VERSION - '0.000005'. This should make the dist be - Alt-IO-All-MSTROUT-0.000005. + The Alt:: module can be as simple as this: - If another module wants his version of IO::All, it should list - Alt::IO::All::MSTROUT 0.000005 as a prereq, and then "use IO::All - 0.46;" in the code. + package Alt::IO::All::MSTROUT; + our $VERSION = '0.01'; no_index It is important to use the "no_index" directive on the modules you - are providing an alternative to. This is especially important if you + are providing an alternates for. This is especially important if you are the author of the original, as PAUSE will reindex CPAN to your Alt- version which defeats the purpose. Even if you are not the same author, it will make your index reports not show failures. + Versioning + It is important to not declare a $VERSION in any of the modules that + you are providing alternates for. This will help ensure that your + alternate module does not satisfy the version requirements for + something that wants the real module. + + If you want to depend on the alternate versions, then set the + dependency on the "Alt::" module. + + NOTE: If you provide an alternate Foo::Bar (with no VERSION) it will + satisfy the version requirements for someone who requires "Foo::Bar + => 0". In a sense, depending on version 0 means that alternates are + OK. + + "use" the Alt + You should add this line to your alternate modules: + + use Alt::IO::All::MSTROUT; + + That way the Alt:: module gets loaded any time you "use IO::All" + (with the alternate version installed). This gives debugging clues + since the Alt:: module is now in %INC. + Other Concerns If you have em, I(ngy) would like to know them. Discuss on #toolchain on irc.perl.org for now. +WHENCE ALT? + The Alt- concept was thought up by Ingy as he tried to figure out how to + revamp the somewhat popular IO::All and YAML.pm modules. Alternates can + now be released and alpha/beta tested, while the originals remain + stable. + + When Alt-IO-All-new is "community approved" it can replace IO-All. If + people want the old code, they can can install Alt-IO-All-old. + AUTHOR Ingy döt Net <i...@cpan.org> diff --git a/lib/Alt.pm b/lib/Alt.pm index 8ad6893..5a0cbc6 100644 --- a/lib/Alt.pm +++ b/lib/Alt.pm @@ -1,2 +1,2 @@ package Alt; -our $VERSION = '0.16'; +our $VERSION = '0.19'; diff --git a/lib/Alt.pod b/lib/Alt.pod index 3e3d8ed..20855f5 100644 --- a/lib/Alt.pod +++ b/lib/Alt.pod @@ -1,7 +1,7 @@ =pod =for comment -DO NOT EDIT. This Pod was generated by Swim. +DO NOT EDIT. This Pod was generated by Swim v0.1.31. See http://github.com/ingydotnet/swim-pm#readme =encoding utf8 @@ -12,11 +12,10 @@ Alt - Alternate Module Implementations =for html <a href="https://travis-ci.org/ingydotnet/alt-pm"><img src="https://travis-ci.org/ingydotnet/alt-pm.png" alt="alt-pm"></a> -<a href="https://coveralls.io/r/ingydotnet/alt-pm?branch=master"><img src="https://coveralls.io/repos/ingydotnet/alt-pm/badge.png" alt="alt-pm"></a> =head1 SYNOPSIS - cpanm Alt::IO::All::crackfueled + PERL_ALT_INSTALL=OVERWRITE cpanm Alt::IO::All::Redux =head1 DESCRIPTION @@ -47,7 +46,7 @@ distribute the new version as C<Alt-Foo-Bar-AltIdentifier>. When a user installs your module like so: - cpanm Alt::Foo::Bar::better + PERL_ALT_INSTALL=OVERWRITE cpanm Alt::Foo::Bar::better they will get your version of the Foo::Bar framework (Foo::Bar, Foo::Bar::Baz). @@ -57,21 +56,12 @@ whole idea. The user isn't surprised by this because they just asked for an B<Alt>ernate implementation. If they don't like it, they can simply reinstall the original Foo-Bar, or try some other alternate. -=head1 WHENCE ALT? - -The Alt- concept was thought up by Ingy as he tried to figure out how to -revamp the somewhat popular IO::All and YAML.pm modules. Alternates can now be -released and alpha/beta tested, while the originals remain stable. - -When Alt-IO-All-new is "community approved" it can replace IO-All. If people -want the old code, they can can install Alt-IO-All-old. - -=head1 GUIDELINES +=head1 ALT BEST PRACTICES This idea is new, and the details should be sorted out through proper discussions. Pull requests welcome. -Here are the basic guidelines for using the Alt namespace: +Here are the basic guidelines for best using the Alt namespace: =over @@ -82,9 +72,9 @@ Names for alternate modules should be minted like this: "Alt-$Original_Dist_Name-$phrase" For instance, if MSTROUT wants to make an alternate IO-All distribution to -make it even more crack fueled, he might call it: +have it be Moo-based, he might call it: - Alt-IO-All-crackfueled + Alt-IO-All-Moo He might also just call it: @@ -95,40 +85,67 @@ IO::All development. The "phrase" at the end can be anything unique to CPAN, but should describe the spirit of the alternate. If the alternate is meant to be short-lived, it can just be the author's CPAN id. +=item Makefile.PL Changes + +Due to experience with L<http://cpantesters.org/> problems, it is important to +make your Alt module B<not> install without explicit direction. You can +accomplish this easily in a Makefile.PL, with something like this: + + my $alt = $ENV{PERL_ALT_INSTALL} || ''; + $WriteMakefileArgs{DESTDIR} = + $alt ? $alt eq 'OVERWRITE' ? '' : $alt : 'no-install-alt'; + +Similar techniques should be available for other module release frameworks. + =item Module for CPAN Indexing You will need to provide a module like C<Alt::IO::All::MSTROUT> so that CPAN will index something that can cause your distribution to get installed by people: - cpanm Alt::IO::All::MSTROUT + PERL_ALT_INSTALL=OVERWRITE cpanm Alt::IO::All::MSTROUT Since you are adding this module, you should add some doc to it explaining -your Alternate version's improvements. +your alternate version's improvements. -=item Versioning - -The VERSION of the module you are providing an alternate version of should be -the same as the original module at the time you release the alternate. This -will make it play well with others. +The Alt:: module can be as simple as this: -To use the IO::All example, if MSTROUT releases Alt-IO-All-MSTROUT when -IO::All is at version '0.46', his IO::All module should have VERSION = '0.46', -but his Alt::IO::All::MSTROUT could be VERSION '0.000005'. This should make -the dist be Alt-IO-All-MSTROUT-0.000005. - -If another module wants his version of IO::All, it should list -Alt::IO::All::MSTROUT 0.000005 as a prereq, and then C<use IO::All 0.46;> -in the code. + package Alt::IO::All::MSTROUT; + our $VERSION = '0.01'; =item no_index It is important to use the C<no_index> directive on the modules you are -providing an alternative to. This is especially important if you are the +providing an alternates for. This is especially important if you are the author of the original, as PAUSE will reindex CPAN to your Alt- version which defeats the purpose. Even if you are not the same author, it will make your index reports not show failures. +=item Versioning + +It is important to not declare a C<$VERSION> in any of the modules that you +are providing alternates for. This will help ensure that your alternate +module does not satisfy the version requirements for something that wants the +real module. + +If you want to depend on the alternate versions, then set the dependency on +the C<Alt::> module. + +NOTE: If you provide an alternate Foo::Bar (with no VERSION) it B<will> + satisfy the version requirements for someone who requires C<< + Foo::Bar => 0 >>. In a sense, depending on version 0 means that + alternates are OK. + +=item C<use> the Alt + +You should add this line to your alternate modules: + + use Alt::IO::All::MSTROUT; + +That way the Alt:: module gets loaded any time you C<use IO::All> (with the +alternate version installed). This gives debugging clues since the Alt:: +module is now in C<%INC>. + =item Other Concerns If you have em, I(ngy) would like to know them. Discuss on #toolchain on @@ -136,6 +153,15 @@ irc.perl.org for now. =back +=head1 WHENCE ALT? + +The Alt- concept was thought up by Ingy as he tried to figure out how to +revamp the somewhat popular IO::All and YAML.pm modules. Alternates can now be +released and alpha/beta tested, while the originals remain stable. + +When Alt-IO-All-new is "community approved" it can replace IO-All. If people +want the old code, they can can install Alt-IO-All-old. + =head1 AUTHOR Ingy döt Net <i...@cpan.org> diff --git a/lib/Alt/Assert.pod b/lib/Alt/Assert.pod index e8c5ec9..555f1a8 100644 --- a/lib/Alt/Assert.pod +++ b/lib/Alt/Assert.pod @@ -1,7 +1,7 @@ =pod =for comment -DO NOT EDIT. This Pod was generated by Swim. +DO NOT EDIT. This Pod was generated by Swim v0.1.31. See http://github.com/ingydotnet/swim-pm#readme =encoding utf8 diff --git a/t/000-require-modules.t b/t/000-require-modules.t index 458a8a4..e8a8486 100644 --- a/t/000-require-modules.t +++ b/t/000-require-modules.t @@ -4,11 +4,9 @@ use Test::More; use File::Find; sub test { - -f and /\.pm$/ or return; - s{^lib[/\\]}{}; - s{\.pm$}{}; - s{[/\\]}{::}g; - ok eval("require $_; 1"), "require $_; # OK"; + s{^lib/(.*)\.pm$}{$1} or return; + s{/}{::}g; + ok eval("require $_; 1"), "require $_;$@"; } find { -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libalt-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits