From: Mike Mestnik Date: Fri, 8 Dec 2000 10:45:30 +0000 (-0600) Subject: DosGlob.pm diff for bash style brace expansion. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=37248846d1ad02415c6aca29ba73d0cae08a4d47;p=p5sagit%2Fp5-mst-13.2.git DosGlob.pm diff for bash style brace expansion. Message-ID: p4raw-id: //depot/perl@8089 --- 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 ( /^(.*)(?