Permalink
Browse files

Fix Full->operator

The implementation of ->operator in Number::Phone::FR::Full was broken
for a some releases (at least 0.04, 0.05). Fixed now.
Bumped version for the future 0.06 release.
Added Changes for the release.
  • Loading branch information...
1 parent 4095006 commit 2040a5ea30ebe23b83097ddce71936ff50be7ca9 @dolmen committed Nov 11, 2011
Showing with 9 additions and 6 deletions.
  1. +6 −3 Changes
  2. +1 −1 inc/Build/Author.pm
  3. +1 −1 inc/Build/Number-Phone-FR-Full.tt2
  4. +1 −1 lib/Number/Phone/FR.pm
View
@@ -1,8 +1,11 @@
Revision history for Number::Phone::FR.
-0.05
- Add examples/format.pl.
- Add README.
+0.06
+ Fix loading of :Full and :Simple (loading was broken since a few
+ releases, and the tests did not correctly test).
+ Fix ->opterator in :Full (broken since a few releases).
+ Add "examples/format.pl" file.
+ Add "README" file.
0.0511217 2011-09-03 DOLMEN (Olivier Mengué)
Use \A and \z instead of ^ and $ in regexps.
View
@@ -190,7 +190,7 @@ sub ACTION_parse
eval 'qr/'.$re_all->as_string.'/;1' or die $@;
my $re_ops = $ops->[2]->as_string;
- #$re_ops =~ s/\A\(?:/(/ or $re_ops = "($re_ops)";
+
($re_0, $re_full, $re_network, $re_pfx, $re_ops, $re_all) = map {
my $re = ref $_ ? $_->as_string : $_;
$re =~ s/\\d/[0-9]/g;
@@ -35,7 +35,7 @@ sub operator
my $num = Number::Phone::FR::subscriber(@_);
return unless defined $num;
$num .= '_' x (9 - length($num));
- if ("${num}[% STR_OPERATORS %]" =~ m/\A[% RE_OPERATOR %]/) {
+ if ("${num}[% STR_OPERATORS %]" =~ m/^([% RE_OPERATOR %])/) {
my $op = substr($1, -4);
$op =~ s/ *$//;
return $op;
View
@@ -7,7 +7,7 @@ package Number::Phone::FR;
# $VERSION is limited to 2 digits after the dot
# Other digits are reserved for ARCEP data versonning
# in Number::Phone::FR::Full
-our $VERSION = '0.05';
+our $VERSION = '0.06';
use Number::Phone;
use parent 'Number::Phone';

0 comments on commit 2040a5e

Please sign in to comment.