r72714 - in /trunk/libregexp-common-perl: Changes META.yml Makefile.PL debian/changelog lib/Regexp/Common.pm lib/Regexp/Common/comment.pm lib/Regexp/Common/number.pm t/Common.pm t/comment/delimited.t t/number/decimal.t
carnil at users.alioth.debian.org
carnil at users.alioth.debian.org
Sun Apr 17 20:30:07 UTC 2011
Author: carnil
Date: Sun Apr 17 20:29:55 2011
New Revision: 72714
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=72714
Log:
New upstream release
Modified:
trunk/libregexp-common-perl/Changes
trunk/libregexp-common-perl/META.yml
trunk/libregexp-common-perl/Makefile.PL
trunk/libregexp-common-perl/debian/changelog
trunk/libregexp-common-perl/lib/Regexp/Common.pm
trunk/libregexp-common-perl/lib/Regexp/Common/comment.pm
trunk/libregexp-common-perl/lib/Regexp/Common/number.pm
trunk/libregexp-common-perl/t/Common.pm
trunk/libregexp-common-perl/t/comment/delimited.t
trunk/libregexp-common-perl/t/number/decimal.t
Modified: trunk/libregexp-common-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-common-perl/Changes?rev=72714&op=diff
==============================================================================
--- trunk/libregexp-common-perl/Changes (original)
+++ trunk/libregexp-common-perl/Changes Sun Apr 17 20:29:55 2011
@@ -1,3 +1,15 @@
+Version 2011041701 Sun Apr 17 14:22:58 CEST 2011
++ Fix documentation (matches should be match). Reported by cogent at cpan.org
+ in RT ticket 2833.
++ Added patterns for JavaDoc comments. (RT 13174 by chris+rt at chrisdolan.net)
+
+Version 2011041602 Sat Apr 16 17:06:28 CEST 2011
++ Fix typo in repository (avar at cpan.org)
+
+Version 2011041601 Sat Apr 16 16:07:29 CEST 2011
++ Fix bugs 61712 & 6940: $RE {num} {decimal} and $RE {num} {real} no longer
+ match a single dot.
+
Version 2010010201 Sat Jan 2 17:45:53 CET 2010
+ Playing the CPANTS game
+ Adjustments for 5.005.
Modified: trunk/libregexp-common-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-common-perl/META.yml?rev=72714&op=diff
==============================================================================
--- trunk/libregexp-common-perl/META.yml (original)
+++ trunk/libregexp-common-perl/META.yml Sun Apr 17 20:29:55 2011
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Regexp-Common
-version: 2010010201
+version: 2011041701
abstract: Provide commonly requested regular expressions
author:
- Abigail <regexp-common at abigail.be>
@@ -17,7 +17,7 @@
strict: 0
vars: 0
resources:
- repository: git://github.com/Abigail/Regexp-Common.git
+ repository: git://github.com/Abigail/Regexp--Common.git
no_index:
directory:
- t
Modified: trunk/libregexp-common-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-common-perl/Makefile.PL?rev=72714&op=diff
==============================================================================
--- trunk/libregexp-common-perl/Makefile.PL (original)
+++ trunk/libregexp-common-perl/Makefile.PL Sun Apr 17 20:29:55 2011
@@ -24,7 +24,7 @@
'strict' => 0,
},
resources => {
- repository => 'git://github.com/Abigail/Regexp-Common.git',
+ repository => 'git://github.com/Abigail/Regexp--Common.git',
},
keywords => ['regular expression', 'pattern'],
},
Modified: trunk/libregexp-common-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-common-perl/debian/changelog?rev=72714&op=diff
==============================================================================
--- trunk/libregexp-common-perl/debian/changelog (original)
+++ trunk/libregexp-common-perl/debian/changelog Sun Apr 17 20:29:55 2011
@@ -1,8 +1,12 @@
-libregexp-common-perl (2010010201-2) UNRELEASED; urgency=low
+libregexp-common-perl (2011041701-1) UNRELEASED; urgency=low
+ [ gregor herrmann ]
* debian/rules: switch order of arguments to dh.
- -- gregor herrmann <gregoa at debian.org> Wed, 28 Jul 2010 14:33:16 -0400
+ [ Salvatore Bonaccorso ]
+ * New upstream release
+
+ -- Salvatore Bonaccorso <carnil at debian.org> Sun, 17 Apr 2011 22:29:09 +0200
libregexp-common-perl (2010010201-1) unstable; urgency=low
Modified: trunk/libregexp-common-perl/lib/Regexp/Common.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-common-perl/lib/Regexp/Common.pm?rev=72714&op=diff
==============================================================================
--- trunk/libregexp-common-perl/lib/Regexp/Common.pm (original)
+++ trunk/libregexp-common-perl/lib/Regexp/Common.pm Sun Apr 17 20:29:55 2011
@@ -18,7 +18,7 @@
use warnings;
use vars qw /$VERSION %RE %sub_interface $AUTOLOAD/;
-$VERSION = '2010010201';
+$VERSION = '2011041701';
sub _croak {
@@ -333,7 +333,7 @@
my $char = quotemeta $flags->{-char};
return '(?:^$char+$)';
},
- matches => sub {
+ match => sub {
my ($self, $str) = @_;
return $str !~ /[^$self->{flags}{-char}]/;
},
@@ -619,7 +619,7 @@
always capture the entire pattern, but this is not enforced.
-=item C<matches =E<gt> $sub_ref>
+=item C<match =E<gt> $sub_ref>
An optional argument that specifies a subroutine that is to be called when
the C<$RE{...}-E<gt>matches(...)> method of this pattern is invoked.
@@ -631,7 +631,7 @@
pattern name => [qw( line of -char )],
create => sub {...},
- matches => sub {
+ match => sub {
my ($self, $str) = @_;
$str !~ /[^$self->{flags}{-char}]/;
},
Modified: trunk/libregexp-common-perl/lib/Regexp/Common/comment.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-common-perl/lib/Regexp/Common/comment.pm?rev=72714&op=diff
==============================================================================
--- trunk/libregexp-common-perl/lib/Regexp/Common/comment.pm (original)
+++ trunk/libregexp-common-perl/lib/Regexp/Common/comment.pm Sun Apr 17 20:29:55 2011
@@ -69,6 +69,9 @@
{languages => [qw /J/],
to_eol => ['NB[.]']},
+
+ {languages => [qw /JavaDoc/],
+ from_to => [[qw {/** */}]]},
{languages => [qw /Nickle/],
to_eol => ['#'],
@@ -684,6 +687,14 @@
C</*>, and end with C<*/>. If C<{-keep}> is used, only C<$1> will be
set, and set to the entire comment.
+=item JavaDoc
+
+The I<Javadoc> documentation syntax is demarked with a subset of
+ordinary Java comments to separate it from code. Comments start with
+C</**> end with C<*/>. If C<{-keep}> is used, only C<$1> will be set,
+and set to the entire comment. See
+L<http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#format>.
+
=item JavaScript
The I<JavaScript> language has two forms of comments. Comments that start with
Modified: trunk/libregexp-common-perl/lib/Regexp/Common/number.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-common-perl/lib/Regexp/Common/number.pm?rev=72714&op=diff
==============================================================================
--- trunk/libregexp-common-perl/lib/Regexp/Common/number.pm (original)
+++ trunk/libregexp-common-perl/lib/Regexp/Common/number.pm Sun Apr 17 20:29:55 2011
@@ -50,12 +50,12 @@
foreach ($radix, $sep, $expon) {$_ = "[$_]" if 1 == length}
my $chars = substr $digits, 0, $base;
return $sep
- ? qq {(?k:(?i)(?k:[+-]?)(?k:(?=[$chars]|$radix)} .
- qq {(?k:[$chars]{1,$group}(?:(?:$sep)[$chars]{$group})*)} .
+ ? qq {(?k:(?i)(?k:[+-]?)(?k:(?=$radix?[$chars])} .
+ qq {(?k:[$chars]{1,$group}(?:(?:$sep)[$chars]{$group})*)} .
qq {(?:(?k:$radix)(?k:[$chars]{$places}))?)} .
qq {(?:(?k:$expon)(?k:(?k:[+-]?)(?k:[$chars]+))|))}
- : qq {(?k:(?i)(?k:[+-]?)(?k:(?=[$chars]|$radix)} .
- qq {(?k:[$chars]*)(?:(?k:$radix)(?k:[$chars]{$places}))?)} .
+ : qq {(?k:(?i)(?k:[+-]?)(?k:(?=$radix?[$chars])} .
+ qq {(?k:[$chars]*)(?:(?k:$radix)(?k:[$chars]{$places}))?)} .
qq {(?:(?k:$expon)(?k:(?k:[+-]?)(?k:[$chars]+))|))};
}
sub decimal_creator {
@@ -68,10 +68,10 @@
foreach ($radix, $sep) {$_ = "[$_]" if 1 == length}
my $chars = substr $digits, 0, $base;
return $sep
- ? qq {(?k:(?i)(?k:[+-]?)(?k:(?=[$chars]|$radix)} .
- qq {(?k:[$chars]{1,$group}(?:(?:$sep)[$chars]{$group})*)} .
+ ? qq {(?k:(?i)(?k:[+-]?)(?k:(?=$radix?[$chars])} .
+ qq {(?k:[$chars]{1,$group}(?:(?:$sep)[$chars]{$group})*)} .
qq {(?:(?k:$radix)(?k:[$chars]{$places}))?))}
- : qq {(?k:(?i)(?k:[+-]?)(?k:(?=[$chars]|$radix)} .
+ : qq {(?k:(?i)(?k:[+-]?)(?k:(?=$radix?[$chars])} .
qq {(?k:[$chars]*)(?:(?k:$radix)(?k:[$chars]{$places}))?))}
}
Modified: trunk/libregexp-common-perl/t/Common.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-common-perl/t/Common.pm?rev=72714&op=diff
==============================================================================
--- trunk/libregexp-common-perl/t/Common.pm (original)
+++ trunk/libregexp-common-perl/t/Common.pm Sun Apr 17 20:29:55 2011
@@ -16,6 +16,8 @@
gimme sample/;
my @STATES = qw /pass fail/;
+
+our $SKIP;
use constant NORMAL_PASS => 0x01; # Normal test, should pass.
use constant NORMAL_FAIL => 0x02; # Normal test, should fail.
@@ -50,11 +52,13 @@
sub mess {
my $str = stringify $_;
my $com = join " " => map {stringify $_} @_;
- printf qq !%4d - %-40s (%s)\n! => ++ $count, qq !"$str"!, $com;
-}
-
-sub pass {print "ok "; &mess}
-sub fail {print "not ok "; &mess}
+ $count ++;
+ if ($SKIP) {printf qq !%4d # SKIP: %s\n! => $count, $SKIP;}
+ else {printf qq !%4d - %-40s (%s)\n! => $count, qq !"$str"!, $com;}
+}
+
+sub pass {print "ok "; &mess}
+sub fail {print +$SKIP ? "ok " : "not ok "; &mess}
sub Fail {
my $mess = shift;
@@ -452,6 +456,8 @@
my $pass = $$test_set {pass};
my $fail = $$test_set {fail};
+
+ my $skip_sub = $$test_set {skip_sub};
#
# Run the passes.
@@ -489,6 +495,11 @@
ref $parts ? join "" => @$parts : $parts;
#
+ # See whether we want to skip the test
+ #
+ local $SKIP = $skip_sub && $skip_sub -> (pass => $_);
+
+ #
# Find out the things {-keep} should return.
# The thing we match agains is in $_.
#
@@ -538,6 +549,8 @@
my @qargs = get_args query_args => $target_info, $test_set;
local $_ = $query ? $query -> (@qargs, @args)
: ref $parts ? join "" => @$parts : $parts;
+
+ local $SKIP = $skip_sub && $skip_sub -> (fail => $_);
my %skips;
foreach my $skip (qw /RE SB/) {
Modified: trunk/libregexp-common-perl/t/comment/delimited.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-common-perl/t/comment/delimited.t?rev=72714&op=diff
==============================================================================
--- trunk/libregexp-common-perl/t/comment/delimited.t (original)
+++ trunk/libregexp-common-perl/t/comment/delimited.t Sun Apr 17 20:29:55 2011
@@ -19,6 +19,7 @@
[qw {<?_c _c?>} => [qw {BML}]],
[qw !{ }! => [qw {False}]],
[qw {, ,} => [qw {Haifu}]],
+ [qw {/** */} => [qw {JavaDoc}]],
[qw {(* *)} => [qw {Oberon}]],
[qw {" "} => [qw {Smalltalk}]],
[qw {|| !!} => [qw {*W}]],
@@ -82,11 +83,13 @@
$langX =~ s/\W/X/g;
no strict 'refs';
push @tests => {
- name => $lang,
- regex => $RE {comment} {$lang},
- sub => \&{"RE_comment_$langX"},
- pass => [$pass_key],
- fail => [$fail_key],
+ name => $lang,
+ regex => $RE {comment} {$lang},
+ sub => \&{"RE_comment_$langX"},
+ pass => [$pass_key],
+ fail => [$fail_key],
+ skip_sub => sub {$lang eq 'JavaDoc' && $_ [0] eq 'fail' &&
+ $_ [1] eq '/***/'},
}
}
}
Modified: trunk/libregexp-common-perl/t/number/decimal.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-common-perl/t/number/decimal.t?rev=72714&op=diff
==============================================================================
--- trunk/libregexp-common-perl/t/number/decimal.t (original)
+++ trunk/libregexp-common-perl/t/number/decimal.t Sun Apr 17 20:29:55 2011
@@ -73,6 +73,11 @@
};
}
+$targets {dot} = {
+ list => ['.'],
+ query => sub {$_ [0]},
+};
+
sub __ {
map {;"${_}_int", "${_}_int_dot",
"${_}_minus_int", "${_}_plus_int",
@@ -84,8 +89,8 @@
name => 'basic',
re => $decimal,
sub => \&RE_num_decimal,
- pass => [__ grep {$_ <= 10} map {$$_ [0]} @data],
- fail => [__ grep {$_ > 10} map {$$_ [0]} @data],
+ pass => [__ (grep {$_ <= 10} map {$$_ [0]} @data)],
+ fail => [__ (grep {$_ > 10} map {$$_ [0]} @data), "dot"],
};
foreach my $data (@data) {
@@ -101,7 +106,7 @@
sub => \&RE_num_decimal,
sub_args => [-base => $base],
pass => [@passes],
- fail => [@failures, @commas],
+ fail => [@failures, @commas, "dot"],
};
push @tests => {
name => "base_${base}_comma",
@@ -114,6 +119,7 @@
}
+
run_new_tests targets => \%targets,
tests => \@tests,
version_from => 'Regexp::Common::number',
More information about the Pkg-perl-cvs-commits
mailing list