Skip Menu |

This queue is for tickets about the Switch CPAN distribution.

Report information
The Basics
Id: 24027
Status: open
Priority: 0/
Queue: Switch

People
Owner: Nobody in particular
Requestors: MichaelRWolf [...] att.net
Cc:
AdminCc:

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



Subject: regexp captures not available in case body
Subject: broken_switch.pl
#! /usr/bin/perl use warnings; use Switch; $data = 'catch 22'; switch ($data) { case qr/catch (\d+)/ { print "I know my gross situation: $data\n"; print "My parsed situation is unknown: $1\n"; warn 'Matched, but not captured' unless defined $1; } else { warn "$data is unrecognized\n"; } }
At the very least, could you document that regexp captures are *not* expected to work? That could help some future users from having problems.