<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title><![CDATA[Perl 6: Pugs Diagnostics]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?pugs_diagnostics</link>
<description></description>
<pubDate>Tue, 16 Feb 2010 21:55:53 -0000</pubDate>
<webMaster>synedra@gmail.com</webMaster>
<generator>Socialtext Workspace v2.14.7.2</generator>

<item>
<title><![CDATA[Pugs Diagnostics]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?pugs_diagnostics</link>
<description><![CDATA[<div class="wiki">
<p>
This page is for documenting diagnostic messages emitted by Pugs, along with hints about what causes them and how to address them.</p>
<h3 id="can_t_modify_constant_item">Can't modify constant item</h3>
<p>
Sometimes variables are read-only, such as when they are declared in a subroutine signature<br />
or as a class attribute:</p>
<pre>
sub foo ($a) {
 $a ~~ s/b/c/; # Boom!
}
foo('b');
</pre>
<br /><p>
You can make a read/write copy of the variable through assignent ($b = $a), or by using <tt>is copy</tt> to declare that you want a read/write copy of the variable, or <tt>is rw</tt> to declare you want the variable being passed in to be modified by reference.</p>
</div>
]]></description>
<author>Herbert Breunung</author>
<guid isPermaLink="true">http://www.perlfoundation.org/perl6/index.cgi?pugs_diagnostics</guid>
<pubDate>Tue, 16 Feb 2010 21:55:53 -0000</pubDate>
</item>

</channel>
</rss>