commit perl-FreezeThaw for openSUSE:Factory
Hello community, here is the log from the commit of package perl-FreezeThaw for openSUSE:Factory checked in at Sat Apr 3 00:22:21 CEST 2010. -------- --- perl-FreezeThaw/perl-FreezeThaw.changes 2010-01-10 16:01:43.000000000 +0100 +++ /mounts/work_src_done/STABLE/perl-FreezeThaw/perl-FreezeThaw.changes 2010-04-02 21:44:27.000000000 +0200 @@ -1,0 +2,10 @@ +Fri Apr 2 19:43:26 UTC 2010 - chris@computersalat.de + +- update to 0.50 + o Support RExes of 5.11 and later (XXXX but not yet reblessed ones...) + (prototype by Andreas Koenig) +- fixed perl-macros deps +- disabled check for o:F + o testsuite broken for perl-5.12 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- FreezeThaw-0.45.tar.bz2 New: ---- FreezeThaw-0.50.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-FreezeThaw.spec ++++++ --- /var/tmp/diff_new_pack.Smimuq/_old 2010-04-03 00:22:07.000000000 +0200 +++ /var/tmp/diff_new_pack.Smimuq/_new 2010-04-03 00:22:07.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package perl-FreezeThaw (Version 0.45) +# spec file for package perl-FreezeThaw (Version 0.50) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -21,15 +21,17 @@ Name: perl-FreezeThaw %define cpan_name %( echo %{name} | %{__sed} -e 's,perl-,,' ) Summary: Converting Perl structures to strings and back -Version: 0.45 -Release: 2 +Version: 0.50 +Release: 1 License: Artistic License .. Group: Development/Libraries/Perl -Url: http://search.cpan.org/perldoc?FreezeThaw +Url: http://search.cpan.org/dist/FreezeThaw Source: %{cpan_name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl +%if 0%{?suse_version} < 1120 BuildRequires: perl-macros +%endif Requires: perl = %{perl_version} %description @@ -47,8 +49,12 @@ CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL %{__make} %{?_smp_mflags} +# testsuite broken for perl-5.12 (o:F) +%if 0%{?suse_version} <= 1120 + %check %{__make} test +%endif %install %perl_make_install ++++++ FreezeThaw-0.45.tar.bz2 -> FreezeThaw-0.50.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FreezeThaw-0.45/Changes new/FreezeThaw-0.50/Changes --- old/FreezeThaw-0.45/Changes 2009-02-10 08:31:00.000000000 +0100 +++ new/FreezeThaw-0.50/Changes 2010-03-08 00:55:38.000000000 +0100 @@ -30,3 +30,7 @@ Version 0.45: Maxpointer decimal width was wrongly calculated on 64bit machines with narrow NVs. +Version 0.5 + Support RExes of 5.11 and later (XXXX but not yet reblessed ones...) + (prototype by Andreas Koenig) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FreezeThaw-0.45/FreezeThaw.pm new/FreezeThaw-0.50/FreezeThaw.pm --- old/FreezeThaw-0.45/FreezeThaw.pm 2009-02-10 08:29:56.000000000 +0100 +++ new/FreezeThaw-0.50/FreezeThaw.pm 2010-03-08 00:45:42.000000000 +0100 @@ -285,7 +285,7 @@ use Exporter; @ISA = qw(Exporter); -$VERSION = '0.45'; +$VERSION = '0.50'; @EXPORT_OK = qw(freeze thaw cmpStr cmpStrHard safeFreeze); use strict; @@ -309,6 +309,17 @@ qw( $uninitOK ), # Localized in thawScalar() qw( @uninit ), # Localized in thaw() qw($safe); # Localized in safeFreeze() + +BEGIN { # allow optimization away + my $haveIsRex = defined &re::is_regexp; + my $RexIsREGEXP = ($haveIsRex and 'REGEXP' eq ref qr/1/); # First-class REX + eval <<EOE or die; +sub haveIsRex () {$haveIsRex} +sub RexIsREGEXP () {$RexIsREGEXP} +1 +EOE +} + my (%saved); my %Empty = ( ARRAY => sub {[]}, HASH => sub {{}}, @@ -316,7 +327,9 @@ REF => sub {my $undef; \$undef}, CODE => 1, # 1 means atomic GLOB => 1, - Regexp => 0, + (RexIsREGEXP + ? (REGEXP => sub {my $qr = qr//}) + : (Regexp => 0)), ); # This should better be done via pos() and \G, but apparently \G is not @@ -370,7 +383,7 @@ } sub _2rex ($); -if (eval '"Regexp" eq ref qr/1/') { +if (eval 'ref qr/1/') { eval 'sub _2rex ($) {my $r = shift; qr/$r/} 1' or die; } else { eval 'sub _2rex ($) { shift } 1' or die; @@ -462,7 +475,8 @@ } return &freezeArray if $ref eq 'ARRAY'; return &freezeHash if $ref eq 'HASH'; - return &freezeREx if $ref eq 'Regexp' and not defined ${$_[0]}; + return &freezeREx if haveIsRex ? re::is_regexp($_[0]) + : ($ref eq 'Regexp' and not defined ${$_[0]}); $string .= "*", return &freezeString if $ref eq 'GLOB' and !$safe; $string .= "&", return &freezeString @@ -653,6 +667,9 @@ @$first = @$second; } elsif ($ref eq 'HASH') { %$first = %$second; + } elsif (haveIsRex ? re::is_regexp($second) + : ($ref eq 'Regexp' and not defined $$second)) { + $first = qr/$second/; } else { croak "Don't know how to copyContents of type `$ref'"; } @@ -830,13 +847,15 @@ sub UNIVERSAL::FreezeInstance { my($obj,$cooky) = @_; - return if (ref $obj and ref $obj eq 'Regexp' and not defined $$obj); # Regexp + return if !RexIsREGEXP # Special-case non-1st-class RExes + and ref $obj and (haveIsRex ? re::is_regexp($obj) + : (ref $obj eq 'Regexp' and not defined $$obj)); # Regexp $obj->Freeze($cooky); } sub UNIVERSAL::Instantiate { my($package,$pre,$cooky) = @_; - return if $package eq 'Regexp'; + return if !RexIsREGEXP and $package eq 'Regexp'; my $obj = $package->Thaw($cooky); # SvAMAGIC() is a property of a reference, not of a referent! # Thus we cannot use $pre here if $obj was overloaded... @@ -859,7 +878,7 @@ } elsif ($e) { freezeScalar($obj,1,1); # Atomic undef; - } elsif (defined $e and not defined $$obj) { # Regexp + } elsif (!RexIsREGEXP and defined $e and not defined $$obj) { # REx pre-5.11 freezeREx($obj); undef; } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FreezeThaw-0.45/META.yml new/FreezeThaw-0.50/META.yml --- old/FreezeThaw-0.45/META.yml 2009-02-10 08:33:46.000000000 +0100 +++ new/FreezeThaw-0.50/META.yml 2010-03-08 00:56:10.000000000 +0100 @@ -1,10 +1,21 @@ -# http://module-build.sourceforge.net/META-spec.html -#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# -name: FreezeThaw -version: 0.45 -version_from: FreezeThaw.pm -installdirs: site -requires: - -distribution_type: module -generated_by: ExtUtils::MakeMaker version 6.30 +--- #YAML:1.0 +name: FreezeThaw +version: 0.50 +abstract: ~ +author: + - Ilya Zakharevich <ilyaz@cpan.org> +license: unknown +distribution_type: module +configure_requires: + ExtUtils::MakeMaker: 0 +build_requires: + ExtUtils::MakeMaker: 0 +requires: {} +no_index: + directory: + - t + - inc +generated_by: ExtUtils::MakeMaker version 6.54 +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FreezeThaw-0.45/t/FreezeThaw.t new/FreezeThaw-0.50/t/FreezeThaw.t --- old/FreezeThaw-0.45/t/FreezeThaw.t 2002-03-30 02:49:54.000000000 +0100 +++ new/FreezeThaw-0.50/t/FreezeThaw.t 2010-03-08 00:39:50.000000000 +0100 @@ -210,7 +210,7 @@ 090230047702789306640625 \Z /x; print "ok 27\n"; -if (eval '"Regexp" eq ref qr/1/') { # Have qr// +if (eval 'ref qr/1/') { # Have qr// eval <<'EOE'; my $rex = qr/^abc/mi; my $f = freeze [$rex, $rex, 11]; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de