develooper Front page | perl.perl5.porters | Postings from April 2008

RE: [perl #53414] perlbug AutoReply: Parse problem in Switch.pm

Thread Next
From:
David Freedman
Date:
April 27, 2008 08:29
Subject:
RE: [perl #53414] perlbug AutoReply: Parse problem in Switch.pm
Message ID:
FFBEC1DE79841C4C965378BBDA5913FC4CD6EA@EXVS01.claranet.local
Also, reading the module POD, it seems the author was aware of certain conflicts with the divisor operator
, he states:

"Due to the heuristic nature of Switch.pm's source parsing, the presence of
regexes with embedded newlines that are specified with raw C</.../>
delimiters and don't have a modifier C<//x> are indistinguishable from
code chunks beginning with the division operator C</>. As a workaround
you must use C<m/.../> or C<m?...?> for such patterns. Also, the presence
of regexes specified with raw C<?...?> delimiters may cause mysterious
errors. The workaround is to use C<m?...?> instead."

However, my example does not use embedded newlines, also, the following examples fail:

perl -MSwitch -e '$foo = (1/2); switch($s) { case m/foo/ { print } }'

perl -MSwitch -e '$foo = (1/2); switch($s) { case m/foo/i { print } }'

perl -MSwitch -e '$foo = (1/2); switch($s) { case /foo/i { print } }'

Not sure if this is so much a bug , but a limitation of the module which is not 
documented properly, either way, is a module which behaves like this suitable for the core?

Kind Regards,

David Freedman


------------------------------------------------
David Freedman
Group Network Engineering 
Claranet Limited
http://www.clara.net



-----Original Message-----
From: perlbug-followup@perl.org [mailto:perlbug-followup@perl.org]
Sent: Sun 4/27/2008 13:10
To: David Freedman
Subject: [perl #53414] perlbug AutoReply: Parse problem in Switch.pm 
 
Greetings,

This message has been automatically generated in response to the
creation of a perl bug report regarding:
   "Parse problem in Switch.pm".

There is no need to reply to this message right now.  Your ticket has been
assigned an ID of [perl #53414].  Within the next 24-72 hours, 
your message will be posted to the perl developers.  Please be patient!

Please include the string:

   [perl #53414]

in the subject line of all future correspondence about this issue. To do so, 
you may reply to this message (please delete unnecessary quotes and text.)

  Thank you,
  perlbug-followup@perl.org

-------------------------------------------------------------------------
Received: (qmail 18926 invoked from network); 27 Apr 2008 12:10:28 -0000
Received: from localhost (HELO la.mx.develooper.com) (127.0.0.1) by localhost with SMTP; 27 Apr 2008 12:10:28 -0000
Received: (qmail 18923 invoked by alias); 27 Apr 2008 12:10:28 -0000
Received: from la.mx.develooper.com (HELO x1.develooper.com) (63.251.223.176) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Sun, 27 Apr 2008 05:10:26 -0700
Received: (qmail 18849 invoked by uid 225); 27 Apr 2008 12:10:22 -0000
Received: (qmail 18845 invoked by alias); 27 Apr 2008 12:10:21 -0000
Received: from synchronicity.convergence.cx (HELO synchronicity.convergence.cx) (195.8.70.6) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sun, 27 Apr 2008 05:10:18 -0700
Received: from synchronicity.convergence.cx (localhost.localdomain [127.0.0.1]) by synchronicity.convergence.cx (8.13.8/8.13.8) with ESMTP id m3RCL8Xq005261 for <perlbug@perl.org>; Sun, 27 Apr 2008 13:21:08 +0100
Received: (from tdcdf1@localhost) by synchronicity.convergence.cx (8.13.8/8.13.8/Submit) id m3RCL76d005260; Sun, 27 Apr 2008 13:21:07 +0100
Delivered-To: rt-perl5@netlabs.develooper.com
Delivered-To: perlbug@perl.org
Subject: Parse problem in Switch.pm
X-Spam-Status: No, hits=-6.6 required=8.0 tests=BAYES_00,PERLBUG_CONF
Return-Path: <tdcdf1@synchronicity.convergence.cx>
X-Spam-Check-BY: la.mx.develooper.com
X-Old-Spam-Status: No, hits=-6.6 required=8.0 tests=BAYES_00,PERLBUG_CONF
Date: Sun, 27 Apr 2008 13:21:07 +0100
X-Old-Spam-Check-BY: la.mx.develooper.com
Message-ID: <5.8.0_5257_1209298722@synchronicity.convergence.cx>
Reply-To: david.freedman@uk.clara.net
To: perlbug@perl.org
From: David Freedman <tdcdf1@synchronicity.convergence.cx>
X-RT-Original-Encoding: ascii
content-type: text/plain; charset="utf-8"


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About