Fixed it! (switch.pm issue)

"Rothenmaier, Deane" <[email protected]> Thu, 17 Jan 2013 19:26:50 +0000
Newsgroups gmane.comp.lang.perl.active-perl
Message-ID <8FBE912FE28C484D9D2D95AAA28F393726F0E4BF@BY2PRD0611MB415.namprd06.prod.outlook.com>
--===============1273300135==
Content-Type: multipart/alternative;
	boundary="_000_8FBE912FE28C484D9D2D95AAA28F393726F0E4BFBY2PRD0611MB415_"
Content-Language: en-US

--_000_8FBE912FE28C484D9D2D95AAA28F393726F0E4BFBY2PRD0611MB415_
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="us-ascii"

Thanks to Andy Bach, we've fixed the problem with Switch.pm. Two little thi=
ngs, it was:


1.       Use the 'm' in front of regexes, viz. "m/<regex>/".

2.       Use a semicolon after the code invoking the nested subs in the sub=
routine, viz. "case m/whatever/ { some_sub(); }"

Turns out I was reading an elderly version of the docco which didn't mentio=
n these two things. (The 'm' was mentioned, but only in regard to '?' delim=
iters.

Thanks Andy!

Deane Rothenmaier
Programmer/Analyst - IT-StdCfg
Walgreens Corp.
2 Overlook Point #N51022D
MS 6515
Lincolnshire, IL 60069
224-542-5150

Never trust a computer you can't throw out a window. - Steve Wozniak


--_000_8FBE912FE28C484D9D2D95AAA28F393726F0E4BFBY2PRD0611MB415_
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="us-ascii"

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:1882478880;
	mso-list-type:hybrid;
	mso-list-template-ids:1735294074 67698703 67698713 67698715 67698703 67698=
713 67698715 67698703 67698713 67698715;}
@list l0:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l0:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l0:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Thanks to Andy Bach, we&#8217;ve fixed the problem w=
ith Switch.pm. Two little things, it was:<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoListParagraph" style=3D"text-indent:-.25in;mso-list:l0 level=
1 lfo1"><![if !supportLists]><span style=3D"mso-list:Ignore">1.<span style=
=3D"font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;
</span></span><![endif]>Use the &#8216;m&#8217; in front of regexes, viz. &=
#8220;m/&lt;regex&gt;/&#8221;.<o:p></o:p></p>
<p class=3D"MsoListParagraph" style=3D"text-indent:-.25in;mso-list:l0 level=
1 lfo1"><![if !supportLists]><span style=3D"mso-list:Ignore">2.<span style=
=3D"font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;
</span></span><![endif]>Use a semicolon after the code invoking the nested =
subs in the subroutine, viz. &#8220;case m/whatever/ { some_sub(); }&#8221;=
<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Turns out I was reading an elderly version of the do=
cco which didn&#8217;t mention these two things. (The &#8216;m&#8217; was m=
entioned, but only in regard to &#8216;?&#8217; delimiters.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Thanks Andy! <o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Deane Rothenmaier<o:p></o:p></p>
<p class=3D"MsoNormal">Programmer/Analyst &#8211; IT-StdCfg<o:p></o:p></p>
<p class=3D"MsoNormal">Walgreens Corp.<o:p></o:p></p>
<p class=3D"MsoNormal">2 Overlook Point #N51022D<o:p></o:p></p>
<p class=3D"MsoNormal">MS 6515<o:p></o:p></p>
<p class=3D"MsoNormal">Lincolnshire, IL 60069<o:p></o:p></p>
<p class=3D"MsoNormal">224-542-5150<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Arial&quot;,&quot;s=
ans-serif&quot;">Never trust a computer you can&#8217;t throw out a window.=
 &#8211; Steve Wozniak<o:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>

--_000_8FBE912FE28C484D9D2D95AAA28F393726F0E4BFBY2PRD0611MB415_--


--===============1273300135==
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
--===============1273300135==--