Skip to content

Commit

Permalink
Update Pod-Escapes to CPAN version 1.06
Browse files Browse the repository at this point in the history
  [DELTA]

1.06 2014-02-14 NEILB

    - e2charnum() was using \d but should use [0-9].
      RT#70246 report and fix from MARCGREEN
    - Added a bunch of pod-related links to SEE ALSO
  • Loading branch information
bingos committed Feb 14, 2014
1 parent 4620cb6 commit 38d111e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Porting/Maintainers.pl
Expand Up @@ -926,7 +926,7 @@ package Maintainers;
},

'Pod::Escapes' => {
'DISTRIBUTION' => 'NEILB/Pod-Escapes-1.05.tar.gz',
'DISTRIBUTION' => 'NEILB/Pod-Escapes-1.06.tar.gz',
'FILES' => q[cpan/Pod-Escapes],
},

Expand Down
16 changes: 11 additions & 5 deletions cpan/Pod-Escapes/lib/Pod/Escapes.pm
Expand Up @@ -17,7 +17,7 @@ use vars qw(

require Exporter;
@ISA = ('Exporter');
$VERSION = '1.05';
$VERSION = '1.06';
@EXPORT_OK = qw(
%Code2USASCII
%Name2character
Expand Down Expand Up @@ -90,7 +90,7 @@ sub e2charnum {
$in = hex $1;
} # else it's decimal, or named

if($in =~ m/^\d+$/s) {
if($in =~ m/^[0-9]+$/s) {
return 0 + $in;
} else {
return $Name2character_number{$in}; # returns undef if unknown
Expand Down Expand Up @@ -641,11 +641,17 @@ C<chr($Name2character_number{$name})>.
=head1 SEE ALSO
L<perlpod|perlpod>
L<Pod::Browser> - a pod web server based on L<Catalyst>.
L<Pod::Checker> - check pod documents for syntax errors.
L<Pod::Coverage> - check if the documentation for a module is comprehensive.
L<perlpod> - description of pod format (for people documenting with pod).
L<perlpodspec|perlpodspec>
L<perlpodspec> - specification of pod format (for people processing it).
L<Text::Unidecode|Text::Unidecode>
L<Text::Unidecode> - ASCII transliteration of Unicode text.
=head1 REPOSITORY
Expand Down
6 changes: 5 additions & 1 deletion cpan/Pod-Escapes/t/15_name2charnum.t
Expand Up @@ -3,9 +3,10 @@

use strict;
use Test;
use utf8;

my @them;
BEGIN { plan('tests' => 41) };
BEGIN { plan('tests' => 42) };
BEGIN { print "# Perl version $] under $^O\n" }

use Pod::Escapes qw(:ALL);
Expand Down Expand Up @@ -78,4 +79,7 @@ ok scalar keys %Name2character_number;
ok defined $Name2character_number{'eacute'};
ok $Name2character_number{'lt'} eq '60';

# e2charnum on BENGALI DIGIT SEVEN should return undef
ok(!defined(e2charnum('')));

# End

0 comments on commit 38d111e

Please sign in to comment.