From: short <> Date: Thu, 10 Jul 2003 12:17:56 +0000 (+0000) Subject: Fixed expansion of [-] filename pattern ranges. X-Git-Tag: lufs_0_9_6_captive1~28 X-Git-Url: http://git.jankratochvil.net/?p=macros.git;a=commitdiff_plain;h=b2f7664779840eca0c314a4cd035e6af7c500bf9 Fixed expansion of [-] filename pattern ranges. --- diff --git a/AutoGen.pm b/AutoGen.pm index a7f223f..45f6d7e 100644 --- a/AutoGen.pm +++ b/AutoGen.pm @@ -333,8 +333,10 @@ sub _expandclass my($patt)=@_; return $patt if $patt!~/\Q[\E(.*?)\Q]\E/; - my($pre,$post)=($`,$'); # FIXME: local($`,$') doesn't work - why? - return map({ _expandclass("$pre$_$post"); } split("",$1)); + my($pre,$range,$post)=($`,$1,$'); # FIXME: local($`,$1,$') doesn't work - why? + 1 while $range=~s#(.)-(.)# join("",map(chr,(ord($1)..ord($2)))); + #ge; + return map({ _expandclass("$pre$_$post"); } split("",$range)); } sub run