Hello community, here is the log from the commit of package perl-B-Utils for openSUSE:Factory checked in at 2015-07-24 09:59:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-B-Utils (Old) and /work/SRC/openSUSE:Factory/.perl-B-Utils.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-B-Utils" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-B-Utils/perl-B-Utils.changes 2015-04-28 20:48:19.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-B-Utils.new/perl-B-Utils.changes 2015-07-24 09:59:12.000000000 +0200 @@ -1,0 +2,12 @@ +Thu Jul 23 09:27:11 UTC 2015 - co...@suse.com + +- updated to 0.27 + see /usr/share/doc/packages/perl-B-Utils/Changes + + - remove build/IFiles.pm from the shipped dist, as it is meant to be + auto-generated at install time (was added in 0.26) + - Support native B::OP::parent with 5.21.2 -DPERL_OP_PARENT (Reini Urban) + - fix t/utils/40walk.t with 5.6 (Reini Urban) + - Add $op->_parent method as fallback to our parent method since 5.21.2. + +------------------------------------------------------------------- Old: ---- B-Utils-0.26.tar.gz New: ---- B-Utils-0.27.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-B-Utils.spec ++++++ --- /var/tmp/diff_new_pack.lJRUHn/_old 2015-07-24 09:59:12.000000000 +0200 +++ /var/tmp/diff_new_pack.lJRUHn/_new 2015-07-24 09:59:12.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-B-Utils -Version: 0.26 +Version: 0.27 Release: 0 %define cpan_name B-Utils Summary: Helper functions for op tree manipulation @@ -58,6 +58,6 @@ %files -f %{name}.files %defattr(-,root,root,755) -%doc build Changes LICENSE README +%doc Changes LICENSE README %changelog ++++++ B-Utils-0.26.tar.gz -> B-Utils-0.27.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/Changes new/B-Utils-0.27/Changes --- old/B-Utils-0.26/Changes 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/Changes 2015-07-22 21:33:22.000000000 +0200 @@ -1,13 +1,20 @@ Revision history for Perl extension B::Utils. + - remove build/IFiles.pm from the shipped dist, as it is meant to be + auto-generated at install time (was added in 0.26) + - Support native B::OP::parent with 5.21.2 -DPERL_OP_PARENT (Reini Urban) + - fix t/utils/40walk.t with 5.6 (Reini Urban) + - Add $op->_parent method as fallback to our parent method since 5.21.2. + 0.26 - fix tests for perl 5.21.7 (change to nulled COPs) (RT#100508, Father Chrysostomos) 0.25 - - Export C symbols, breakage from 0.22 + - Re-expose symbols by setting dl_load_flags. Hope this is ok for HP-UX 0.24 + - Export C symbols, breakage from 0.22 0.23 - 5.10, 5.12, 5.14 compatibile syntax diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/MANIFEST new/B-Utils-0.27/MANIFEST --- old/B-Utils-0.26/MANIFEST 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/MANIFEST 2015-07-22 21:33:22.000000000 +0200 @@ -1,15 +1,15 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.035. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.037. BUtils.h BUtils_op.h Changes LICENSE MANIFEST +META.json META.yml Makefile.PL OP.xs README Utils.xs -build/IFiles.pm dist.ini lib/B/Utils.pm lib/B/Utils/OP.pm @@ -17,7 +17,6 @@ t/10use.t t/11export.t t/regression_walkallops_filtered.t -t/release-pod-syntax.t t/utils/20all_starts.t t/utils/21all_roots.t t/utils/22anon_subs.t @@ -39,4 +38,5 @@ typemap weaver.ini xt/ppport.t -xt/version.t +xt/release/changes_has_content.t +xt/release/pod-syntax.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/META.json new/B-Utils-0.27/META.json --- old/B-Utils-0.26/META.json 1970-01-01 01:00:00.000000000 +0100 +++ new/B-Utils-0.27/META.json 2015-07-22 21:33:22.000000000 +0200 @@ -0,0 +1,59 @@ +{ + "abstract" : "Helper functions for op tree manipulation", + "author" : [ + "Josh Jore <jj...@cpan.org>" + ], + "dynamic_config" : 0, + "generated_by" : "Dist::Zilla version 5.037, CPAN::Meta::Converter version 2.150005", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : 2 + }, + "name" : "B-Utils", + "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::CBuilder" : "0", + "Test::More" : "0" + } + }, + "configure" : { + "requires" : { + "ExtUtils::CBuilder" : "0", + "ExtUtils::Depends" : "0.301" + } + }, + "develop" : { + "requires" : { + "Test::Pod" : "1.41" + } + }, + "runtime" : { + "requires" : { + "Exporter" : "0", + "Scalar::Util" : "0", + "Task::Weaken" : "0", + "perl" : "v5.6.0" + } + } + }, + "release_status" : "stable", + "resources" : { + "bugtracker" : { + "mailto" : "bug-b-ut...@rt.cpan.org", + "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=B-Utils" + }, + "homepage" : "http://search.cpan.org/dist/B-Utils", + "repository" : { + "type" : "git", + "url" : "git://github.com/jbenjore/b-utils.git", + "web" : "https://github.com/jbenjore/b-utils" + } + }, + "version" : "0.27", + "x_authority" : "cpan:ABERGMAN" +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/META.yml new/B-Utils-0.27/META.yml --- old/B-Utils-0.26/META.yml 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/META.yml 2015-07-22 21:33:22.000000000 +0200 @@ -9,7 +9,7 @@ ExtUtils::CBuilder: '0' ExtUtils::Depends: '0.301' dynamic_config: 0 -generated_by: 'Dist::Zilla version 5.035, CPAN::Meta::Converter version 2.150003' +generated_by: 'Dist::Zilla version 5.037, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -24,4 +24,5 @@ bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=B-Utils homepage: http://search.cpan.org/dist/B-Utils repository: git://github.com/jbenjore/b-utils.git -version: '0.26' +version: '0.27' +x_authority: cpan:ABERGMAN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/Makefile.PL new/B-Utils-0.27/Makefile.PL --- old/B-Utils-0.26/Makefile.PL 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/Makefile.PL 2015-07-22 21:33:22.000000000 +0200 @@ -22,6 +22,7 @@ $pkg->add_typemaps("typemap"); +mkdir 'build'; $pkg->save_config('build/IFiles.pm'); use ExtUtils::MakeMaker; @@ -34,7 +35,7 @@ 'Task::Weaken' => 0, 'Exporter' => 0, }, - BUILD_REQUIRES => { + TEST_REQUIRES => { 'Test::More' => 0, }, CONFIGURE_REQUIRES => { @@ -45,8 +46,16 @@ LICENSE => 'perl', MIN_PERL_VERSION => 5.006, META_MERGE => { - resources => { - repository => 'http://github.com/jbenjore/B-Utils/tree', + 'meta-spec' => { version => 2 }, + repository => { + # original in http://github.com/jbenjore/B-Utils/ + url => 'https://github.com/karenetheridge/B-Utils.git', + web => 'https://github.com/karenetheridge/B-Utils', + type => 'git', + }, + bugtracker => { + mailto => 'bug-b-ut...@rt.cpan.org', + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=B-Utils', }, keywords => ['op tree','perl internals'], }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/README new/B-Utils-0.27/README --- old/B-Utils-0.26/README 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/README 2015-07-22 21:33:22.000000000 +0200 @@ -1,7 +1,7 @@ This archive contains the distribution B-Utils, -version 0.26: +version 0.27: Helper functions for op tree manipulation @@ -11,5 +11,5 @@ the same terms as the Perl 5 programming language system itself. -This README file was generated by Dist::Zilla::Plugin::Readme v5.035. +This README file was generated by Dist::Zilla::Plugin::Readme v5.037. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/Utils.xs new/B-Utils-0.27/Utils.xs --- old/B-Utils-0.26/Utils.xs 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/Utils.xs 2015-07-22 21:33:22.000000000 +0200 @@ -33,7 +33,7 @@ #ifdef PERL_OBJECT #undef PL_op_name -#undef PL_opargs +#undef PL_opargs #undef PL_op_desc #define PL_op_name (get_op_names()) #define PL_opargs (get_opargs()) @@ -140,7 +140,7 @@ case OA_PVOP_OR_SVOP: /* - * Character translations (tr///) are usually a PVOP, keeping a + * Character translations (tr///) are usually a PVOP, keeping a * pointer to a table of shorts used to look up translations. * Under utf8, however, a simple table isn't practical; instead, * the OP is an SVOP, and the SV is a reference to a swash diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/build/IFiles.pm new/B-Utils-0.27/build/IFiles.pm --- old/B-Utils-0.26/build/IFiles.pm 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/build/IFiles.pm 1970-01-01 01:00:00.000000000 +0100 @@ -1,37 +0,0 @@ -package B::Utils::Install::Files; - -$self = { - 'deps' => [], - 'inc' => '', - 'libs' => '', - 'typemaps' => [ - 'typemap' - ] - }; - -@deps = @{ $self->{deps} }; -@typemaps = @{ $self->{typemaps} }; -$libs = $self->{libs}; -$inc = $self->{inc}; - - $CORE = undef; - foreach (@INC) { - if ( -f $_ . "/B/Utils/Install/Files.pm") { - $CORE = $_ . "/B/Utils/Install/"; - last; - } - } - - sub deps { @{ $self->{deps} }; } - - sub Inline { - my ($class, $lang) = @_; - if ($lang ne 'C') { - warn "Warning: Inline hints not available for $lang language -"; - return; - } - +{ map { (uc($_) => $self->{$_}) } qw(inc libs typemaps) }; - } - -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/dist.ini new/B-Utils-0.27/dist.ini --- old/B-Utils-0.26/dist.ini 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/dist.ini 2015-07-22 21:33:22.000000000 +0200 @@ -18,6 +18,11 @@ Task::Weaken = 0 Exporter = 0 +[Authority] +:version = 1.009 +authority = cpan:ABERGMAN +do_munging = 0 + [@Git] [AutoMetaResources] @@ -25,20 +30,34 @@ repository.github = user:jbenjore homepage = http://search.cpan.org/dist/%{dist} -[@Filter] --bundle = @Classic --remove = MakeMaker --remove = PodCoverageTests --remove = PkgVersion +[Git::GatherDir] + +[MetaYAML] +[License] +[Readme] +[PodVersion] +[PodSyntaxTests] +[Manifest] +[UploadToCPAN] + +[MetaJSON] +; TODO: inline the Makefile.PL modifications with [MakeMaker::Awesome] [MakeMaker::Runner] +[RunExtraTests] + [RewriteVersion] [BumpVersionAfterRelease] +[Test::ChangesHasContent] + [Git::Commit / post-release commit] :version = 2.020 allow_dirty_match = ^lib/.*\.pm$ commit_msg = increment $VERSION after release [Git::Push] + +; loaded last, to allow all pre-release checks to happen first +[ConfirmRelease] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/lib/B/Utils/OP.pm new/B-Utils-0.27/lib/B/Utils/OP.pm --- old/B-Utils-0.26/lib/B/Utils/OP.pm 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/lib/B/Utils/OP.pm 2015-07-22 21:33:22.000000000 +0200 @@ -8,7 +8,7 @@ our @ISA = 'Exporter'; require Exporter; -our $VERSION = '0.26'; +our $VERSION = '0.27'; our @EXPORT = qw(parent_op return_op); @@ -26,7 +26,7 @@ =head1 VERSION -version 0.26 +version 0.27 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/lib/B/Utils.pm new/B-Utils-0.27/lib/B/Utils.pm --- old/B-Utils-0.26/lib/B/Utils.pm 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/lib/B/Utils.pm 2015-07-22 21:33:22.000000000 +0200 @@ -23,7 +23,7 @@ =head1 VERSION -version 0.26 +version 0.27 =cut @@ -31,7 +31,7 @@ # NOTE: The pod/code version here and in README are computer checked # by xt/version.t. Keep them in sync. -our $VERSION = '0.26'; +our $VERSION = '0.27'; @@ -107,13 +107,13 @@ # =item C<$op-E<gt>other> # # Normally if you call first, last or other on anything which is not an -# UNOP, BINOP or LOGOP respectivly it will die. This leads to lots of +# UNOP, BINOP or LOGOP respectively it will die. This leads to lots of # code like: # # $op->first if $op->can('first'); # -# B::Utils provides every op with first, last and other methods which -# will simply return nothing if it isn't relevent. +# B::Utils provided every op with first, last and other methods which +# will simply return nothing if it isn't relevant. But this broke B::Concise # # =cut # @@ -124,7 +124,7 @@ =item C<$op-E<gt>oldname> Returns the name of the op, even if it is currently optimized to null. -This helps you understand the stucture of the op tree. +This helps you understand the structure of the op tree. =cut @@ -181,13 +181,35 @@ have the C<next> pointers in place, but it'll take me a while to figure out how to do that. +Warning: Since 5.21.2 B comes with its own version of B::OP::parent +which returns either B::NULL or the real parent when ccflags contains +-DPERL_OP_PARENT. +In this case rather use $op->_parent. + =cut +BEGIN { + unless ($] >= 5.021002 and exists &B::OP::parent) { + eval q[ sub B::OP::parent { my $op = shift; my $parent = $op->_parent_impl( $op, "" ); $parent; +}]; + } else { + eval q[ +sub B::OP::_parent { + my $op = shift; + my $parent = $op->_parent_impl( $op, "" ); + $parent; +}]; + } + if ($] >= 5.021002) { + eval q[ +sub B::NULL::kids { } + ]; + } } sub B::NULL::_parent_impl { } @@ -370,7 +392,7 @@ C<attributes> is a list of attributes to include in the produced pattern. The attributes that can be checked against in this way -are +are: name targ type seq flags private pmflags pmpermflags. @@ -382,7 +404,7 @@ my $attribs = $opt->{attributes}; $attribs ||= [qw(name flags)]; - + my $pattern = {}; foreach my $attr (@$attribs) { $pattern->{$attr} = $op->$attr() if $op->can($attr); @@ -801,13 +823,13 @@ }, $root_op ); - + if ($result) { my $name = $result->{notreached}->name; # result is *not* the root op carp("Statement unlikely to be reached (op name: $name)"); carp("\t(Maybe you meant system() when you said exec()?)\n"); } - + While the above is a terribly contrived example, consider the win for a deeply nested pattern or worse yet, a pattern with many disjunctions. If a C<capture> property is found anywhere in @@ -824,7 +846,7 @@ Same as above, except that you don't have to chain the conditions yourself. If you pass an array-ref, opgrep will chain the conditions -for you using C<next>. +for you using C<next>. The conditions can either be strings (taken as op-names), or hash-refs, with the same testable conditions as given above. @@ -913,7 +935,7 @@ # Fail if any entries match. $_ ne $val - or next CONDITION + or next CONDITION for @{ $condition->{$test} } [ 1 .. $#{ $condition->{$test} } ]; } @@ -921,8 +943,8 @@ # Fail if no entries match. my $okay = 0; - - $_ eq $val and $okay = 1, last + + $_ eq $val and $okay = 1, last for @{ $condition->{$test} }; next CONDITION if not $okay; @@ -956,7 +978,7 @@ $capture->{$_} = $result->{$_} foreach keys %$result; } } - + # Apply all kids conditions. We $op->can(kids) (see above). if (exists $condition->{kids}) { my $kidno = 0; @@ -970,7 +992,7 @@ my ($result) = opgrep( $kidconditions->[$kidno++], $kid ); next CONDITION if not $result; - + if (not blessed($result)) { # copy over the captured data/ops from the recursion $capture->{$_} = $result->{$_} foreach keys %$result; @@ -1031,7 +1053,7 @@ first => { name => 'rv2hv', }, 'last' => { name => 'const', }, }; - + my @ops = opgrep( { name => 'leavesub', first => { @@ -1078,10 +1100,10 @@ # sub op_pattern_match { # my $op = shift; # my $pattern = shift; -# +# # my $ret = {}; -# -# +# +# # return $ret; # } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/t/release-pod-syntax.t new/B-Utils-0.27/t/release-pod-syntax.t --- old/B-Utils-0.26/t/release-pod-syntax.t 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/t/release-pod-syntax.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -#!perl - -BEGIN { - unless ($ENV{RELEASE_TESTING}) { - require Test::More; - Test::More::plan(skip_all => 'these tests are for release candidate testing'); - } -} - -# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. -use Test::More; -use Test::Pod 1.41; - -all_pod_files_ok(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/t/utils/20all_starts.t new/B-Utils-0.27/t/utils/20all_starts.t --- old/B-Utils-0.26/t/utils/20all_starts.t 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/t/utils/20all_starts.t 2015-07-22 21:33:22.000000000 +0200 @@ -23,4 +23,4 @@ ${$starts->{'main::find_this'}}, "Found correct start" ); } - + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/t/utils/21all_roots.t new/B-Utils-0.27/t/utils/21all_roots.t --- old/B-Utils-0.26/t/utils/21all_roots.t 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/t/utils/21all_roots.t 2015-07-22 21:33:22.000000000 +0200 @@ -8,7 +8,7 @@ { # List context my %roots = all_roots(); - + ok( $roots{'main::find_this'}, "Found root" ); is( ${svref_2object( \ &find_this )->ROOT}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/t/utils/22anon_subs.t new/B-Utils-0.27/t/utils/22anon_subs.t --- old/B-Utils-0.26/t/utils/22anon_subs.t 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/t/utils/22anon_subs.t 2015-07-22 21:33:22.000000000 +0200 @@ -12,7 +12,7 @@ { # List context my @subs = anon_subs(); - + is( scalar grep( ${$found->START} == ${$_->{start}} && ${$found->ROOT} == ${$_->{root}}, @subs ), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/t/utils/30parent.t new/B-Utils-0.27/t/utils/30parent.t --- old/B-Utils-0.26/t/utils/30parent.t 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/t/utils/30parent.t 2015-07-22 21:33:22.000000000 +0200 @@ -1,4 +1,5 @@ use B qw( OPf_KIDS ); +use Config (); my @empty_array = (); test_data() for @empty_array; @@ -31,7 +32,7 @@ # ); # B::Concise::compile("test_data")->(); -# FIXME: Consider moving this into B::Utils. But consider warning about +# FIXME: Consider moving this into B::Utils. But consider warning about # adding to B::OPS and B::Concise. sub has_branch($) { @@ -42,9 +43,9 @@ # Set the # of tests to run and make a table of parents my $tests = 0; my $root = svref_2object( \&test_data )->ROOT; -walkoptree_simple( $root, sub { +walkoptree_simple( $root, sub { my $op = shift; - $tests++ if has_branch($op)} + $tests++ if has_branch($op)} ); plan( tests => ( $tests * 2 ) - 1 ); @@ -52,15 +53,24 @@ $root, sub { my $op = shift; + my $parent; - my $parent = eval { $op->parent }; - if ( $$op == $$root ) { - is( $parent, undef, "No parent for root " . $op->stringify ); + if ($] >= 5.021002 and exists &B::OP::parent) { + $parent = $op->_parent; + } else { + $parent = $op->parent; + } + + if ( $$op == $$root) { + # small discrepancy between core 5.21 (or -DPERL_OP_PARENT) returning B::NULL + # and B::Utils::parent + ok( !$parent or ref $parent eq 'B::NULL', + "No parent for root " . $op->stringify ); } else { ok( $parent, $op->stringify . " has a parent" ); - + my $correct_parent; for ( $parent ? $parent->kids : () ) { if ( $$_ == $$op ) { @@ -68,7 +78,7 @@ last; } } - is( $$correct_parent, $$op, + is( $$correct_parent, $$op, $op->stringify . " has the *right* parent " . $parent); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/t/utils/40walk.t new/B-Utils-0.27/t/utils/40walk.t --- old/B-Utils-0.26/t/utils/40walk.t 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/t/utils/40walk.t 2015-07-22 21:33:22.000000000 +0200 @@ -1,7 +1,7 @@ #!perl use Test::More; -use lib '../../lib'; -use lib '../../blib/arch/auto/B/Utils'; + + use B qw(class); use B::Utils qw( all_roots walkoptree_simple); @@ -17,12 +17,17 @@ foreach my $op (values %{all_roots()}) { walkoptree_simple( $op, $callback ); } -is_deeply(\@lines, - [8, 15, 17, 18, 20, 29, - # 30, # See FIXME: below - 32, 35, - # 37, - ], +my $expected = [8, 15, 17, 18, 20, 25, 29, + # 30, # See FIXME: below + 34, 37, 40 + # 37, + ]; +if ($] < 5.007) { + $expected = [8, 15, 17, 18, 17, 20, 25, 29, 34, 37, 40]; +} + +is_deeply(\@lines, + $expected, 'walkoptree_simple lines of ' . __FILE__); # For testing following if/else in code. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/xt/release/changes_has_content.t new/B-Utils-0.27/xt/release/changes_has_content.t --- old/B-Utils-0.26/xt/release/changes_has_content.t 1970-01-01 01:00:00.000000000 +0100 +++ new/B-Utils-0.27/xt/release/changes_has_content.t 2015-07-22 21:33:22.000000000 +0200 @@ -0,0 +1,41 @@ +#!perl + +use Test::More tests => 2; + +note 'Checking Changes'; +my $changes_file = 'Changes'; +my $newver = '0.27'; +my $trial_token = '-TRIAL'; + +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; + +# _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit +# by Jerome Quelin +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>); + 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; +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/xt/release/pod-syntax.t new/B-Utils-0.27/xt/release/pod-syntax.t --- old/B-Utils-0.26/xt/release/pod-syntax.t 1970-01-01 01:00:00.000000000 +0100 +++ new/B-Utils-0.27/xt/release/pod-syntax.t 2015-07-22 21:33:22.000000000 +0200 @@ -0,0 +1,6 @@ +#!perl +# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. +use Test::More; +use Test::Pod 1.41; + +all_pod_files_ok(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.26/xt/version.t new/B-Utils-0.27/xt/version.t --- old/B-Utils-0.26/xt/version.t 2015-04-27 03:59:50.000000000 +0200 +++ new/B-Utils-0.27/xt/version.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -#!perl -use strict; -use warnings; -use Test::More tests => 6; - - -open my $fh, '<', 'lib/B/Utils.pm' - or die "Can't open lib/B/Utils.pm: $!"; -undef $/; -my $doc = <$fh>; -close $fh; - -ok( my ( $pod_version ) = $doc =~ /^=head1\s+VERSION\s+([\d._]+)/m, - "Extract version from pod in lib/B/Utils.pm" ); -ok( my ( $b_utils_pm_version ) = $doc =~ /^\$VERSION\s+=\s+'([\d._]+)';/m, - "Extract version from code in lib/B/Utils.pm" ); -is( $pod_version, $b_utils_pm_version, 'Documentation & $VERSION are the same' ); - - -open $fh, '<', 'lib/B/Utils/OP.pm' - or die "Can't open lib/B/Utils/OP.pm: $!"; -$doc = <$fh>; -close $fh; -ok( my( $b_utils_op_pm_version ) = $doc =~ /^our\s+\$VERSION\s+=\s+'([\d._]+)';/ - "Extract version from code in lib/B/Utils/OP.pm" ); - - -open $fh, '<', 'README' - or die "Can't open README: $!"; -$doc = <$fh>; -close $fh; -ok( my ( $readme_version ) = $doc =~ /^VERSION\s+([\d._]+)/m, - "Extract version from README" ); - -is( $readme_version, $pm_version, 'README & $VERSION are the same' );