[Jifty-commit] r2351 - jifty/trunk/lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Dec 8 10:50:55 EST 2006


Author: audreyt
Date: Fri Dec  8 10:50:54 2006
New Revision: 2351

Modified:
   jifty/trunk/lib/Jifty/Dispatcher.pm

Log:
* Jifty::Dispatcher - Alternation in extended shell globbing syntax
  now admits zero characters as well:

    on 'foo{,.zip}'     # matches 'foo' and 'foo.zip'


Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm	Fri Dec  8 10:50:54 2006
@@ -1087,7 +1087,7 @@
     $glob =~ s{
         # Braces denote alternations
         \\ \{ (         # opening (not part of expression)
-            (?:             # one or more characters:
+            (?:             # zero or more characters:
                 \\ \\ \\ \} # ...escaped closing brace
             |
                 \\ [^\}]    # ...escaped (but not the closing brace)
@@ -1095,7 +1095,7 @@
                 [^\\]       # ...normal
             )+
         ) \\ \}         # closing (not part of expression)
-    }{'(?:'.join('|', split(/\\,/, $1)).')'}egx;
+    }{'(?:'.join('|', split(/\\,/, $1, -1)).')'}egx;
     $glob;
 }
 


More information about the Jifty-commit mailing list