develooper Front page | perl.perl5.porters | Postings from January 2008

RE: [PATCH] fix for regression to File/DosGlob.pm

Thread Previous
From:
Steve Hay
Date:
January 31, 2008 01:45
Subject:
RE: [PATCH] fix for regression to File/DosGlob.pm
Message ID:
1B32FF956ABF414C9BCE5E487A1497E70132B5A2@ukmail02.planit.group
Davies, Alex wrote:
> File/DosGlob's handling of drive relative glob patterns (eg. "D:*pl")
> was broken by a code cleanup in change 8013 (back in 2000!).
> 
> Here's the patch to restore the functionality:
> 
> --- DosGlob.pm-orig     2008-01-30 17:32:03.282701700 +0000
> +++ DosGlob.pm  2008-01-30 17:32:15.282164100 +0000
> @@ -35,7 +35,7 @@
>         # wildcards with a drive prefix such as h:*.pm must be changed
>         # to h:./*.pm to expand correctly
>         if ($pat =~ m|^([A-Za-z]:)[^/\\]|s) {
> -           substr($_,0,2) = $1 . "./";
> +           substr($pat,0,2) = $1 . "./";
>         }
>         if ($pat =~ m|^(.*)([\\/])([^\\/]*)\z|s) {
>             ($head, $sepchr, $tail) = ($1,$2,$3);

Thanks, applied as #33144.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About