Skip Menu |

This queue is for tickets about the Switch CPAN distribution.

Report information
The Basics
Id: 41124
Status: rejected
Priority: 0/
Queue: Switch

People
Owner: Nobody in particular
Requestors: degatcpan [...] ntlworld.com
Cc:
AdminCc:

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



Subject: syntax error near "}continue"
This works as expected: use Switch; switch (12) { case /\d{3}/ {print 'three digit'} case /\d{2}/ {print 'two digit'} case /\d{1}/ {print 'one digit'} else {print 'something else'} } This (the same thing twice) produces the syntax error - near "}continue" - : use Switch; switch (12) { case /\d{3}/ {print 'three digit'} case /\d{2}/ {print 'two digit'} case /\d{1}/ {print 'one digit'} else {print 'something else'} } switch (12) { case /\d{3}/ {print 'three digit'} case /\d{2}/ {print 'two digit'} case /\d{1}/ {print 'one digit'} else {print 'something else'} }
On Fri Nov 21 11:42:15 2008, DEG wrote: Documented in http://search.cpan.org/~rgarcia/Switch-2.16/Switch.pm#LIMITATIONS Show quoted text
> This works as expected: > > use Switch; > > switch (12) { > case /\d{3}/ {print 'three digit'} > case /\d{2}/ {print 'two digit'} > case /\d{1}/ {print 'one digit'} > else {print 'something else'} > } > > This (the same thing twice) produces the syntax error - near "}continue" - : > > use Switch; > > switch (12) { > case /\d{3}/ {print 'three digit'} > case /\d{2}/ {print 'two digit'} > case /\d{1}/ {print 'one digit'} > else {print 'something else'} > } > > switch (12) { > case /\d{3}/ {print 'three digit'} > case /\d{2}/ {print 'two digit'} > case /\d{1}/ {print 'one digit'} > else {print 'something else'} > }
-- Alexandr Ciornii, http://chorny.net