In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/bbd7bacc48bc053e51f3c115412abb4137bea796?hp=fe3193b514b01b0a636361da0103ed33393cf9c4>
- Log ----------------------------------------------------------------- commit bbd7bacc48bc053e51f3c115412abb4137bea796 Author: Nicholas Clark <[email protected]> Date: Sun Jun 3 22:50:57 2012 +0200 Remove commented-out debugging print statements from File:DosGlob None of these have been changed in over a decade, aside from re-indentation. Leave in 3 commented-out print statements which are necessary to understand a FIXME comment. M lib/File/DosGlob.pm commit ff3f295cdd229f2736e9ad06835c5c121ea45fad Author: Nicholas Clark <[email protected]> Date: Sun Jun 3 22:39:50 2012 +0200 Refactor File::DosGlob to avoid an unescaped { in a regex. This avoids generating deprecation warnings. M lib/File/DosGlob.pm M pod/perldelta.pod ----------------------------------------------------------------------- Summary of changes: lib/File/DosGlob.pm | 12 ++---------- pod/perldelta.pod | 6 ++++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/File/DosGlob.pm b/lib/File/DosGlob.pm index e6d548e..8208f67 100644 --- a/lib/File/DosGlob.pm +++ b/lib/File/DosGlob.pm @@ -6,7 +6,7 @@ package File::DosGlob; -our $VERSION = '1.07'; +our $VERSION = '1.08'; use strict; use warnings; @@ -14,7 +14,6 @@ sub doglob { my $cond = shift; my @retval = (); my $fix_drive_relative_paths; - #print "doglob: ", join('|', @_), "\n"; OUTER: for my $pat (@_) { my @matched = (); @@ -38,7 +37,6 @@ sub doglob { } if ($pat =~ m|^(.*)([\\/])([^\\/]*)\z|s) { ($head, $sepchr, $tail) = ($1,$2,$3); - #print "div: |$head|$sepchr|$tail|\n"; push (@retval, $pat), next OUTER if $tail eq ''; if ($head =~ /[*?]/) { @globdirs = doglob('d', $head); @@ -70,7 +68,6 @@ sub doglob { $pat =~ s/\*/.*/g; $pat =~ s/\?/.?/g; - #print "regex: '$pat', head: '$head'\n"; my $matchsub = sub { $_[0] =~ m|^$pat\z|is }; INNER: for my $e (@leaves) { @@ -139,7 +136,6 @@ sub glob { #print "Got: \n\t$start\n\t$match\n\t$end\n"; my $tmp = "$start$match$end"; while ( $tmp =~ s/^(.*?)(?<!\\)\{(?:.*(?<!\\)\,)?(.*\Q$match\E.*?)(?:(?<!\\)\,.*)?(?<!\\)\}(.*)$/$1$2$3/ ) { - #print "Striped: $tmp\n"; # these expansions will be performed by the original, # when we call REHASH. } @@ -157,7 +153,6 @@ sub glob { } if ( $#appendpat != -1 ) { - #print "LOOP\n"; #FIXME: Max loop, no way! :") for ( @appendpat ) { push @pat, $_; @@ -166,11 +161,8 @@ sub glob { } } for ( @pat ) { - s/\\{/{/g; - s/\\}/}/g; - s/\\,/,/g; + s/\\([{},])/$1/g; } - #print join ("\n", @pat). "\n"; $entries{$cxix} = [doglob(1,@pat)]; } diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 946f3f7..4f3483e 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -103,6 +103,12 @@ XXX =item * +L<File::DosGlob> has been upgraded from version 1.07 to 1.08. + +There are no visible changes, only minor internal refactorings. + +=item * + L<IO> has been upgraded from version 1.25_06 to version 1.25_07. C<sync()> can now be called on read only file handles [perl #64772]. -- Perl5 Master Repository
