From: Rafael Garcia-Suarez Date: Sat, 9 Aug 2003 12:43:50 +0000 (+0000) Subject: Change #20578 to SelfLoader is probably also useful to AutoSplit. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=957f93eee96ef9053b2451ad433491dc67fedaa4;p=p5sagit%2Fp5-mst-13.2.git Change #20578 to SelfLoader is probably also useful to AutoSplit. p4raw-id: //depot/perl@20583 --- diff --git a/lib/AutoSplit.pm b/lib/AutoSplit.pm index 7fd9487..9355bfd 100644 --- a/lib/AutoSplit.pm +++ b/lib/AutoSplit.pm @@ -148,10 +148,12 @@ if (defined (&Dos::UseLFN)) { my $Is_VMS = ($^O eq 'VMS'); # allow checking for valid ': attrlist' attachments -my $nested; +# (we use 'our' rather than 'my' here, due to the rather complex and buggy +# behaviour of lexicals with qr// and (??{$lex}) ) +our $nested; $nested = qr{ \( (?: (?> [^()]+ ) | (??{ $nested }) )* \) }x; -my $one_attr = qr{ (?> (?! \d) \w+ (?:$nested)? ) (?:\s*\:\s*|\s+(?!\:)) }x; -my $attr_list = qr{ \s* : \s* (?: $one_attr )* }x; +our $one_attr = qr{ (?> (?! \d) \w+ (?:$nested)? ) (?:\s*\:\s*|\s+(?!\:)) }x; +our $attr_list = qr{ \s* : \s* (?: $one_attr )* }x;