<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Perl CGI::param Overloaded Method?</title>
	<atom:link href="http://www.pythian.com/news/5935/perl-cgiparam-overloaded-method/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pythian.com/news/5935/perl-cgiparam-overloaded-method/</link>
	<description>News and views from Pythian DBAs</description>
	<lastBuildDate>Fri, 10 Feb 2012 13:01:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Daniel Fisher</title>
		<link>http://www.pythian.com/news/5935/perl-cgiparam-overloaded-method/#comment-389913</link>
		<dc:creator>Daniel Fisher</dc:creator>
		<pubDate>Thu, 03 Dec 2009 12:37:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/news/?p=5935#comment-389913</guid>
		<description>I could be wrong here, but you could also embrace the overloading:

($value) = $query-&gt;param(&#039;foo&#039;);

You&#039;ll get the param output as an array, where it will put the first value in the list into $value.</description>
		<content:encoded><![CDATA[<p>I could be wrong here, but you could also embrace the overloading:</p>
<p>($value) = $query-&gt;param(&#8216;foo&#8217;);</p>
<p>You&#8217;ll get the param output as an array, where it will put the first value in the list into $value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yanick Champoux</title>
		<link>http://www.pythian.com/news/5935/perl-cgiparam-overloaded-method/#comment-389529</link>
		<dc:creator>Yanick Champoux</dc:creator>
		<pubDate>Tue, 01 Dec 2009 23:34:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/news/?p=5935#comment-389529</guid>
		<description>&lt;i&gt;$self-&gt;send_TXT_email(scalar($rep_no=CGT::param(”rep_no”)),$rep_object,$subject,$user_ref);&lt;/i&gt;

Actually, the scalar( $x = param() ) is overkill.  Assigning &#039;param()&#039; to a scalar already forces a scalar context. So

&lt;code&gt;$self-&gt;send_TXT_email(scalar(CGI::param(”rep_no”)),$rep_object,$subject,$user_ref);&lt;/code&gt;

or

&lt;code&gt;$self-&gt;send_TXT_email(($rep_no=CGI::param(”rep_no”)),$rep_object,$subject,$user_ref);&lt;/code&gt;

or even 

&lt;code&gt;$self-&gt;send_TXT_email(&#039;&#039;.CGI::param(”rep_no”),$rep_object,$subject,$user_ref);&lt;/code&gt;


would work just fine.  Although splitting it in two statements, like John did, is a more readable way of doing it.</description>
		<content:encoded><![CDATA[<p><i>$self-&gt;send_TXT_email(scalar($rep_no=CGT::param(”rep_no”)),$rep_object,$subject,$user_ref);</i></p>
<p>Actually, the scalar( $x = param() ) is overkill.  Assigning &#8216;param()&#8217; to a scalar already forces a scalar context. So</p>
<p><code>$self-&gt;send_TXT_email(scalar(CGI::param(”rep_no”)),$rep_object,$subject,$user_ref);</code></p>
<p>or</p>
<p><code>$self-&gt;send_TXT_email(($rep_no=CGI::param(”rep_no”)),$rep_object,$subject,$user_ref);</code></p>
<p>or even </p>
<p><code>$self-&gt;send_TXT_email(''.CGI::param(”rep_no”),$rep_object,$subject,$user_ref);</code></p>
<p>would work just fine.  Although splitting it in two statements, like John did, is a more readable way of doing it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Quintin</title>
		<link>http://www.pythian.com/news/5935/perl-cgiparam-overloaded-method/#comment-389419</link>
		<dc:creator>Richard Quintin</dc:creator>
		<pubDate>Tue, 01 Dec 2009 12:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/news/?p=5935#comment-389419</guid>
		<description>Perl - a million solutions for every problem.

Would this also do it?
$self-&gt;send_TXT_email(scalar($rep_no=CGT::param(&quot;rep_no&quot;)),$rep_object,$subject,$user_ref);</description>
		<content:encoded><![CDATA[<p>Perl &#8211; a million solutions for every problem.</p>
<p>Would this also do it?<br />
$self-&gt;send_TXT_email(scalar($rep_no=CGT::param(&#8220;rep_no&#8221;)),$rep_object,$subject,$user_ref);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

