Hello community, here is the log from the commit of package perl-strictures for openSUSE:Factory checked in at 2012-05-25 16:17:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-strictures (Old) and /work/SRC/openSUSE:Factory/.perl-strictures.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-strictures", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-strictures/perl-strictures.changes 2012-01-12 15:26:33.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-strictures.new/perl-strictures.changes 2012-05-25 16:17:56.000000000 +0200 @@ -1,0 +2,10 @@ +Wed May 23 12:59:01 UTC 2012 - [email protected] + +- updated to 1.003001 + - fix test to handle defatalization + - try and run for any checkout t/ now we don't blow up the process + - defatalize lack of extra testing modules + - disable extra tests on perls <= 5.008003, things do not work there as + expected + +------------------------------------------------------------------- Old: ---- strictures-1.002002.tar.gz New: ---- strictures-1.003001.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-strictures.spec ++++++ --- /var/tmp/diff_new_pack.HOoIZh/_old 2012-05-25 16:17:58.000000000 +0200 +++ /var/tmp/diff_new_pack.HOoIZh/_new 2012-05-25 16:17:58.000000000 +0200 @@ -15,8 +15,9 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: perl-strictures -Version: 1.002002 +Version: 1.003001 Release: 0 %define cpan_name strictures Summary: turn on strict and make all warnings fatal @@ -56,8 +57,8 @@ compile as such) get caught, but not at the cost of an XS dependency and not at the cost of blowing things up on another machine. -Therefore, strictures turns on indirect checking only when it thinks it's -running in a compilation (or pod coverage) test - though if this causes +Therefore, strictures turns on additional checking, but only when it thinks +it's running in a test file in a VCS checkout - though if this causes undesired behaviour this can be overridden by setting the PERL_STRICTURES_EXTRA environment variable. ++++++ strictures-1.002002.tar.gz -> strictures-1.003001.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.002002/Changes new/strictures-1.003001/Changes --- old/strictures-1.002002/Changes 2011-02-25 14:36:21.000000000 +0100 +++ new/strictures-1.003001/Changes 2012-04-08 21:06:52.000000000 +0200 @@ -1,3 +1,10 @@ +1.003001 - 2012-04-08 + - fix test to handle defatalization +1.003000 - 2012-04-07 + - try and run for any checkout t/ now we don't blow up the process + - defatalize lack of extra testing modules + - disable extra tests on perls <= 5.008003, things do not work there as + expected 1.002002 - 2011-02-25 - only try and mkdir the .git if it doesn't already exist so repeated test runs don't explode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.002002/MANIFEST new/strictures-1.003001/MANIFEST --- old/strictures-1.002002/MANIFEST 2011-02-25 14:36:38.000000000 +0100 +++ new/strictures-1.003001/MANIFEST 2012-04-08 21:07:03.000000000 +0200 @@ -8,4 +8,6 @@ t/smells-of-vcs/.exists t/strictures.t xt/pod.t -META.yml Module meta-data (added by MakeMaker) +META.yml Module YAML meta-data (added by MakeMaker) +META.json Module JSON meta-data (added by MakeMaker) +README README file (added by Distar) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.002002/META.json new/strictures-1.003001/META.json --- old/strictures-1.002002/META.json 1970-01-01 01:00:00.000000000 +0100 +++ new/strictures-1.003001/META.json 2012-04-08 21:07:02.000000000 +0200 @@ -0,0 +1,39 @@ +{ + "abstract" : "turn on strict and make all warnings fatal", + "author" : [ + "mst - Matt S. Trout (cpan:MSTROUT) <[email protected]>" + ], + "dynamic_config" : 1, + "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120921", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "strictures", + "no_index" : { + "directory" : [ + "t", + "inc" + ] + }, + "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "runtime" : { + "requires" : {} + } + }, + "release_status" : "stable", + "version" : "1.003001" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.002002/META.yml new/strictures-1.003001/META.yml --- old/strictures-1.002002/META.yml 2011-02-25 14:36:38.000000000 +0100 +++ new/strictures-1.003001/META.yml 2012-04-08 21:07:02.000000000 +0200 @@ -1,21 +1,21 @@ ---- #YAML:1.0 -name: strictures -version: 1.002002 -abstract: turn on strict and make all warnings fatal +--- +abstract: 'turn on strict and make all warnings fatal' author: - - mst - Matt S. Trout (cpan:MSTROUT) <[email protected]> -license: perl -distribution_type: module -configure_requires: - ExtUtils::MakeMaker: 0 + - 'mst - Matt S. Trout (cpan:MSTROUT) <[email protected]>' build_requires: - ExtUtils::MakeMaker: 0 -requires: {} -no_index: - directory: - - t - - inc -generated_by: ExtUtils::MakeMaker version 6.56 + ExtUtils::MakeMaker: 0 +configure_requires: + ExtUtils::MakeMaker: 0 +dynamic_config: 1 +generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120921' +license: perl meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: strictures +no_index: + directory: + - t + - inc +requires: {} +version: 1.003001 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.002002/README new/strictures-1.003001/README --- old/strictures-1.002002/README 2011-02-25 14:36:38.000000000 +0100 +++ new/strictures-1.003001/README 2012-04-08 21:07:02.000000000 +0200 @@ -11,7 +11,7 @@ except when called from a file where $0 matches: - /^x?t\/.*(?:load|compile|coverage|use_ok).*\.t$/ + /^x?t\/.*\.t$/ and when either '.git' or '.svn' is present in the current directory (with the intention of only forcing extra tests on the author side) - or @@ -32,8 +32,9 @@ minor version increase, but any changes to the effect of 'use strictures' in normal mode will involve a major version bump. - Be aware: THIS MEANS THE EXTRA TEST MODULES ARE REQUIRED FOR AUTHORS OF - STRICTURES USING CODE - but not by end users thereof. + If any of the extra testing modules are not present, strictures will + complain loudly, once, via warn(), and then shut up. But you really + should consider installing them, they're all great anti-footgun tools. DESCRIPTION I've been writing the equivalent of this module at the top of my code @@ -54,8 +55,8 @@ compile as such) get caught, but not at the cost of an XS dependency and not at the cost of blowing things up on another machine. - Therefore, strictures turns on indirect checking only when it thinks - it's running in a compilation (or pod coverage) test - though if this + Therefore, strictures turns on additional checking, but only when it + thinks it's running in a test file in a VCS checkout - though if this causes undesired behaviour this can be overridden by setting the PERL_STRICTURES_EXTRA environment variable. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.002002/lib/strictures.pm new/strictures-1.003001/lib/strictures.pm --- old/strictures-1.002002/lib/strictures.pm 2011-02-25 14:34:47.000000000 +0100 +++ new/strictures-1.003001/lib/strictures.pm 2012-04-08 21:05:44.000000000 +0200 @@ -3,7 +3,9 @@ use strict; use warnings FATAL => 'all'; -our $VERSION = '1.002002'; # 1.2.2 +use constant _PERL_LT_5_8_4 => ($] < 5.008004) ? 1 : 0; + +our $VERSION = '1.003001'; # 1.3.1 sub VERSION { for ($_[1]) { @@ -19,37 +21,55 @@ shift->SUPER::VERSION(@_); } +my $extras_load_warned; + sub import { strict->import; warnings->import(FATAL => 'all'); + my $extra_tests = do { if (exists $ENV{PERL_STRICTURES_EXTRA}) { - $ENV{PERL_STRICTURES_EXTRA} - } else { - !!($0 =~ /^x?t\/.*(?:load|compile|coverage|use_ok).*\.t$/ + if (_PERL_LT_5_8_4 and $ENV{PERL_STRICTURES_EXTRA}) { + die 'PERL_STRICTUTRES_EXTRA checks are not available on perls older than 5.8.4, ' + . "please unset \$ENV{PERL_STRICTURES_EXTRA}\n"; + } + $ENV{PERL_STRICTURES_EXTRA}; + } elsif (! _PERL_LT_5_8_4) { + !!($0 =~ /^x?t\/.*\.t$/ and (-e '.git' or -e '.svn')) } }; if ($extra_tests) { - if (eval { - require indirect; - require multidimensional; - require bareword::filehandles; - 1 - }) { + my @failed; + if (eval { require indirect; 1 }) { indirect->unimport(':fatal'); + } else { + push @failed, 'indirect'; + } + if (eval { require multidimensional; 1 }) { multidimensional->unimport; + } else { + push @failed, 'multidimensional'; + } + if (eval { require bareword::filehandles; 1 }) { bareword::filehandles->unimport; } else { - die "strictures.pm extra testing active but couldn't load modules. + push @failed, 'bareword::filehandles'; + } + if (@failed and not $extras_load_warned++) { + my $failed = join ' ', @failed; + warn <<EOE; +strictures.pm extra testing active but couldn't load all modules. Missing were: + + $failed + Extra testing is auto-enabled in checkouts only, so if you're the author of a strictures using module you need to run: cpan indirect multidimensional bareword::filehandles but these modules are not required by your users. - -Error loading modules was: $@"; +EOE } } } @@ -72,7 +92,7 @@ except when called from a file where $0 matches: - /^x?t\/.*(?:load|compile|coverage|use_ok).*\.t$/ + /^x?t\/.*\.t$/ and when either '.git' or '.svn' is present in the current directory (with the intention of only forcing extra tests on the author side) - or when the @@ -92,8 +112,9 @@ version increase, but any changes to the effect of 'use strictures' in normal mode will involve a major version bump. -Be aware: THIS MEANS THE EXTRA TEST MODULES ARE REQUIRED FOR AUTHORS OF -STRICTURES USING CODE - but not by end users thereof. +If any of the extra testing modules are not present, strictures will +complain loudly, once, via warn(), and then shut up. But you really +should consider installing them, they're all great anti-footgun tools. =head1 DESCRIPTION @@ -114,8 +135,8 @@ as such) get caught, but not at the cost of an XS dependency and not at the cost of blowing things up on another machine. -Therefore, strictures turns on indirect checking only when it thinks it's -running in a compilation (or pod coverage) test - though if this causes +Therefore, strictures turns on additional checking, but only when it thinks +it's running in a test file in a VCS checkout - though if this causes undesired behaviour this can be overridden by setting the PERL_STRICTURES_EXTRA environment variable. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.002002/maint/Makefile.PL.include new/strictures-1.003001/maint/Makefile.PL.include --- old/strictures-1.002002/maint/Makefile.PL.include 2011-02-25 14:20:51.000000000 +0100 +++ new/strictures-1.003001/maint/Makefile.PL.include 2012-04-07 16:53:16.000000000 +0200 @@ -1,3 +1,5 @@ +BEGIN { -e 'Distar' or system("git clone git://git.shadowcat.co.uk/p5sagit/Distar.git") } +use lib 'Distar/lib'; use Distar; author 'mst - Matt S. Trout (cpan:MSTROUT) <[email protected]>'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/strictures-1.002002/t/strictures.t new/strictures-1.003001/t/strictures.t --- old/strictures-1.002002/t/strictures.t 2011-02-25 14:33:17.000000000 +0100 +++ new/strictures-1.003001/t/strictures.t 2012-04-08 21:04:30.000000000 +0200 @@ -30,7 +30,16 @@ is($us[$idx][1], $expect[$idx][1], 'Warnings ok for case '.($idx+1)); } -{ +SKIP: { + skip 'Extra tests disabled on perls <= 5.008003', 1 + if $] < 5.008004; + skip 'Not got all the modules to do this', 1 + unless eval { + require indirect; + require multidimensional; + require bareword::filehandles; + 1; + }; local $0 = 't/00load.t'; sub Foo::new { 1 } chdir("t/smells-of-vcs"); -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
