- Timestamp:
- 07/22/08 13:55:11 (4 months ago)
- Location:
- perl5/Pugs-Compiler-Rule/lib/Pugs
- Files:
-
- 2 modified
-
Emitter/Rule/Perl5/CharClass.pm (modified) (1 diff)
-
Runtime/Regex.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
perl5/Pugs-Compiler-Rule/lib/Pugs/Emitter/Rule/Perl5/CharClass.pm
r21420 r21436 20 20 $c =~ s/\s+$//; 21 21 my $s = charnames::vianame($c); 22 return $s if $s;22 return $s if defined $s; 23 23 $s = charnames::vianame("LINE FEED (LF)") 24 24 if $c eq "LINE FEED" || $c eq "LF"; -
perl5/Pugs-Compiler-Rule/lib/Pugs/Runtime/Regex.pm
r16824 r21436 214 214 return sub { 215 215 #use charnames ':full'; 216 my $bool = $_[7]{ignorecase} 217 ? substr( $_[0], $_[5] ) =~ m/(?i)$rx/ 218 : substr( $_[0], $_[5] ) =~ m/$rx/; 219 $_[3] = Pugs::Runtime::Match->new({ 216 my $bool; 217 eval { 218 $bool = $_[7]{ignorecase} 219 ? substr( $_[0], $_[5] ) =~ m/(?i)$rx/ 220 : substr( $_[0], $_[5] ) =~ m/$rx/; 221 $_[3] = Pugs::Runtime::Match->new({ 220 222 bool => \$bool, 221 223 str => \$_[0], … … 225 227 match => [], 226 228 }); 229 1; 230 } 231 or do { 232 die "$@ in perl5 regex: /$rx/"; 233 }; 234 $_[3]; 227 235 }; 228 236 }
