Hello community, here is the log from the commit of package perl-B-Utils for openSUSE:Factory checked in at 2015-04-16 14:13:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2014-03-06 12:02:05.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-B-Utils.new/perl-B-Utils.changes 2015-04-16 14:13:25.000000000 +0200 @@ -1,0 +2,17 @@ +Tue Apr 14 12:14:00 UTC 2015 - co...@suse.com + +- updated to 0.25 + see /usr/share/doc/packages/perl-B-Utils/Changes + + 0.24 + - Export C symbols, breakage from 0.22 + + 0.23 + - 5.10, 5.12, 5.14 compatibile syntax + + 0.22 + - resolve nameclashes with CORE, fix hpux and openbsd failures (Reini Urban) + - remove unneeded ExtUtils::CBuilder req (Reini Urban) + - do not use FUNCLIST on hpux (Reini Urban) + +------------------------------------------------------------------- Old: ---- B-Utils-0.21.tar.gz New: ---- B-Utils-0.25.tar.gz cpanspec.yml ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-B-Utils.spec ++++++ --- /var/tmp/diff_new_pack.fcWlTQ/_old 2015-04-16 14:13:25.000000000 +0200 +++ /var/tmp/diff_new_pack.fcWlTQ/_new 2015-04-16 14:13:25.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-B-Utils # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,22 +17,23 @@ Name: perl-B-Utils -Version: 0.21 +Version: 0.25 Release: 0 %define cpan_name B-Utils Summary: Helper functions for op tree manipulation License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/B-Utils/ -Source: http://www.cpan.org/authors/id/J/JJ/JJORE/%{cpan_name}-%{version}.tar.gz -Patch: parent-impl.patch +Source0: http://www.cpan.org/authors/id/J/JJ/JJORE/%{cpan_name}-%{version}.tar.gz +Source1: perl-B-Utils-rpmlintrc +Source2: cpanspec.yml +Patch0: parent-impl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(ExtUtils::CBuilder) BuildRequires: perl(ExtUtils::Depends) >= 0.301 BuildRequires: perl(Task::Weaken) -#BuildRequires: perl(B::Utils) Requires: perl(Task::Weaken) %{perl_requires} @@ -41,7 +42,7 @@ %prep %setup -q -n %{cpan_name}-%{version} -%patch -p1 +%patch0 -p1 %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" @@ -57,6 +58,6 @@ %files -f %{name}.files %defattr(-,root,root,755) -%doc build Changes LICENSE README weaver.ini xt +%doc Changes LICENSE README %changelog ++++++ B-Utils-0.21.tar.gz -> B-Utils-0.25.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/Changes new/B-Utils-0.25/Changes --- old/B-Utils-0.21/Changes 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/Changes 2014-04-25 08:45:19.000000000 +0200 @@ -1,5 +1,15 @@ Revision history for Perl extension B::Utils. +0.24 + - Export C symbols, breakage from 0.22 + +0.23 + - 5.10, 5.12, 5.14 compatibile syntax + +0.22 + - resolve nameclashes with CORE, fix hpux and openbsd failures (Reini Urban) + - remove unneeded ExtUtils::CBuilder req (Reini Urban) + - do not use FUNCLIST on hpux (Reini Urban) - Use FUNCLIST to declare exported symbols (Alexandr Ciornii) 0.21 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/LICENSE new/B-Utils-0.25/LICENSE --- old/B-Utils-0.21/LICENSE 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/LICENSE 2014-04-25 08:45:19.000000000 +0200 @@ -18,15 +18,16 @@ The GNU General Public License, Version 1, February 1989 - GNU GENERAL PUBLIC LICENSE - Version 1, February 1989 + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public @@ -67,7 +68,7 @@ The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which @@ -185,7 +186,7 @@ of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + 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 @@ -207,9 +208,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS - Appendix: How to Apply These Terms to Your New Programs + 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 @@ -235,8 +236,9 @@ 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, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA + Also add information on how to contact you by electronic and paper mail. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/MANIFEST new/B-Utils-0.25/MANIFEST --- old/B-Utils-0.21/MANIFEST 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/MANIFEST 2014-04-25 08:45:19.000000000 +0200 @@ -1,3 +1,4 @@ +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.015. BUtils.h BUtils_op.h Changes @@ -15,6 +16,7 @@ ppport.h t/10use.t t/11export.t +t/12static.t~ t/regression_walkallops_filtered.t t/release-pod-syntax.t t/utils/20all_starts.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/META.yml new/B-Utils-0.25/META.yml --- old/B-Utils-0.21/META.yml 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/META.yml 2014-04-25 08:45:19.000000000 +0200 @@ -3,25 +3,25 @@ author: - 'Josh Jore <jj...@cpan.org>' build_requires: - ExtUtils::CBuilder: 0 - Test::More: 0 + ExtUtils::CBuilder: '0' + Test::More: '0' configure_requires: - ExtUtils::CBuilder: 0 - ExtUtils::Depends: 0.301 + ExtUtils::CBuilder: '0' + ExtUtils::Depends: '0.301' dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.112621' +generated_by: 'Dist::Zilla version 5.015, CPAN::Meta::Converter version 2.140640' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: B-Utils requires: - Exporter: 0 - Scalar::Util: 0 - Task::Weaken: 0 - perl: 5.6.0 + Exporter: '0' + Scalar::Util: '0' + Task::Weaken: '0' + perl: v5.6.0 resources: 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.21 +version: '0.25' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/Makefile.PL new/B-Utils-0.25/Makefile.PL --- old/B-Utils-0.21/Makefile.PL 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/Makefile.PL 2014-04-25 08:45:19.000000000 +0200 @@ -36,11 +36,9 @@ }, BUILD_REQUIRES => { 'Test::More' => 0, - 'ExtUtils::CBuilder' => 0, }, CONFIGURE_REQUIRES => { 'ExtUtils::Depends' => $ExtUtils_Depends_required, - 'ExtUtils::CBuilder' => 0, }, ABSTRACT_FROM => 'lib/B/Utils.pm', AUTHOR => 'Josh Jore <jj...@cpan.org>', @@ -54,10 +52,11 @@ }, test => { TESTS => 't/*.t t/*/*.t' }, $pkg->get_makefile_vars, - FUNCLIST => [ - 'boot_B__Utils', #necessary for work of B::Utils - qw/BUtils_cc_opclassname BUtils_make_sv_object BUtils_op_name_to_num/, #defined in BUtils.h - ], + (($^O eq 'hpux') ? () : + (FUNCLIST => [ + 'boot_B__Utils', #necessary for work of B::Utils + qw/BUtils_cc_opclassname BUtils_make_sv_object BUtils_op_name_to_num/, #defined in BUtils.h + ])), ); sub WriteMakefile1 { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/OP.xs new/B-Utils-0.25/OP.xs --- old/B-Utils-0.21/OP.xs 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/OP.xs 2014-04-25 08:45:19.000000000 +0200 @@ -6,7 +6,7 @@ /* Stolen from pp_ctl.c (with modifications) */ static I32 -dopoptosub_at(pTHX_ PERL_CONTEXT *cxstk, I32 startingblock) +BUtils_dopoptosub_at(pTHX_ PERL_CONTEXT *cxstk, I32 startingblock) { dTHR; I32 i; @@ -30,10 +30,10 @@ } static I32 -dopoptosub(pTHX_ I32 startingblock) +BUtils_dopoptosub(pTHX_ I32 startingblock) { dTHR; - return dopoptosub_at(aTHX_ cxstack, startingblock); + return BUtils_dopoptosub_at(aTHX_ cxstack, startingblock); } /* This function is based on the code of pp_caller */ @@ -42,7 +42,7 @@ I32 *cxix_from_p, I32 *cxix_to_p) { PERL_SI *top_si = PL_curstackinfo; - I32 cxix = dopoptosub(aTHX_ cxstack_ix); + I32 cxix = BUtils_dopoptosub(aTHX_ cxstack_ix); PERL_CONTEXT *ccstack = cxstack; if (cxix_from_p) *cxix_from_p = cxstack_ix+1; @@ -52,7 +52,7 @@ while (cxix < 0 && top_si->si_type != PERLSI_MAIN) { top_si = top_si->si_prev; ccstack = top_si->si_cxstack; - cxix = dopoptosub_at(aTHX_ ccstack, top_si->si_cxix); + cxix = BUtils_dopoptosub_at(aTHX_ ccstack, top_si->si_cxix); if (cxix_to_p && cxix_from_p) *cxix_from_p = *cxix_to_p; if (cxix_to_p) *cxix_to_p = cxix; } @@ -69,7 +69,7 @@ break; if (cop_p) *cop_p = ccstack[cxix].blk_oldcop; - cxix = dopoptosub_at(aTHX_ ccstack, cxix - 1); + cxix = BUtils_dopoptosub_at(aTHX_ ccstack, cxix - 1); if (cxix_to_p && cxix_from_p) *cxix_from_p = *cxix_to_p; if (cxix_to_p) *cxix_to_p = cxix; } @@ -90,7 +90,7 @@ ) OP* -find_return_op(pTHX_ I32 uplevel) +BUtils_find_return_op(pTHX_ I32 uplevel) { PERL_CONTEXT *cx = BUtils_op_upcontext(aTHX_ uplevel, 0, 0, 0, 0); if (!cx) TOO_FAR; @@ -102,7 +102,7 @@ } OP* -find_oldcop(pTHX_ I32 uplevel) +BUtils_find_oldcop(pTHX_ I32 uplevel) { PERL_CONTEXT *cx = BUtils_op_upcontext(aTHX_ uplevel, 0, 0, 0, 0); if (!cx) TOO_FAR; @@ -116,14 +116,14 @@ B::OP parent_op(I32 uplevel) CODE: - RETVAL = find_oldcop(aTHX_ uplevel); + RETVAL = BUtils_find_oldcop(aTHX_ uplevel); OUTPUT: RETVAL B::OP return_op(I32 uplevel) CODE: - RETVAL = find_return_op(aTHX_ uplevel); + RETVAL = BUtils_find_return_op(aTHX_ uplevel); OUTPUT: RETVAL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/README new/B-Utils-0.25/README --- old/B-Utils-0.21/README 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/README 2014-04-25 08:45:19.000000000 +0200 @@ -1,7 +1,7 @@ This archive contains the distribution B-Utils, -version 0.21: +version 0.25: Helper functions for op tree manipulation @@ -11,3 +11,5 @@ the same terms as the Perl 5 programming language system itself. +This README file was generated by Dist::Zilla::Plugin::Readme v5.015. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/Utils.xs new/B-Utils-0.25/Utils.xs --- old/B-Utils-0.21/Utils.xs 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/Utils.xs 2014-04-25 08:45:19.000000000 +0200 @@ -20,10 +20,16 @@ /* Stolen from B.xs */ -/* XXX: this really need to properly exported by the B module, +/* XXX: This really need to be properly exported by the B module, possibly with custom .h retrieved by some extutil module for building, and we shall be able to simply reuse the public symbol - from loaded module in run time. */ + from loaded module in run time. + + Beware of name clashes with CORE when loading the .so into the global namespace. + It fails with strict linkers, HP-UX, OpenBSD and probably on darwin without -flat-namespace. + "Can't make loaded symbols global on this platform while loading blib/arch/auto/B/Utils/Utils.sl + at /opt/perl_32/lib/5.8.8/PA-RISC1.1-thread-multi/DynaLoader.pm line 230." +*/ #ifdef PERL_OBJECT #undef PL_op_name @@ -34,8 +40,8 @@ #define PL_op_desc (get_op_descs()) #endif -/* duplicated from B.xs */ -static char *svclassnames[] = { +/* duplicated from B.xs. */ +static char *BUtils_svclassnames[] = { "B::NULL", "B::IV", "B::NV", @@ -72,9 +78,9 @@ OPc_PVOP, /* 9 */ OPc_LOOP, /* 10 */ OPc_COP /* 11 */ -} opclass; +} BUtils_opclass; -static char *opclassnames[] = { +static char *BUtils_opclassnames[] = { "B::NULL", "B::OP", "B::UNOP", @@ -89,8 +95,8 @@ "B::COP" }; -static opclass -cc_opclass(pTHX_ const OP *o) +static BUtils_opclass +BUtils_cc_opclass(pTHX_ const OP *o) { if (!o) return OPc_NULL; @@ -200,7 +206,7 @@ char * BUtils_cc_opclassname(pTHX_ const OP *o) { - return opclassnames[cc_opclass(aTHX_ o)]; + return BUtils_opclassnames[BUtils_cc_opclass(aTHX_ o)]; } I32 @@ -249,7 +255,7 @@ dMY_CXT; if (!type) { - type = svclassnames[SvTYPE(sv)]; + type = BUtils_svclassnames[SvTYPE(sv)]; iv = PTR2IV(sv); } sv_setiv(newSVrv(arg, type), iv); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/dist.ini new/B-Utils-0.25/dist.ini --- old/B-Utils-0.21/dist.ini 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/dist.ini 2014-04-25 08:45:19.000000000 +0200 @@ -4,7 +4,7 @@ copyright_holder = Josh Jore copyright_year = 2011 -version = 0.21 +version = 0.25 [Prereqs / ConfigureRequires] ExtUtils::Depends = 0.301 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/lib/B/Utils/OP.pm new/B-Utils-0.25/lib/B/Utils/OP.pm --- old/B-Utils-0.21/lib/B/Utils/OP.pm 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/lib/B/Utils/OP.pm 2014-04-25 08:45:19.000000000 +0200 @@ -8,7 +8,7 @@ our @ISA = 'Exporter'; require Exporter; -our $VERSION = '0.21'; +our $VERSION = '0.25'; our @EXPORT = qw(parent_op return_op); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/lib/B/Utils.pm new/B-Utils-0.25/lib/B/Utils.pm --- old/B-Utils-0.21/lib/B/Utils.pm 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/lib/B/Utils.pm 2014-04-25 08:45:19.000000000 +0200 @@ -29,11 +29,11 @@ =head1 VERSION -0.21 +0.25 =cut -$VERSION = '0.21'; +$VERSION = '0.25'; @@ -156,12 +156,10 @@ return unless defined wantarray; my @kids; - if ( class($op) eq "LISTOP" ) { - @kids = $op->first; - push @kids, $kids[-1]->sibling while $kids[-1]->can('sibling'); - pop @kids - if 'NULL' eq class( $kids[-1] ); - + if ( ref $op and $$op and $op->flags & OPf_KIDS ) { + for (my $kid = $op->first; $$kid; $kid = $kid->sibling) { + push @kids, $kid; + } ### Assert: $op->children == @kids } else { @@ -318,7 +316,7 @@ ## for @kids; ## ## # For each child, check it for a match. -## my $found; +## my $found; ## $found = $search->($_) and return $found ## for @kids; ## @@ -329,7 +327,7 @@ ## ## my $next = $target; ## while ( eval { $next = $next->next } ) { -## my $result; +## my $result; ## $result = $search->( $next ) ## and return $result; ## } @@ -583,13 +581,13 @@ =cut -$file = '__none__'; -$line = 0; -$sub = undef; +$B::Utils::file = '__none__'; +$B::Utils::line = 0; +$B::Utils::sub = undef; sub walkoptree_simple { - $file = '__none__'; - $line = 0; + $B::Utils::file = '__none__'; + $B::Utils::line = 0; _walkoptree_simple( {}, @_ ); @@ -599,20 +597,29 @@ sub _walkoptree_simple { my ( $visited, $op, $callback, $data ) = @_; - return if $visited->{$$op}++; + return if $visited->{$$op}++; if ( ref $op and $op->isa("B::COP") ) { - $file = $op->file; - $line = $op->line; + $B::Utils::file = $op->file; + $B::Utils::line = $op->line; } $callback->( $op, $data ); - if ( ref $op - and $$op - and $op->flags & OPf_KIDS ) - { + return if $op->isa('B::NULL'); + if ( $op->flags & OPf_KIDS ) { + # for (my $kid = $op->first; $$kid; $kid = $kid->sibling) { + # _walkoptree_simple( $visited, $kid, $callback, $data ); + # } _walkoptree_simple( $visited, $_, $callback, $data ) for $op->kids; } + if ( $op->isa('B::PMOP') ) { + my $maybe_root = $op->pmreplroot; + if (ref($maybe_root) and $maybe_root->isa("B::OP")) { + # It really is the root of the replacement, not something + # else stored here for lack of space elsewhere + _walkoptree_simple( $visited, $maybe_root, $callback, $data ); + } + } return; @@ -628,8 +635,8 @@ =cut sub walkoptree_filtered { - $file = '__none__'; - $line = 0; + $B::Utils::file = '__none__'; + $B::Utils::line = 0; _walkoptree_filtered( {}, @_ );; @@ -637,11 +644,11 @@ } sub _walkoptree_filtered { - my ( $visited, $op, $filter, $callback, $data ) = @_; + my ( $visited, $op, $filter, $callback, $data ) = @_; if ( $op->isa("B::COP") ) { - $file = $op->file; - $line = $op->line; + $B::Utils::file = $op->file; + $B::Utils::line = $op->line; } $callback->( $op, $data ) if $filter->($op); @@ -674,7 +681,7 @@ =cut sub walkallops_simple { - $sub = undef; + $B::Utils::sub = undef; &_walkallops_simple; @@ -686,9 +693,13 @@ _init_sub_cache(); - walkoptree_simple( $_, $callback, $data ) for values %roots; + for my $sub_name (sort keys %roots) { + $B::Utils::sub = $sub_name; + my $root = $roots{$sub_name}; + walkoptree_simple( $root, $callback, $data ); + } - $sub = "__ANON__"; + $B::Utils::sub = "__ANON__"; walkoptree_simple( $_->{root}, $callback, $data ) for @anon_subs; return _TRUE; @@ -701,7 +712,7 @@ =cut sub walkallops_filtered { - $sub = undef; + $B::Utils::sub = undef; &_walkallops_filtered; @@ -715,7 +726,7 @@ walkoptree_filtered( $_, $filter, $callback, $data ) for values %roots; - $sub = "__ANON__"; + $B::Utils::sub = "__ANON__"; walkoptree_filtered( $_->{root}, $filter, $callback, $data ) for @anon_subs; @@ -1094,7 +1105,7 @@ my $args = join '', @_; $args = "Something's wrong " unless $args; if ( "\n" ne substr $args, -1, 1 ) { - $args .= " at $file line $line.\n"; + $args .= " at $B::Utils::file line $B::Utils::line.\n"; } return $args; } @@ -1128,7 +1139,7 @@ Maintained by Joshua ben Jore, C<jj...@cpan.org> Contributions from Mattia Barbon, Jim Cromie, Steffen Mueller, and -Chia-liang Kao, Alexandr Ciornii. +Chia-liang Kao, Alexandr Ciornii, Reini Urban. =head1 LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/t/12static.t~ new/B-Utils-0.25/t/12static.t~ --- old/B-Utils-0.21/t/12static.t~ 1970-01-01 01:00:00.000000000 +0100 +++ new/B-Utils-0.25/t/12static.t~ 2014-04-25 08:45:19.000000000 +0200 @@ -0,0 +1 @@ +#!perl \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/t/release-pod-syntax.t new/B-Utils-0.25/t/release-pod-syntax.t --- old/B-Utils-0.21/t/release-pod-syntax.t 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/t/release-pod-syntax.t 2014-04-25 08:45:19.000000000 +0200 @@ -7,9 +7,8 @@ } } +# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use Test::More; - -eval "use Test::Pod 1.41"; -plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; +use Test::Pod 1.41; all_pod_files_ok(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/B-Utils-0.21/t/utils/30parent.t new/B-Utils-0.25/t/utils/30parent.t --- old/B-Utils-0.21/t/utils/30parent.t 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/t/utils/30parent.t 2014-04-25 08:45:19.000000000 +0200 @@ -1,3 +1,5 @@ +use B qw( OPf_KIDS ); +my @empty_array = (); test_data() for @empty_array; { @@ -29,10 +31,21 @@ # ); # B::Concise::compile("test_data")->(); +# FIXME: Consider moving this into B::Utils. But consider warning about +# adding to B::OPS and B::Concise. +sub has_branch($) +{ + my $op = shift; + return ref($op) and $$op and ($op->flags & OPf_KIDS); +} + # 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 { ++$tests } ); +walkoptree_simple( $root, sub { + my $op = shift; + $tests++ if has_branch($op)} + ); plan( tests => ( $tests * 2 ) - 1 ); walkoptree_simple( @@ -47,16 +60,16 @@ else { ok( $parent, $op->stringify . " has a parent" ); - + my $correct_parent; for ( $parent ? $parent->kids : () ) { if ( $$_ == $$op ) { - $correct_parent = 1; + $correct_parent = $_; last; } } - - ok( $correct_parent, $op->stringify . " has the *right* parent" ); + 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.21/t/utils/40walk.t new/B-Utils-0.25/t/utils/40walk.t --- old/B-Utils-0.21/t/utils/40walk.t 2012-03-25 17:53:16.000000000 +0200 +++ new/B-Utils-0.25/t/utils/40walk.t 2014-04-25 08:45:19.000000000 +0200 @@ -1 +1,37 @@ -use Test::More skip_all => "No tests written yet."; +#!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); + +my @lines = (); +my $callback = sub +{ + my $op = shift; + if ('COP' eq B::class($op) and $op->file eq __FILE__) { + push @lines, $op->line; + } +}; + +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, + ], + 'walkoptree_simple lines of ' . __FILE__); + +# For testing following if/else in code. +if (@lines) { + ok(1); # FIXME: This line isn't coming out. +} else { + ok(0); +} + +done_testing(); +__END__ +diag join(', ', @lines), "\n"; ++++++ cpanspec.yml ++++++ --- #description_paragraphs: 3 #no_testing: broken upstream sources: - perl-B-Utils-rpmlintrc patches: parent-impl.patch: -p1 #preamble: |- # BuildRequires: gcc-c++ #post_prep: |- # hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'` # sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL #post_install: |- # sed on %{name}.files #license: SUSE-NonFree #skip_noarch: 1 #custom_build: - #./Build build flags=%{?_smp_mflags} --myflag