From 37248846d1ad02415c6aca29ba73d0cae08a4d47 Mon Sep 17 00:00:00 2001 From: Mike Mestnik Date: Fri, 8 Dec 2000 04:45:30 -0600 Subject: [PATCH] DosGlob.pm diff for bash style brace expansion. Message-ID: p4raw-id: //depot/perl@8089 --- lib/File/DosGlob.pm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/lib/File/DosGlob.pm b/lib/File/DosGlob.pm index 3401b5f..2b4d39a 100644 --- a/lib/File/DosGlob.pm +++ b/lib/File/DosGlob.pm @@ -1,5 +1,8 @@ #!perl -w +# use strict fails +#Can't use string ("main::glob") as a symbol ref while "strict refs" in use at /usr/lib/perl5/5.005/File/DosGlob.pm line 191. + # # Documentation at the __END__ # @@ -116,6 +119,52 @@ sub glob { push @pat, $pat; } + # Mike Mestnik: made to do abc{1,2,3} == abc1 abc2 abc3. + # abc3 will be the original {3} (and drop the {}). + # abc1 abc2 will be put in @appendpat. + # This was just the esiest way, not nearly the best. + REHASH: { + my @appendpat = (); + for (@pat) { + # There must be a "," I.E. abc{efg} is not what we want. + while ( /^(.*)(?