Re: Problem with Switch.pm

Christopher Taranto <[email protected]> Thu, 17 Jan 2013 12:31:23 -0800
Newsgroups gmane.comp.lang.perl.active-perl
Message-ID <CADXv4znWL=uqw6YNg3QesfUNPRQtVzTw7XEb+kfAHqVQKmYtEA@mail.gmail.com>
--===============1970615539==
Content-Type: multipart/alternative; boundary=bcaec5016709d7c73604d381e0df

--bcaec5016709d7c73604d381e0df
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On Thu, Jan 17, 2013 at 11:39 AM, $Bill Luebkert <[email protected]>wr=
ote:

> On 1/17/2013 06:26, Rothenmaier, Deane wrote:
> > Gurus,
> >
> > I=92m having a problem getting Switch to work. I have a subroutine whic=
h
> is just a large switch statement, and switch statements (including a nest=
ed
> one) in the mainline code. As separate programs (with the subroutine brok=
en
> out into a stub program), they both work perfectly. When I put the switch
> version of the sub back into the program code, the thing breaks with the
> message: =93Bad switch statement (problem in the code block?) near test.p=
lline 4294.=94  I should mention that line 4294 is the last line of the sou=
rce
> file; so no help there.
>

I thought that Switch was experimental and that given is what was used
5.10+.

http://perldoc.perl.org/functions/given.html
http://perldoc.perl.org/perlsyn.html#Switch-Statements

Chris

--bcaec5016709d7c73604d381e0df
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On Thu, Jan 17, 2013 at 11:39 AM, $Bill Luebkert <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:[email protected]" target=3D"_blank">dbecoll@roadrunner.=
com</a>&gt;</span> wrote:<br><div class=3D"gmail_quote"><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">
<div class=3D"im">On 1/17/2013 06:26, Rothenmaier, Deane wrote:<br>
&gt; Gurus,<br>
&gt;<br>
&gt; I=92m having a problem getting Switch to work. I have a subroutine whi=
ch is just a large switch statement, and switch statements (including a nes=
ted one) in the mainline code. As separate programs (with the subroutine br=
oken out into a stub program), they both work perfectly. When I put the swi=
tch version of the sub back into the program code, the thing breaks with th=
e message: =93Bad switch statement (problem in the code block?) near <a hre=
f=3D"http://test.pl" target=3D"_blank">test.pl</a> line 4294.=94 =A0I shoul=
d mention that line 4294 is the last line of the source file; so no help th=
ere.<br>
</div></blockquote><br>I thought that Switch was experimental and that give=
n is what was used 5.10+.<br><br><a href=3D"http://perldoc.perl.org/functio=
ns/given.html">http://perldoc.perl.org/functions/given.html</a><br></div>
<a href=3D"http://perldoc.perl.org/perlsyn.html#Switch-Statements">http://p=
erldoc.perl.org/perlsyn.html#Switch-Statements</a><br><br>Chris<br><br>

--bcaec5016709d7c73604d381e0df--

--===============1970615539==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1970615539==--