Skip Menu |

This queue is for tickets about the Regexp-Common CPAN distribution.

Report information
The Basics
Id: 103850
Status: resolved
Priority: 0/
Queue: Regexp-Common

People
Owner: Nobody in particular
Requestors: DAVEWOOD [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Example from Synopsis fails with syntax error
#!/usr/bin/env perl use 5.018; use warnings; use Regexp::Common; while (<>) { /$RE{num}{real}/ and print q{a number}; /$RE{quoted}/ and print q{a ['"`] quoted string}; /$RE{delimited}{-delim=>'/'}/ and print q{a /.../ sequence}; /$RE{balanced}{-parens=>'()'}/ and print q{balanced parentheses}; /$RE{profanity}/ and print q{a #*@%-ing word}; } syntax error at recommon.pl line 10, near "/$RE{balanced}{-parens=>'(" (Might be a runaway multi-line '' string starting on line 9) Can't find string terminator "'" anywhere before EOF at recommon.pl line 10.
replace the slash with some other character and it works. - RE{delimited}{-delim=>'/'} + RE{delimited}{-delim=>'!'} On Tue Apr 21 03:29:52 2015, DAVEWOOD wrote: Show quoted text
> #!/usr/bin/env perl > use 5.018; > use warnings; > use Regexp::Common; > > while (<>) { > /$RE{num}{real}/ and print q{a number}; > /$RE{quoted}/ and print q{a ['"`] quoted string}; > /$RE{delimited}{-delim=>'/'}/ and print q{a /.../ sequence}; > /$RE{balanced}{-parens=>'()'}/ and print q{balanced parentheses}; > /$RE{profanity}/ and print q{a #*@%-ing word}; > } > > > syntax error at recommon.pl line 10, near "/$RE{balanced}{-parens=>'(" > (Might be a runaway multi-line '' string starting on line 9) > Can't find string terminator "'" anywhere before EOF at recommon.pl line 10.
This is fixed in version 2016052901