r71173 - in /trunk/libregexp-reggrp-perl: Changes debian/changelog lib/Regexp/RegGrp.pm t/01-io.t
emhn-guest at users.alioth.debian.org
emhn-guest at users.alioth.debian.org
Fri Mar 11 14:23:17 UTC 2011
Author: emhn-guest
Date: Fri Mar 11 14:22:49 2011
New Revision: 71173
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=71173
Log:
New upstream release.
Modified:
trunk/libregexp-reggrp-perl/Changes
trunk/libregexp-reggrp-perl/debian/changelog
trunk/libregexp-reggrp-perl/lib/Regexp/RegGrp.pm
trunk/libregexp-reggrp-perl/t/01-io.t
Modified: trunk/libregexp-reggrp-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-reggrp-perl/Changes?rev=71173&op=diff
==============================================================================
--- trunk/libregexp-reggrp-perl/Changes (original)
+++ trunk/libregexp-reggrp-perl/Changes Fri Mar 11 14:22:49 2011
@@ -1,4 +1,7 @@
Revision history for Regexp-RegGrp
+
+1.000001 2011-02-27
+ - Fixed "undefined submatches bug" (Thanks to Dan Thomas).
1.000 2011-01-17
- Changed versioning.
Modified: trunk/libregexp-reggrp-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-reggrp-perl/debian/changelog?rev=71173&op=diff
==============================================================================
--- trunk/libregexp-reggrp-perl/debian/changelog (original)
+++ trunk/libregexp-reggrp-perl/debian/changelog Fri Mar 11 14:22:49 2011
@@ -1,3 +1,9 @@
+libregexp-reggrp-perl (1.000001-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Ernesto Hernández-Novich (USB) <emhn at usb.ve> Fri, 11 Mar 2011 09:52:25 -0430
+
libregexp-reggrp-perl (1.000-1) unstable; urgency=low
* Initial Release. (Closes: #614415)
Modified: trunk/libregexp-reggrp-perl/lib/Regexp/RegGrp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-reggrp-perl/lib/Regexp/RegGrp.pm?rev=71173&op=diff
==============================================================================
--- trunk/libregexp-reggrp-perl/lib/Regexp/RegGrp.pm (original)
+++ trunk/libregexp-reggrp-perl/lib/Regexp/RegGrp.pm Fri Mar 11 14:22:49 2011
@@ -21,7 +21,7 @@
# =========================================================================== #
-our $VERSION = '1.000';
+our $VERSION = '1.000001';
sub new {
my ( $class, $in_ref ) = @_;
@@ -193,7 +193,7 @@
my $match = $match_hash{$match_key};
my @submatches = $match =~ $self->{reggrp}->[$midx]->{regexp};
- map { $_ ||= ''; } @submatches;
+ map { $_ .= ''; } @submatches;
my $ret = $match;
@@ -287,7 +287,7 @@
=head1 VERSION
-Version 1.000
+Version 1.000001
=head1 DESCRIPTION
Modified: trunk/libregexp-reggrp-perl/t/01-io.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-reggrp-perl/t/01-io.t?rev=71173&op=diff
==============================================================================
--- trunk/libregexp-reggrp-perl/t/01-io.t (original)
+++ trunk/libregexp-reggrp-perl/t/01-io.t Fri Mar 11 14:22:49 2011
@@ -40,7 +40,7 @@
]
},
{
- description => 'Simple regexes with sub replacements',
+ description => 'Simple regexes with sub replacements I',
input_string => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz',
expected_output => 'bacdefghijklmnopqrstuvwxyYZbacdefghijklmnopqrstuvwxyYZ',
reggrp => [
@@ -67,6 +67,22 @@
my $match = $in_ref->{match};
my $submatches = $in_ref->{submatches};
return sprintf( "%s%s", $match, $submatches->[0] );
+ }
+ }
+ ]
+ },
+ {
+ description => 'Simple regexes with sub replacements II',
+ input_string => 'a1a2a0a1a0a2a3bcde',
+ expected_output => 'a1a2a0a1a0a2a3bcde',
+ reggrp => [
+ {
+ regexp => qr/(a)(\d)/,
+ replacement => sub {
+ my $in_ref = shift;
+ my $submatches = $in_ref->{submatches};
+
+ return sprintf( "%s%s", $submatches->[0], $submatches->[1] );
}
}
]
More information about the Pkg-perl-cvs-commits
mailing list