- or download this
sub _decode_string {
my $pos = pos;
# Extract string with escaped characters
m!\G((?:(?:[^\x00-\x1f\\"]|\\(?:["\\/bfnrt]|u[0-9a-fA-F]{4})){0,3276
+6})*)!gc; # segfault under 5.8.x in t/20-mojo-json.t #83
my $str = $1;
- or download this
sub _decode_string {
my $pos = pos();
...
my $str = substr( $_, $pos, pos()-$pos );
Fail("Unclosed string",$pos)
if ! m{"}gc;
- or download this
sub parse_value {
if( peek( qr{['"]} ) ) {
...
}
return $str;
}
- or download this
my $FH;
my $Buf;
...
pos($Buf) = $$sv_start;
return 1;
}