<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom"><title>Perl Tips</title><subtitle>From Perl Training Australia</subtitle><logo>http://perltraining.com.au/images/logo.png</logo><link href="http://perltraining.com.au/tips/" /><id>http://perltraining.com.au/tips/</id><author><name>Perl Training Australia</name></author><updated>2010-03-08T00:00:00Z</updated><generator uri="http://search.cpan.org/dist/XML-Atom-SimpleFeed" version="0.8">XML::Atom::SimpleFeed</generator><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="perltips" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://perltraining.com.au/tips/index.atom" /><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Fperltraining.com.au%2Ftips%2Findex.atom" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Fperltraining.com.au%2Ftips%2Findex.atom" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Fperltraining.com.au%2Ftips%2Findex.atom" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://perltraining.com.au/tips/index.atom" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fperltraining.com.au%2Ftips%2Findex.atom" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fperltraining.com.au%2Ftips%2Findex.atom" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Fperltraining.com.au%2Ftips%2Findex.atom" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><entry><title> Moose: A postmodern object system for Perl (part 4) </title><link href="http://perltraining.com.au/tips/2010-03-08.html" /><id>http://perltraining.com.au/tips/2010-03-08.html</id><content type="html">
&lt;p&gt;This tip is part 4 in a series.  See also &lt;a
href="http://perltraining.com.au/tips/2010-01-27.html"&gt;part 1&lt;/a&gt;,
&lt;a href="http://perltraining.com.au/tips/2010-02-17.html"&gt;part 2&lt;/a&gt; and &lt;a
href="http://perltraining.com.au/tips/2010-02-25.html"&gt;part 3&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Method modifiers: before, after and around&lt;/h2&gt;
&lt;p&gt;One of Moose's features is the easy ability to extend existing
methods for our object using the new keywords &lt;code&gt;before&lt;/code&gt;, &lt;code&gt;after&lt;/code&gt; and
&lt;code&gt;around&lt;/code&gt;.  These avoid cumbersome walking of the inheritance tree, as well
as allowing roles to modify existing methods.&lt;/p&gt;
&lt;p&gt;Using &lt;code&gt;before&lt;/code&gt; allows us to inject code before the role method is called,
&lt;code&gt;after&lt;/code&gt; allows us to inject code after the role method is called and
&lt;code&gt;around&lt;/code&gt; allows us to do both.  This is useful if we want to emit
debugging information, log something to a file, pre-open a file, change
&lt;code&gt;@_&lt;/code&gt; or any of many things.  In the following case we can demonstrate how
these might help us provide some extra debugging information on a &lt;code&gt;Logger&lt;/code&gt;
class:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;a href="http://perltraining.com.au/tips/2010-03-08.html"&gt;Read more...&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=lo1B1k7SLlU:F1jFFxa1FfU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=lo1B1k7SLlU:F1jFFxa1FfU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=lo1B1k7SLlU:F1jFFxa1FfU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=lo1B1k7SLlU:F1jFFxa1FfU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=lo1B1k7SLlU:F1jFFxa1FfU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=lo1B1k7SLlU:F1jFFxa1FfU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=lo1B1k7SLlU:F1jFFxa1FfU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=lo1B1k7SLlU:F1jFFxa1FfU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><updated>2010-03-08T00:00:00Z</updated></entry><entry><title> Moose: A postmodern object system for Perl (part 3) </title><link href="http://perltraining.com.au/tips/2010-02-25.html" /><id>http://perltraining.com.au/tips/2010-02-25.html</id><content type="html">
&lt;p&gt;This tip is part 3 in a series.  See also &lt;a
href="http://perltraining.com.au/tips/2010-01-27.html"&gt;part 1&lt;/a&gt;
and &lt;a
href="http://perltraining.com.au/tips/2010-02-17.html"&gt;part 2&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Inheritance and Roles in Moose&lt;/h2&gt;

&lt;p&gt;In regular Perl, inheritance is handled by either manipulating the &lt;code&gt;@ISA&lt;/code&gt;
array directly; or by using the &lt;code&gt;base&lt;/code&gt; pragma.  Moose abstracts those
issues away with the &lt;code&gt;extends&lt;/code&gt; keyword.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://perltraining.com.au/tips/2010-02-25.html"&gt;Read more...&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=sW1dabnJS4k:w1oNzkRoUOw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=sW1dabnJS4k:w1oNzkRoUOw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=sW1dabnJS4k:w1oNzkRoUOw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=sW1dabnJS4k:w1oNzkRoUOw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=sW1dabnJS4k:w1oNzkRoUOw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=sW1dabnJS4k:w1oNzkRoUOw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=sW1dabnJS4k:w1oNzkRoUOw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=sW1dabnJS4k:w1oNzkRoUOw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><updated>2010-02-25T00:00:00Z</updated></entry><entry><title> Moose: A postmodern object system for Perl (part 2) </title><link href="http://perltraining.com.au/tips/2010-02-17.html" /><id>http://perltraining.com.au/tips/2010-02-17.html</id><content type="html">
&lt;p&gt;This tip continues where we left off in our &lt;a
href="http://perltraining.com.au/tips/2010-01-27.html"&gt;previous tip.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Smarter types and coercions&lt;/h2&gt;
&lt;p&gt;Our existing &lt;code&gt;PlayingCard&lt;/code&gt; class in Moose doesn't do any sort
of validation of the card suit or value.  While we could write our
own code to manually validate these values, a much more flexible
approach is to define our own types for Moose.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://perltraining.com.au/tips/2010-02-17.html"&gt;Read more...&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=UcsGAq_2eos:VOrwtPw93l4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=UcsGAq_2eos:VOrwtPw93l4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=UcsGAq_2eos:VOrwtPw93l4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=UcsGAq_2eos:VOrwtPw93l4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=UcsGAq_2eos:VOrwtPw93l4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=UcsGAq_2eos:VOrwtPw93l4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=UcsGAq_2eos:VOrwtPw93l4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=UcsGAq_2eos:VOrwtPw93l4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><updated>2010-02-17T00:00:00Z</updated></entry><entry><title> Moose: A postmodern object system for Perl 5 </title><link href="http://perltraining.com.au/tips/2010-01-27.html" /><id>http://perltraining.com.au/tips/2010-01-27.html</id><content type="html">
&lt;p&gt;Moose is a &lt;em&gt;complete&lt;/em&gt; object system for Perl 5.  It provides a simple and
consistent syntax for attribute declaration, object construction and
inheritance, without the need to understand how those things are
implemented.  Furthermore, Moose allows you to separate the use of your
data from its underlying representation, thus you need not know whether
Moose is using a hash, array or something else in which to store your data.
This allows the programmer to focus on ``what'' the code is doing, rather
than ``how''.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://perltraining.com.au/tips/2010-01-27.html"&gt;Read more...&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=HGWqgtFEjzk:_7ZLQlRcSZo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=HGWqgtFEjzk:_7ZLQlRcSZo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=HGWqgtFEjzk:_7ZLQlRcSZo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=HGWqgtFEjzk:_7ZLQlRcSZo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=HGWqgtFEjzk:_7ZLQlRcSZo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=HGWqgtFEjzk:_7ZLQlRcSZo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=HGWqgtFEjzk:_7ZLQlRcSZo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=HGWqgtFEjzk:_7ZLQlRcSZo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><updated>2010-01-27T00:00:00Z</updated></entry><entry><title> Fun with QR Codes and Perl </title><link href="http://perltraining.com.au/tips/2009-10-08.html" /><id>http://perltraining.com.au/tips/2009-10-08.html</id><content type="html">&lt;h2&gt;&lt;a name="fun_with_qr_codes_and_perl"&gt;Fun with QR Codes and Perl&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;These days it's hard to find a mobile phone that doesn't contain a
camera of some sort.  While great for taking conventional pictures,
modern phones also have sufficient resolution, processing power,
and programmability to read barcodes.&lt;/p&gt;
&lt;p&gt;The most commonly seen barcode intended for mobile devices is the
QR Code.  This is an open format, two dimensional barcode with
additional calibration features and error-correction, allowing data
to still be retrieved from imperfect images.&lt;/p&gt;
&lt;p&gt;QR Codes can be used to store text, URLs, contact information, or any
other data.  In this tip, we'll demonstrate how to create your own
QR codes with Perl.&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://perltraining.com.au/tips/2009-10-08.html"&gt;Read more...&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=vpCtPnsleEk:KcD6Vta7dz4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=vpCtPnsleEk:KcD6Vta7dz4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=vpCtPnsleEk:KcD6Vta7dz4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=vpCtPnsleEk:KcD6Vta7dz4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=vpCtPnsleEk:KcD6Vta7dz4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=vpCtPnsleEk:KcD6Vta7dz4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PerlTips?a=vpCtPnsleEk:KcD6Vta7dz4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PerlTips?i=vpCtPnsleEk:KcD6Vta7dz4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><updated>2009-10-08T00:00:00Z</updated></entry></feed>
