<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Perlbuzz</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/" />
    <link rel="self" type="application/atom+xml" href="http://perlbuzz.com/atom.xml" />
    <id>tag:perlbuzz.com,2008-11-11://1</id>
    <updated>2010-08-27T15:15:04Z</updated>
    <subtitle>What&apos;s happening in the world of Perl programming, including Perl 5, Perl 6, the CPAN and Parrot?</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 5.02</generator>

<entry>
    <title>Perlbuzz news roundup for 2010-08-27</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/08/perlbuzz-news-roundup-for-2010-08-27.html" />
    <id>tag:perlbuzz.com,2010://1.804</id>

    <published>2010-08-27T15:11:48Z</published>
    <updated>2010-08-27T15:15:04Z</updated>

    <summary> These links are collected from the Perlbuzz Twitter feed. If you have suggestions for news bits, please mail me at andy@perlbuzz.com. So you want to write a Perl 6 module? (ttjjss.wordpress.com) What is the Japan Perl Association and what...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="CPAN" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Parrot" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 5" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl Foundation" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>
These links are collected from the
<a href="http://twitter.com/perlbuzz">Perlbuzz Twitter feed</a>.
If you have suggestions for news bits, please mail me at
<a href="mailto:andy@perlbuzz.com">andy@perlbuzz.com</a>.
</p>

<ul>

<li>So you want to write a Perl 6 module? (<a href="http://ttjjss.wordpress.com/2010/08/09/so-you-want-to-write-a-perl-6-module/">ttjjss.wordpress.com</a>)</li>
<li>What is the Japan Perl Association and what does it do? (<a href="http://mt.endeworks.jp/d-6/2010/07/how-jpa-works-what-jpa-does-in.html">mt.endeworks.jp</a>)</li>
<li>My first patch to Rakudo Perl 6: (<a href="http://www.mail-archive.com/perl6-all&lt;a href=&quot;http://twitter.com/perl&quot;&gt;@perl&lt;/a&gt;.org/msg89795.html">mail-archive.com</a>)</li>
<li>A reminder to HR folks: It's Perl, not PERL. (<a href="http://jobs.perl.org/">jobs.perl.org</a>)</li>
<li>David Golden cuts through some Rakudo Star snark (<a href="http://www.dagolden.com/index.php/947/thoughts-on-perl-6-hype-and-backlash/">dagolden.com</a>)</li>
<li>I'm glad to hear "Rakudo is slow!" (<a href="http://perlbuzz.com/2010/08/im-glad-to-hear-rakudo-is-slow.html">perlbuzz.com</a>)</li>
<li>Rakudo Star means Perl 6 questions are on the rise at Perlmonks (<a href="http://perlgeek.de/blog-en/perl-6/perlmonks-questions.html">perlgeek.de</a>)</li>
<li>Perl is not an acronym (<a href="http://perlbuzz.com/2010/08/perl-is-not-an-acronym.html">perlbuzz.com</a>)</li>
<li>45m of video interview w/Larry Wall, creator of Perl http://bigthink.com/larrywall (via <a href="http://twitter.com/theory">@theory</a> and <a href="http://twitter.com/sachmet">@sachmet</a>)</li>
<li>Top three languages at github: Ruby, JavaScript, Perl (<a href="http://www.r-chart.com/2010/08/github-stats-on-programming-languages.html">r-chart.com</a>)</li>
<li>CPAN Testers must convert from email to HTTP by Sep 1st (<a href="http://log.perl.org/2010/08/cpan-testers-email-submission-interface-going-away-september-1st.html">log.perl.org</a>)</li>
<li>First impressions of Perl 6 from blog "Mad, Beautiful Ideas", which seems appropriate for Perl 6 (<a href="http://blog.foxxtrot.net/2010/08/perl6-first-impressions.html">blog.foxxtrot.net</a>)</li>
<li>Devel::CheckLib needs a new maintainer (<a href="http://blogs.perl.org/users/david_cantrell/2010/08/develchecklib-needs-a-new-maintainer.html">blogs.perl.org</a>)</li>
<li>Rakudo bugs are love (<a href="http://use.perl.org/~masak/journal/40490">use.perl.org</a>)</li>
<li>HTTP::BrowserDetect has been freshly updated (<a href="http://blogs.perl.org/users/olaf_alders/2010/08/httpbrowserdetect-for-all-of-your-useragent-parsing-needs.html">blogs.perl.org</a>)</li>
<li>What's on your to-do list? Here's mine: (<a href="http://perlbuzz.com/2010/08/whats-on-your-to-do-list.html">perlbuzz.com</a>)</li>
<li>pudge on the uncertain future of use.perl.org (<a href="http://use.perl.org/~pudge/journal/40493">use.perl.org</a>)</li>
<li>The 2010 White Camel awards (<a href="http://blogs.perl.org/users/brian_d_foy/2010/08/the-2010-white-camel-awards.html">blogs.perl.org</a>)</li>
<li>Perlmonks poll: My first impression of Rakudo Star... (<a href="http://www.perlmonks.org/?node_id=852336">perlmonks.org</a>)</li>
<li>Vim 7.3 supports Perl 6, adds Perl 5 improvements (<a href="http://perlbuzz.com/2010/08/vim-73-supports-perl-6.html">perlbuzz.com</a>)</li>
<li>Improving Perl sub detection in git diffs (<a href="http://blogs.perl.org/users/aevar_arnfjor_bjarmason/2010/08/lets-add-git-userdiff-defaults-for-perl-and-perl-6.html">blogs.perl.org</a>)</li>
<li>Perl Foundation news site gets a redesign (<a href="http://news.perlfoundation.org/">news.perlfoundation.org</a>)</li>
<li>Switching to Dist::Zilla: A usage report (<a href="http://blogs.perl.org/users/job_van_achterberg/2010/08/switching-to-distzilla---a-usage-report.html">blogs.perl.org</a>)</li>
<li>Temporarily delete hash keys or array elements with "delete local" (<a href="http://www.effectiveperlprogramming.com/blog/504">effectiveperlprogramming.com</a>)</li>
<li>Run PHP tests in your Perl test suite (<a href="http://perlbuzz.com/2010/08/run-php-tests-in-your-perl-test-suite.html">perlbuzz.com</a>)</li>
<li>What is the "Cool" class in Perl 6? (<a href="http://perlgeek.de/blog-en/perl-6/cool.html">perlgeek.de</a>)</li>
<li>I'm playing with the ack.vim plugin. I like it much. (<a href="http://www.vim.org/scripts/script.php?script_id=2572">vim.org</a>)</li>
<li>Alien::SVN has a new owner, for those of you still hooking into Subversion (<a href="http://use.perl.org/~schwern/journal/40503">use.perl.org</a>)</li>
<li>WWW::Salesforce gets a long-awaited update (<a href="http://blogs.perl.org/users/phred/2010/08/new-wwwsalesforce-release-and-maintainer.html">blogs.perl.org</a>)</li>
<li>Don't discount the value of indirect PR. A mention of Perl 6 is a mention of Perl 6. (<a href="http://www.pcworld.com/businesscenter/article/203671/vim_editor_updated_with_modern_language_support.html">pcworld.com</a>)</li>
<li>Which Perl XML module should I use to...? (<a href="http://blogs.perl.org/users/brian_d_foy/2010/08/which-perl-xml-module-should-i-use-to.html">blogs.perl.org</a>)</li>
<li>Video of Tim Bunce's talk about DBDI for Perl 6: (<a href="http://blip.tv/file/3973550">blip.tv</a>)</li>
<li>Videos from YAPC::EU available (Thanks <a href="http://twitter.com/sachmet">@sachmet</a>) (<a href="http://conferences.yapceurope.org/ye2010/news/632">conferences.yapceurope.org</a>)</li>
<li>Allison Randal is now working full time at Ubuntu (<a href="http://allisonrandal.com/2010/08/20/ubuntu-ta-intro/">allisonrandal.com</a>)</li>
<li>Non-technical strategies for getting people on board with technological change (<a href="http://everythingsysadmin.com/2010/08/non-technical-strategies.html">everythingsysadmin.com</a>)</li>
<li>Useful side effects of Perl testing culture (<a href="http://xrl.us/bhxgx3">xrl.us</a>)</li>
<li>Idiomatic Perl 6 (<a href="http://use.perl.org/~masak/journal/40516">use.perl.org</a>)</li>
</ul>
]]>
        
    </content>
</entry>

<entry>
    <title>Run PHP tests in your Perl test suite</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/08/run-php-tests-in-your-perl-test-suite.html" />
    <id>tag:perlbuzz.com,2010://1.803</id>

    <published>2010-08-17T22:30:54Z</published>
    <updated>2010-08-17T22:54:02Z</updated>

    <summary>Sometimes you&apos;ve got a big codebase that isn&apos;t just Perl. Maybe you&apos;ve got PHP mixed in with it, and you want to test the PHP along with all the Perl code, too. Perl&apos;s prove program doesn&apos;t care if the testing...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="CPAN" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Code craft" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 5" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>Sometimes you've got a big codebase that isn't just Perl.  Maybe you've got PHP mixed in with it, and you want to test the PHP along with all the Perl code, too.  Perl's <em>prove</em> program doesn't care if the testing results it parses are from Perl, PHP or even static files, so long as they're in the <a href="http://testanything.org/">TAP</a> format.  However, actually getting <em>prove</em> to run those PHP programs takes a little doing.  Fortunately, Test::Harness 3.xx has hooks for source handlers.</p>

<p>David Wheeler has written about running PostgreSQL tests under <em>prove</em> <a href="http://justatheory.com/computers/programming/perl/tap-parser-sourcehandler.html">in his blog</a> and I stole from his code shamelessly to create <a href="http://search.cpan.org/dist/TAP-Parser-SourceHandler-PHP/">TAP::Parser::SourceHandler::PHP</a>, released to the CPAN this morning.</p>

<p>So now, to run the Perl .t files and the PHP .phpt files all in one swell foop, here's what we do at work:</p>

<pre>
prove -r \
    -I/home/alester/proj/Lib \
    --source=Perl --ext=.t \
    --source=PHP \
    --ext=.phpt \
    --php-option=include_path=/home/alester/proj/Class \
    --php-option=extension=.phpt
</pre>

<p>That <tt>--source=PHP</tt> tells <em>prove</em> to load up TAP::Parser::SourceHandler::PHP.  The <tt>--php-option</tt> tells <em>prove</em> to pass those options through to the SourceHandler.  If we had PostgreSQL tests or MySQL tests, we could use the SourceHandlers for those that David Wheeler has written as well.</p>

<p>Now we can test everything all in one run, and we get all the benefits of Test::Harness 3.xx, like parallel tests and TAP archiving and so on. </p>
]]>
        

    </content>
</entry>

<entry>
    <title>Vim 7.3 supports Perl 6, adds Perl 5 improvements</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/08/vim-73-supports-perl-6.html" />
    <id>tag:perlbuzz.com,2010://1.802</id>

    <published>2010-08-16T02:15:34Z</published>
    <updated>2010-08-16T02:59:36Z</updated>

    <summary> Vim 7.3 has just been released today. From the announcement: This is a minor release of Vim. It consists of Vim 7.2 plus all patches, updated runtime files and some more, see below. It has been two years since...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="Perl 5" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="vim" label="vim" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>
Vim 7.3 has just been released today.  From
<a href="https://groups.google.com/group/vim_announce/browse_thread/thread/66c02efd1523554b">the announcement</a>: 
</p>

<blockquote>
<p>
This is a minor release of Vim.  It consists of Vim 7.2 plus all
patches, updated runtime files and some more, see below.  It has been
two years since the 7.2 release, thus it's not that "minor".  But not
"major" either.  Something in between, don't know how to call that.
</p>
<p>
The most notable additions since 7.2:
<ul>
<li> Persistent undo and undo for reload</li>
<li> Blowfish encryption, encryption of the swap file </li>
<li> Conceal text</li>
<li> Lua interface</li>
<li> Python 3 interface</li> 
</ul>
</p>
</blockquote>

<p>
However, <strong>to the Perl programmer, this is a significant upgrade</strong> from 7.2, because of updates of all the Perl-related
support files.  Vim has language specific plugins for syntax highlighting, indenting and other filetype-related behaviors.  Every
one of these Perl-related support files has been updated.
For example, <i>syntax/perl.vim</i> has not been updated since 2006.  Now, Perl 5.10 keywords like
<tt>given</tt>, <tt>when</tt> and <tt>state</tt> are properly highlighted.
</p>
<p>
For the Perl 6 hackers out there working with <a href="http://www.rakudo.org/">Rakudo Star</a>, Vim now includes support for Perl 6.
Until now, if Perl 6 programmers wanted Vim to support Perl 6, they had to use a <i>perl6.vim</i> file that got passed around from
person to person.  Now, it comes installed automatically as part of Vim 7.3.

</p>

<p>
  Perl 6 detection is primitive, so you may have to explicitly add it to your modeline in your file, such as
<blockquote><tt>
    # vi: filetype=perl6:
</tt></blockquote>
</p>
<p>
All of these changes are from the <a href="http://github.com/petdance/vim-perl">vim-perl project</a> hosted on Github.  In that
project, I've aggregated syntax, indent and filetype plugins for the Perl and Perl 6 support files that get fed back to the
Vim project.  It's also got support for other filetypes like Template Toolkit that are not part of the vim distribution.
I'm not making many changes to the Vim code directly.  Like many of my other contributions to open source, my role is one 
of wrangler and coordinator and less of programmer and technologist.
</p>
<p>
If you're interested in Vim support for Perl 5 and Perl 6, I encourage you to check out the vim-perl project and join the
<a href="http://groups.google.com/group/vim-perl">vim-perl mailing list</a>.  Now that Vim 7.3 is out, we have some room
to stretch out and make Vim do incredible things for Perl in the next release.
</p>]]>
        
    </content>
</entry>

<entry>
    <title>What&apos;s on your to-do list?</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/08/whats-on-your-to-do-list.html" />
    <id>tag:perlbuzz.com,2010://1.800</id>

    <published>2010-08-11T16:36:54Z</published>
    <updated>2010-08-11T16:40:46Z</updated>

    <summary>What&apos;s on your to-do list for Perl projects these days? Here&apos;s mine. Test::Harness Testing PHP code with Perl&apos;s prove program. I wrote code to do this under Test::Harness 2.x, but 3.x has an entirely different way to do it. vim-perl...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="Perl 5" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>What's on your to-do list for Perl projects these days?  Here's mine.</p>

<ul>
<li>Test::Harness
<ul>
<li>Testing PHP code with Perl's <em>prove</em> program.  I wrote code to do this under Test::Harness 2.x, but 3.x has an entirely different way to do it.</li>
</ul></li>
<li><a href="http://github.com/petdance/vim-perl">vim-perl</a>
<ul>
<li>Just gave Bram the latest files for inclusion in vim 7.3</li>
<li>I want to have a test suite and a packaging system and to distribute it on CPAN</li>
<li>Write an FAQ and intro to let people know about cool tricks like "set equalprg=perltidy"</li>
</ul></li>
<li><a href="http://rakudo.org/">Rakudo Perl 6</a>
<ul>
<li>Learning more Perl 6</li>
<li>Want to make perl101.org have parallel examples for Perl 5 and Perl 6.</li>
</ul></li>
<li>Parrot patches
<ul>
<li>Fixing dependency problems in the Makefile</li>
<li>Checking regularly for errors that GCC's super-strict and persnickity warning settings turn up.</li>
</ul></li>
<li>Updating links and articles on <a href="http://bobby-tables.com">http://bobby-tables.com</a>
<ul>
<li>I want bobby to be the canonical source to turn to help newbies know how to avoid SQL injection</li>
</ul></li>
<li>Perlbuzz
<ul>
<li>Review of <em>Effective Perl Programming</em></li>
<li>Aggregate information about Plack</li>
<li>Create a sitemap for Google's benefit</li>
</ul></li>
<li><a href="http://search.cpan.org/dist/WWW-Mechanize/">WWW::Mechanize</a>
<ul>
<li>Making a ->text() method that caches its results, so that I can then...</li>
<li>Make Test::WWW::Mechanize's ->text_contains() method use it and not recalculate the same page contents over and over</li>
</ul></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>Perl is not an acronym</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/08/perl-is-not-an-acronym.html" />
    <id>tag:perlbuzz.com,2010://1.799</id>

    <published>2010-08-10T15:11:16Z</published>
    <updated>2010-08-10T15:19:39Z</updated>

    <summary>A reminder to those out there, especially HR folks, that the language Perl is always spelled &quot;Perl&quot; and never &quot;PERL.&quot; From the Perl FAQ: Before the first edition of Programming perl, people commonly referred to the language as &quot;perl&quot;, and...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>A reminder to those out there, especially HR folks, that the language Perl is always spelled "Perl" and never "PERL."  From the <a href="http://faq.perl.org/perlfaq1.html#What_s_the_differenc">Perl FAQ</a>:</p>

<blockquote>
  <p>Before the first edition of <em>Programming perl</em>, people commonly referred to the language as "perl", and its name appeared that way in the title because it referred to the interpreter. In the book, Randal Schwartz capitalised the language's name to make it stand out better when typeset. This convention was adopted by the community, and the second edition became Programming Perl, using the capitalized version of the name to refer to the language.</p>
  
  <p>You may or may not choose to follow this usage. For example, parallelism means "awk and perl" and "Python and Perl" look good, while "awk and Perl" and "Python and perl" do not. But never write "PERL", because perl is not an acronym, apocryphal folklore and post-facto expansions notwithstanding.</p>
</blockquote>

<p>Those post-facto expansions are "Practical Expansion and Reporting Language" and "Pathologically Eclectic Rubbish Lister."  Both are bacryonms, created after the language was named.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>I&apos;m glad to hear &quot;Rakudo is slow!&quot;</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/08/im-glad-to-hear-rakudo-is-slow.html" />
    <id>tag:perlbuzz.com,2010://1.798</id>

    <published>2010-08-10T05:24:05Z</published>
    <updated>2010-08-10T05:52:50Z</updated>

    <summary>I&apos;m pretty tired of the sniping and punditry about the recent release of Rakudo Star. However, David Golden has put together a great article about what the Rakudo Star release means both to the team and to the public. Key...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Rakudo" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>I'm pretty tired of the <a href="http://developers.slashdot.org/story/10/07/29/2046242/Perl-6-Early-With-Rakudo-Star">sniping and punditry</a> about the <a href="http://perlbuzz.com/2010/07/rakudo-star-for-early-adopters-of-perl-6-is-now-available.html">recent release of Rakudo Star</a>.  However, David Golden has put together a <a href="http://www.dagolden.com/index.php/947/thoughts-on-perl-6-hype-and-backlash/">great article about what the Rakudo Star release means</a> both to the team and to the public.</p>

<p>Key points from his article:</p>

<ul>
<li>Rakudo Star is the first prototype of an end-user distribution tarball</li>
<li>There is no way reactions to Rakudo Star can possibly live up to the hopes and dreams of those involved the project (and I say that it can't live up to the expectations of those outside the project, either)</li>
<li>Rakudo Star still is a significant step forward for Perl 6</li>
<li>If anyone was waiting for Perl 6 to rescue Perl, then they'll need to keep waiting.</li>
</ul>

<p>And then, down in the comments, Moritz Lenz points out something I'd overlooked:</p>

<blockquote>
  <p>Yes, people now say "Rakudo is slow as $funny_metaphor", but that's much better than "Rakudo is vapourware". Once we speed up Rakudo, we can simply post benchmarks and say "look, it's now $n times faster than before". <strong>"Rakudo is slow" implies "Rakudo is", and that's a big step forward.</strong></p>
</blockquote>

<p>Thanks for the reminder, Moritz.  Next it will be "Rakudo is faster, but not fast enough."  And then maybe "Rakudo doesn't have enough documentation," and then "Rakudo doesn't have all the modules it should."  All of it is progress.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Perlbuzz news roundup for 2010-08-09</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/08/perlbuzz-news-roundup-for-2010-08-09.html" />
    <id>tag:perlbuzz.com,2010://1.797</id>

    <published>2010-08-09T19:23:55Z</published>
    <updated>2010-08-09T19:24:25Z</updated>

    <summary> These links are collected from the Perlbuzz Twitter feed. If you have suggestions for news bits, please mail me at andy@perlbuzz.com. Running tests in MySQL with Perl via MyTAP (justatheory.com) chromatic rebuts the FUD of startup times for Rakudo...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="CPAN" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Conferences" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 5" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Rakudo" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>
These links are collected from the
<a href="http://twitter.com/perlbuzz">Perlbuzz Twitter feed</a>.
If you have suggestions for news bits, please mail me at
<a href="mailto:andy@perlbuzz.com">andy@perlbuzz.com</a>.
</p>

<ul>

<li>Running tests in MySQL with Perl via MyTAP (<a href="http://justatheory.com/computers/databases/mysql/introducing_mysql.html">justatheory.com</a>)</li>
<li>chromatic rebuts the FUD of startup times for Rakudo Star (<a href="http://www.modernperlbooks.com/mt/2010/07/an-accurate-comparison-of-perl-5-and-rakudo-star.html">modernperlbooks.com</a>)</li>
<li>Top 10 tricks of Perl one-liners (<a href="http://blog.ksplice.com/2010/05/top-10-perl-one-liner-tricks/">blog.ksplice.com</a>)</li>
<li>A checklist for writing maintainable Perl (<a href="http://www.modernperlbooks.com/mt/2010/07/a-checklist-for-writing-maintainable-perl.html">modernperlbooks.com</a>)</li>
<li>A gentle introduction to Perl 6 with Rakudo Star (<a href="http://blogs.perl.org/users/offerkaye/2010/07/a-gentle-introduction-to-perl-6-using-rakudo-star.html">blogs.perl.org</a>)</li>
<li>Opening Perl modules with vim (<a href="http://blogs.perl.org/users/ovid/2010/08/open-perl-modules-with-vim.html">blogs.perl.org</a>)</li>
<li>Your Perl test suite is broken (<a href="http://blogs.perl.org/users/ovid/2010/08/your-test-suite-is-broken.html">blogs.perl.org</a>)</li>
<li>Diving into Perl 6 (<a href="http://perlbuzz.com/2010/08/diving-into-perl-6.html">perlbuzz.com</a>)</li>
<li>What's up with Proud To Use Perl (http://proudtouseperl.com/) Are people no longer proud?</li>
<li>Why are Perl web apps less popular than those in PHP? (<a href="http://blogs.perl.org/users/flamey/2010/07/why-so-puzzled-perl-vs-php-and-rest.html">blogs.perl.org</a>)</li>
<li>Perl 5 and Perl 6 are different languages, and that's a good thing (<a href="http://use.perl.org/~masak/journal/40481">use.perl.org</a>)</li>
<li>Perl 6 is easier to read than write (<a href="http://blogs.perl.org/users/mirod/2010/08/perl-6-impression.html">blogs.perl.org</a>)</li>
<li>The official Perl 6 cheat sheet (<a href="http://svn.pugscode.org/pugs/docs/Perl6/Cheatsheet/cheatsheet.txt">svn.pugscode.org</a>)</li>
<li>Currying with Perl 6 (<a href="http://perlgeek.de/blog-en/perl-5-to-6/28-currying.html">perlgeek.de</a>)</li>
<li>Try Rakudo and learn Perl 6 in your browser: (<a href="http://try.rakudo.org/shell">try.rakudo.org</a>)</li>
<li>Perl 6 has data dumping baked right in (<a href="http://perlbuzz.com/2010/08/perl-6-has-data-dumping-built-in.html">perlbuzz.com</a>)</li>
<li>What to respond to "Perl 6 isn't Perl any more" (<a href="http://perlbuzz.com/2010/08/what-to-say-to-perl-6-isnt-perl-any-more.html">perlbuzz.com</a>)</li>
<li>How to write about Perl 6 (<a href="http://blogs.perl.org/users/brian_d_foy/2010/08/how-to-write-about-perl-6.html">blogs.perl.org</a>)</li>
<li>When should I use database abstraction? (<a href="http://blogs.perl.org/users/carey_tilden/2010/08/removing-database-abstraction.html">blogs.perl.org</a>)</li>
<li>Videos from YAPC::NA (<a href="http://www.presentingperl.org/yn2010/">presentingperl.org</a>)</li>
<li>What I learned at YAPC::EU 2010 (<a href="http://blogs.perl.org/users/anielsen/2010/08/what-i-learned-at-yapceu-2010.html">blogs.perl.org</a>)</li>
<li>Where to now in Rakudo Perl 6 development? How to speed up Rakudo? (<a href="http://perlgeek.de/blog-en/perl-6/notes-from-yapc-hackathon.html">perlgeek.de</a>)</li>
<li>Colorized code snippets on an ANSI terminal (<a href="http://blogs.perl.org/users/peter_edwards/2010/08/colorized-perl-code-snippets-on-ansi-terminals.html">blogs.perl.org</a>)</li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>What to respond to &quot;Perl 6 isn&apos;t Perl any more&quot;</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/08/what-to-say-to-perl-6-isnt-perl-any-more.html" />
    <id>tag:perlbuzz.com,2010://1.795</id>

    <published>2010-08-06T04:08:23Z</published>
    <updated>2010-08-06T05:20:19Z</updated>

    <summary>Now that Rakudo Star is out, and people are able to easily install and work with an early implementation of Perl 6, the pundits and cranks have to put aside their tired Duke Nukem jokes and talk about how different...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="Opinion" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>Now that Rakudo Star is out, and people are able to easily install and work with an early implementation of Perl 6, the pundits and cranks have to put aside their tired Duke Nukem jokes and talk about how different Perl 6 is from Perl 5.  They gripe that everything is different and scary, "it shouldn't be called Perl any more."  I'm tired of it, and it makes no sense.</p>

<p>I bet none of those cranks remember Perl 4 and the shift to Perl 5.  </p>

<ul>
<li>Perl 4 didn't have lexical (<tt>my</tt>) variables</li>
<li>and there were no scalar filehandles</li>
<li>and you couldn't pass filehandles as parameters to functions except with typeglobs</li>
<li>and the package separator was <tt>'</tt>, not <tt>::</tt></li>
<li>and really nobody used packages anyway</li>
<li>and there was no object support whatsoever</li>
<li>and that meant no modules to speak of</li>
<li>and you couldn't pass around regexes as scalars (qr// operator)</li>
<li>and on and on.</li>
</ul>

<p>Even with all those differences, we survived.  In fact, we thrived.</p>

<p>The Pink Camel, first edition of <em>Programming Perl</em>, covering Perl 4, was only 450 small pages long, and a third of that was a section called "Real Perl Programs."  (Imagine! Actual programs!) The Blue Camel, the 2nd edition, covering Perl 5, was over 600 bigger pages.</p>

<p>You know what I thought when I got my copy of the Blue Camel?  It wasn't "Boy, this sure isn't Perl any more." No, I thought <strong>"Holy shit, look at all the stuff I can do."</strong>  I couldn't even read the book straight through, because I kept skipping around, my mind amazed at the possibilities in front of me.</p>

<p>There are those who will read this and say "Yeah, but Perl 5 could still pretty much run any Perl 4 program, but Perl 6 won't be able to run Perl 5."  And that's true.  And it's irrelevant.</p>

<p>Perl 6 is still Perl, and is still called Perl, for many reasons, but only one that matters.</p>

<p><strong>Larry Wall says that Perl 6 is still Perl.</strong></p>

<p>Larry has his reasons.  Some he's mentioned in <a href="http://www.perlfoundation.org/perl6/index.cgi?state_of_the_onion">past State of the Onion addresses</a>.  Maybe you don't agree with his reasons, or his decisions.  But it doesn't matter one damn bit what you think.  It's his decision.  All arguments are a waste of time and brain cycles.</p>

<p>So when someone says "Perl 6 should have been named something else," I suggest a response of "OK, whatever you say.  Now, isn't it cool that you can use list reduction to say <tt>my $sum = [+] @list;</tt>?"</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Perl 6 has data dumping built in</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/08/perl-6-has-data-dumping-built-in.html" />
    <id>tag:perlbuzz.com,2010://1.794</id>

    <published>2010-08-05T16:03:32Z</published>
    <updated>2010-08-05T16:08:01Z</updated>

    <summary>Any Perl 5 programmer who&apos;s worked with Perl 5 more than a few months has learned about how invaluable the Data::Dumper module is. The ability to say use Data::Dumper; print Dumper( \%hash ); is a godsend to debugging data structures...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>Any Perl 5 programmer who's worked with Perl 5 more than a few months has learned about how invaluable the Data::Dumper module is.  The ability to say</p>

<pre><code>use Data::Dumper;
print Dumper( \%hash );
</code></pre>

<p>is a godsend to debugging data structures of any complexity.</p>

<p>Perl 6 has this dumping built in.</p>

<pre>
uniqua:~/rakudo/lab $ cat dumper
#!/usr/local/bin/perl6

use v6;

my %hash = (
    'this'     => 'that',
    'year'     => 2112,
    'matcher'  => regex { ^ M(r|rs|s)\. \s+ (\w+) \s+ Wall $ },
    'rational' => 0.5,
    'num'      => (0.5).Num,
);

say %hash.perl;
# Or %hash.perl.say

uniqua:~/rakudo/lab $ ./dumper
{"num" => 0.5, "this" => "that", "year" => 2112,
"rational" => 1/2, "matcher" => { ... }}
</pre>

<p>Regex dumping does not display the actual regex yet, but Patrick Michaud says it's coming soon.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Diving into Perl 6</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/08/diving-into-perl-6.html" />
    <id>tag:perlbuzz.com,2010://1.793</id>

    <published>2010-08-04T05:12:38Z</published>
    <updated>2010-08-04T05:29:15Z</updated>

    <summary>I&apos;m officially diving into Perl 6. I wrote my first real Perl 6 from scratch today. It&apos;s a prime number tester, where we test both via checking factors iteratively, and also using the magic prime number tester regular expression. I...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>I'm officially diving into Perl 6.</p>

<p>
I wrote my first real Perl 6 from scratch today.  It's a prime number tester, where we test both via checking factors iteratively, and also using the magic prime number tester regular expression.  I was inspired by a blog post about how <a href="http://zmievski.org/2010/08/the-prime-that-wasnt">PHP can't always handle regexes with lots of backtracking</a>, and I thought it would make a good stress for Perl 6.
</p>

<p>
My program as it stands now looks like this:
</p>

<pre>
#!/usr/local/bin/perl6

use v6;

# Perl 5 @ARGV is now @*ARGS
my Int @candidates;
if ( @*ARGS ) {
    for @*ARGS -> $n {
        push @candidates, $n.Int;
    }
}
else {
    @candidates = 2 .. 100;
}

for @candidates -> Int $x {
    my $via_factors = is_prime_via_factors($x);
    my $via_regex   = is_prime_via_regex($x);

    if $via_factors && $via_regex {
        say "$x is prime";
    }
    elsif $via_factors xor $via_regex {
        say "Difference in opinion on $x :",
            "factors says $via_factors, regex says $via_regex";
    }
}


sub is_prime_via_factors( Int $n ) returns Bool {
    my $top = sqrt $n;

    for 2..$top -> $i {
        return False if $n %% $i;
        # %% is the divisible-by operator
    }
    # Could also use:  $n %% none(2 .. $top)

    return True;
}


sub is_prime_via_regex( Int $n ) returns Bool {
    my $str = 'x' x $n;

    # First capture is $0, not $1 or \1 as in Perl 5
    return False if $str ~~ regex { ^ x $ | ^ (xx+?) $0+ $ };

    return True;
}
</pre>

<p>
I'm sure there are ways that are more Perl 6ish to do what I've done above, but I was glad to learn along the way. Big thanks to the #perl6 IRC channel for help. Some important lessons:
</p>
<ul>
<li>Command-line args are in <tt>@*ARGS</tt>, not <tt>@ARGV</tt>.
<li>The old chestnut <tt>($x mod $y == 0)</tt> is now <tt>($x %% $y)</tt> with the <tt>%%</tt> divisible-by operator.
<li>The first capture group in a regex is <tt>$0</tt>, not <tt>$1</tt> or <tt>\1</tt> as in Perl 5.
</ul>

<p>
There's a document about the <a href="http://perlcabal.org/syn/Differences.html">differences between Perl 5 and Perl 6</a> which I updated based on tonight's fun, and will keep adding to along the way.
</p>

<p>
My goal is to have all of <a href="http://perl101.org/">perl101.org</a> include examples in both Perl 5 and Perl 6, both for people new to Perl and for those moving to Perl 6.  If you'd like to help in this effort, let me know or work on the perl101 github project.
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Rakudo Star, for early adopters of Perl 6, now available</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/07/rakudo-star-for-early-adopters-of-perl-6-is-now-available.html" />
    <id>tag:perlbuzz.com,2010://1.792</id>

    <published>2010-07-31T17:32:35Z</published>
    <updated>2010-07-31T17:42:12Z</updated>

    <summary>By Patrick Michaud, release manager for Rakudo Perl 6 On behalf of the Rakudo and Perl 6 development teams, I&apos;m happy to announce the July 2010 release of &quot;Rakudo Star&quot;, a useful and usable distribution of Perl 6. The tarball...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="rakudo" label="rakudo" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p><i>By Patrick Michaud, release manager for Rakudo Perl 6</i></p>

       <p>On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the July 2010 release of "Rakudo Star", a <strong>useful and usable distribution of Perl 6</strong>.  The tarball for the July 2010 release is available from <a href="http://github.com/rakudo/star/downloads">http://github.com/rakudo/star/downloads</a>.</p>

<p>Rakudo Star is aimed at "early adopters" of Perl 6.  We know that it still has some bugs, it is far slower than it ought to be, and there are some advanced pieces of the Perl 6 language specification that aren't implemented yet.  But Rakudo Perl 6 in its current form is also proving to be viable (and fun) for developing applications and exploring a great new language.  These "Star" releases are intended to make Perl 6 more widely available to programmers, grow the Perl 6 codebase, and gain additional end-user feedback about the Perl 6 language and Rakudo's implementation of it.</p>

<p>In the Perl 6 world, we make a distinction between the language ("Perl 6") and specific implementations of the language such as "Rakudo Perl".  "Rakudo Star" is a distribution that includes release #31 of the <a href="http://github.com/rakudo/rakudo">Rakudo Perl 6 "compiler</a>, version 2.6.0 of the <a href="http://parrot.org/">Parrot Virtual Machine</a>, and various modules, documentation, and other resources collected from the Perl 6 community.  We plan to make Rakudo Star releases on a monthly schedule, with occasional special releases in response to important bugfixes or changes.</p>

<p>Some of the many cool Perl 6 features that are available in this release of Rakudo Star:</p>

<ul>
<li>Perl 6 grammars and regexes</li>
<li>formal parameter lists and signatures</li>

<li>metaoperators</li>
<li>gradual typing</li>
<li>a powerful object model, including roles and classes</li>
<li>lazy list evaluation</li>
<li>multiple dispatch</li>
<li>smart matching</li>
<li>junctions and autothreading</li>
<li>operator overloading (limited forms for now)</li>
<li>introspection</li>

<li>currying</li>
<li>a rich library of builtin operators, functions, and types</li>
<li>an interactive read-evaluation-print loop</li>
<li>Unicode at the codepoint level</li>
<li>resumable exceptions</li>
</ul>

<p>There are some key features of Perl 6 that Rakudo Star does not yet handle appropriately, although they will appear in upcoming releases.  Thus, we do not consider Rakudo Star to be a "Perl 6.0.0" or "1.0" release.</p>

<p>In many places we've tried to make Rakudo smart enough to inform the programmer that a given feature isn't implemented, but there are many that we've missed.  Bug reports about missing and broken features are welcomed.</p>

<p>See <a href="http://perl6.org/">http://perl6.org/</a> for links to much more information about  Perl 6, including documentation, example code, tutorials, reference materials, specification documents, and other supporting resources. Rakudo Star also contains a draft of a Perl 6 book -- see  <docs/UsingPerl6-draft.pdf> in the release tarball.</p>

<p>The development team thanks all of the contributors and sponsors for making Rakudo Star possible.  If you would like to contribute, see <a href="http://rakudo.org/how-to-help">http://rakudo.org/how-to-help</a>, ask on the perl6-compiler@perl.org mailing list, or join us on IRC #perl6 on freenode.</p>

<p>Rakudo Star releases are created on a monthly cycle or as needed in response to important bug fixes or improvements.  The next planned release of Rakudo Star will be on August 24, 2010.</p>

]]>
        
    </content>
</entry>

<entry>
    <title>Perlbuzz news roundup for 2010-07-27</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/07/perlbuzz-news-roundup-for-2010-07-27.html" />
    <id>tag:perlbuzz.com,2010://1.791</id>

    <published>2010-07-27T14:49:10Z</published>
    <updated>2010-07-27T14:50:20Z</updated>

    <summary> These links are collected from the Perlbuzz Twitter feed. If you have suggestions for news bits, please mail me at andy@perlbuzz.com. NYTProf 4.04 now warns if it sees $`, $\&amp; or $\&apos;, which are regex performance killers (blog.timbunce.org) Facebook::Graph...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="CPAN" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Interviews" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 5" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl Foundation" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Rakudo" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p><br /><p>
These links are collected from the
<a href="http://twitter.com/perlbuzz">Perlbuzz Twitter feed</a>.
If you have suggestions for news bits, please mail me at
<a href="mailto:andy@perlbuzz.com">andy@perlbuzz.com</a>.
</p></p>

<ul>

<li>NYTProf 4.04 now warns if it sees $`, $\& or $\', which are regex performance killers (<a href="http://blog.timbunce.org/2010/07/09/nytprof-4-04-came-saw-ampersand-and-conquered/">blog.timbunce.org</a>)</li>
<li>Facebook::Graph automates Facebook interactions (<a href="http://blogs.perl.org/users/jt_smith/2010/07/introducing-facebookgraph.html">blogs.perl.org</a>)</li>
<li>Iterating your way to happiness with Perl 6 (<a href="http://use.perl.org/~masak/journal/40442">use.perl.org</a>)</li>
<li>Perlcast returns with an interview with Stevan Little about Moose (<a href="http://perlcast.com/2010/07/12/stevan-little-on-moose/">perlcast.com</a>)</li>
<li>CPAN on your iPhone (<a href="http://blogs.perl.org/users/olaf_alders/2010/07/icpan-cpan-on-your-iphone.html">blogs.perl.org</a>)</li>
<li>YAPC::NA 2011 will be in Asheville, NC (<a href="http://news.perlfoundation.org/2010/07/yapcna-2011---asheville-north.html">news.perlfoundation.org</a>)</li>
<li>Ten years of Perl 6 and all the goodness it's brought (<a href="http://use.perl.org/~masak/journal/40451">use.perl.org</a>)</li>
<li>Fixing my #1 bash annoyance (<a href="http://perlbuzz.com/mechanix/2010/07/fixing-my-1-bash-annoyance.html">perlbuzz.com</a>)</li>
<li>Wedge more text in your tweets with Unicode abuse (<a href="http://blogs.perl.org/users/holy_zarquons_singing_fish/2010/07/unicode-abuse.html">blogs.perl.org</a>)</li>
<li>Ingy's take on Rakduo Perl 6: It's really ready (<a href="http://blogs.perl.org/users/ingy_dot_net/2010/07/rakudos-really-really-release-ready.html">blogs.perl.org</a>)</li>
<li>Convert Perl POD to ePub format for your iPhone (<a href="http://blogs.perl.org/users/john_mcnamara/2010/07/pod-to-epub-to-ibooks.html">blogs.perl.org</a>)</li>
<li>I would love to see something like this for the Perl standard modules (<a href="http://ruby-doc.org/stdlib/">ruby-doc.org</a>)</li>
<li>Six cool Perl 6 built-ins (<a href="http://use.perl.org/~masak/journal/40459">use.perl.org</a>)</li>
<li>Outsider recap of Larry's 2010 State of the Onion (<a href="http://www.pcworld.com/businesscenter/article/201743/">pcworld.com</a>)</li>
<li>Template Toolkit + vim users, the tt2.vim and tt2html.vim files are now part of vim-perl (<a href="http://github.com/petdance/vim-perl">github.com</a>)</li>
<li>All about Perl 5.12's deprecation warnings (<a href="http://www.effectiveperlprogramming.com/blog/463">effectiveperlprogramming.com</a>)</li>
<li>Github is now at one million projects (<a href="http://techcrunch.com/2010/07/24/github-one-million/">techcrunch.com</a>)</li>
<li>Common Perl 6 idioms (<a href="http://perlgeek.de/blog-en/perl-5-to-6/27-common-idioms.html">perlgeek.de</a>)</li>
<li>The Moose Blog (<a href="http://blog.moose.perl.org/">blog.moose.perl.org</a>)</li>
<li>Modern Perl vs. Desperate Perl (<a href="http://www.bofh.org.uk/2010/07/25/a-tale-of-two-languages">bofh.org.uk</a>)</li>
<li>Per-computer colored prompts in bash (<a href="http://geofft.mit.edu/blog/sipb/125">geofft.mit.edu</a>)</li>
<li>Someone perceives Perl as old, dying. You can either A) Argue, or B) Do awesomeness with Perl to prove him wrong. I suggest B.</li>
<li>Why roles in Perl are awesome (<a href="http://perlbuzz.com/2010/07/why-roles-in-perl-are-awesome.html">perlbuzz.com</a>)</li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>Why roles in Perl are awesome</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/07/why-roles-in-perl-are-awesome.html" />
    <id>tag:perlbuzz.com,2010://1.790</id>

    <published>2010-07-27T14:21:20Z</published>
    <updated>2010-07-27T14:34:31Z</updated>

    <summary> by Chris Prather A question came up recently on a mailing list. I was talking about how Roles are a awesome win for Perl5 considering how few languages implement the concept1. Someone asked what the win was with Roles....</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="Perl 5" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>
<i>by Chris Prather</i>
</p>

<p>A question came up recently on a mailing list. I was talking about how Roles are a awesome win for Perl5 considering how few languages implement the concept<a href="#fn:1" id="fnref:1" class="footnote">1</a>. Someone asked what the win was with Roles. I happen to have been thinking about this recently and dashed off a reply.</p>

<p>When you use Inheritance, especially multiple inheritance, for behavioral re-use you run into several problems quickly.</p>

<p>First Inheritance is an explicit modeling of a relationship that carries semantic meaning. Let's say you're developing a game for Biology students to explain to them taxonomy. In this game a Dog class is a subclass of Animal. That is, the Dog class inherits specific behaviors and attributes from the Animal class. This probably isn't even a direct relationship your Dog class may inherit from a Mammal class which inherits from a Vertebrate class which inherits from Animalia which itself inherits from Life. These kinds of hierarchies are common in Taxonomy as well as in Object Oriented programming. However when you need to express something that may cross cut concerns in, you run into issues.</p>

<p>Say for example your marketing department has had trouble selling this product to schools and is attempting to market to parents directly. They have done studies and kids really like Pets<a href="#fn:2" id="fnref:2" class="footnote">2</a>. So your boss comes to you because the company wants you to add the concept of Pet to your Taxonomy model.</p>

<p>Pets don't fit into a Taxonomy, it's obvious that not all Animalias are Pets<a href="#fn:3" id="fnref:3" class="footnote">3</a> and some Pets may not be animals at all<a href="#fn:4" id="fnref:4" class="footnote">4</a>. In many languages can use Multiple Inheritance to describe this new "I'm an Animalia <em>and</em> a Pet" relationship but often you run into issues there as well. Is a Pet a Life? That would mean our object model would look like:</p>

<pre><code>Life
    Animalia
        Vertebrae
            Canine    Pet
                Dog
</code></pre>

<p>Pet stands out like a sore thumb. Obviously we've got issues with this new modeling. We talk to our boss and figure out that the rules for Pet are simple. Pet's are always domesticated versions of the Animalia, but not every class in Animalia is a pet. So for example Dogs are always Pets, Wolves are not. We can solve this with multiple inheritance now, but it's really not a clean way to express the relationship <em>and</em> it requires us to document the special relationship the Pet class would have with the rest off the Inheritance tree. Once you get beyond a few "special cases" like this it becomes hard to see the model for the exceptions.</p>

<p>This is why some languages like to disallow multiple inheritance entirely. In Java for example, Pet could become an Interface.</p>

<pre><code>public interface Pet {
    Date getYearDomesticated;
}
</code></pre>

<p>This however means that every class that we want to be a pet needs to have the exact same piece of boiler plate code added to it.</p>

<pre><code>class Dog implements Pet {
    ...
    private Date yearDomesticated;
    public Date getYearDomesticated () { this.yearDomesticated }
    ...
}
</code></pre>

<p>If we instead have the concept of Roles then we can apply the concept of a Pet once at any level of the hierarchy we need. A example using a modern Perl<a href="#fn:5" id="fnref:5" class="footnote">5</a></p>

<pre><code>package Pet {
    use Moose::Role
    has year_domesticated =&gt; (
        is =&gt; 'ro',
        isa =&gt; 'DateTime',
        required =&gt; 1
    );
}

package Dog {
    use Moose;
    extends qw(Canine);
    with qw(Pet);
}

</code></pre>

<p>The Pet Role here implements everything we need for a <em>default</em> implementation, and doesn't require more boiler plate to our Dog class, that the bare minimum needed. It also avoids the ugly inheritance issues we saw with multiple inheritance by moving the behavior composition onto different tool. In my opinion, Roles aren't a win for every use of inheritance, nor for every time you want to re-use behavior, but they are an excellent tool to have in the box and one that the Moose crowd knows to reach for quite often.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1"><p>Off the top of my head I only know about Perl5, Perl6, Scala, Javascript, and Smalltalk. There may be other implementations out there.<a href="#fnref:1" class="reversefootnote">&#160;&#8617;</a></p></li>

<li id="fn:2"><p>The Marketing guy's daughter plays on WebKinz nightly.<a href="#fnref:2" class="reversefootnote">&#160;&#8617;</a></p></li>

<li id="fn:3"><p>Pet Shark's would be dangerous to say the least, and where would you keep a pet Blue Whale?<a href="#fnref:3" class="reversefootnote">&#160;&#8617;</a></p></li>

<li id="fn:4"><p>Who doesn't love their Pet Rock?<a href="#fnref:4" class="reversefootnote">&#160;&#8617;</a></p></li>

<li id="fn:5"><p>We're using the the inline package syntax that will be released in 5.14<a href="#fnref:5" class="reversefootnote">&#160;&#8617;</a></p></li>

</ol>
</div>

<p>
<i><a href="http://chris.prather.org/">Chris Prather</a> is an Owner at <a href="http://tamarou.com/">Tamarou LLC</a>, a member of the <a href="http://moose.perl.org/">Moose</a> cabal, and
responsible for <a href="http://search.cpan.org/dist/Task-Kensho/">Task::Kensho</a>.</i>
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Perlbuzz news roundup for 2010-07-06</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/07/perlbuzz-news-roundup-for-2010-07-06.html" />
    <id>tag:perlbuzz.com,2010://1.787</id>

    <published>2010-07-07T03:47:05Z</published>
    <updated>2010-07-07T03:50:30Z</updated>

    <summary> These links are collected from the Perlbuzz Twitter feed. If you have suggestions for news bits, please mail me at andy@perlbuzz.com. Detect regex-slowing match variables in your code (effectiveperlprogramming.com) JT Smith talks WebGUI and plugs modern Perl tools (sourceforge.net)...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="CPAN" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Conferences" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 5" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl Foundation" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>
These links are collected from the
<a href="http://twitter.com/perlbuzz">Perlbuzz Twitter feed</a>.
If you have suggestions for news bits, please mail me at
<a href="mailto:andy@perlbuzz.com">andy@perlbuzz.com</a>.
</p>

<ul>

<li>Detect regex-slowing match variables in your code (<a href="http://www.effectiveperlprogramming.com/blog/140">effectiveperlprogramming.com</a>)</li>
<li>JT Smith talks WebGUI and plugs modern Perl tools (<a href="http://sourceforge.net/blog/want-more-from-your-cms-with-webgui-its-in-there/">sourceforge.net</a>)</li>
<li>Rakudo Star, the first usable release of Rakudo Perl 6, coming on July 29, 2010 (<a href="http://use.perl.org/~pmichaud/journal/40407">use.perl.org</a>)</li>
<li>Schwern's perl5i makes Perl 5 awesomer until Perl 6 comes along. (<a href="http://search.cpan.org/dist/perl5i/lib/perl5ifaq.pod">search.cpan.org</a>)</li>
<li>Perl 5 wiki gets big upgrade (<a href="http://news.perlfoundation.org/2010/06/perl-5-wiki-upgraded-to-social.html">news.perlfoundation.org</a>)</li>
<li>RT <a href="http://twitter.com/morungos">@morungos</a> Devel::SawAmpersand just helped us find and protect against a 200x slowdown in our code!</li>
<li>RT <a href="http://twitter.com/pjf">@pjf</a> Watching <a href="http://twitter.com/szabgab">@szabgab</a>'s Perl on Android talk. Awesome to see it in action. Download at (<a href="http://code.google.com/p/android-scripting/">code.google.com</a>)</li>
<li>Dist::Zooky converts your existing distributions to Dist::Zilla distros (<a href="http://blogs.perl.org/users/bingos/2010/06/and-distzooky-too.html">blogs.perl.org</a>)</li>
<li>"dzil setup" will make Dist::Zilla easier to get started out of the box (<a href="http://rjbs.manxome.org/rubric/entry/1848">rjbs.manxome.org</a>)</li>
<li>Validation is overrated (<a href="http://sethgodin.typepad.com/seths_blog/2010/06/validation-might-be-overrated.html">sethgodin.typepad.com</a>)</li>
<li>Should perlfoundation.org move to WebGUI? (<a href="http://blogs.perl.org/users/scott_walters/2010/06/webgui-suitability-for-perlfoundationorg.html">blogs.perl.org</a>)</li>
<li>What performance increases can we expect as the Perl 6 implementations mature? (<a href="http://stackoverflow.com/questions/3135673/what-performance-increases-can-we-expect-as-the-perl-6-implementations-mature">stackoverflow.com</a>)</li>
<li>The draft of <a href="http://twitter.com/chromatic_x">@chromatic_x</a>'s "Modern Perl: The Book" is now available for review (<a href="http://www.modernperlbooks.com/mt/2010/06/modern-perl-the-book-the-draft.html">modernperlbooks.com</a>)</li>
<li>YAPC::NA 2010 technology overview (<a href="http://blogs.perl.org/users/scott/2010/07/a-vips-yapcna-2010-notes.html">blogs.perl.org</a>)</li>
<li>Four fundamental concepts every Perler should know (<a href="http://www.effectiveperlprogramming.com/blog/393">effectiveperlprogramming.com</a>)</li>
<li>A user looking for help installing Perl 6: (<a href="http://superuser.com/questions/160011/how-to-install-perl-6">superuser.com</a>)</li>
<li>Announcing CPAN Testers 2.0 (<a href="http://blogs.perl.org/users/cpan_testers/2010/07/announcing-cpan-testers-20.html">blogs.perl.org</a>)</li>
<li>Using Growl from the command line (<a href="http://blogs.perl.org/users/alberto_simoes/2010/07/growl-from-command-line.html">blogs.perl.org</a>)</li>
<li>Installing CPAN modules on SOlaris 10 (<a href="http://blogs.perl.org/users/jesse_thompson/2010/07/using-appcpanminus-and-perlgcc-to-install-cpan-modules-on-solaris-10.html">blogs.perl.org</a>)</li>
<li>The marketing of Perl (<a href="http://blogs.perl.org/users/magnachef/2010/07/the-marketing-of-perl.html">blogs.perl.org</a>)</li>
</ul>
]]>
        
    </content>
</entry>

<entry>
    <title>Perlbuzz news roundup for 2010-06-18</title>
    <link rel="alternate" type="text/html" href="http://perlbuzz.com/2010/06/perlbuzz-news-roundup-for-2010-06-18.html" />
    <id>tag:perlbuzz.com,2010://1.785</id>

    <published>2010-06-18T14:58:36Z</published>
    <updated>2010-06-18T14:59:40Z</updated>

    <summary> These links are collected from the Perlbuzz Twitter feed. If you have suggestions for news bits, please mail me at andy@perlbuzz.com. Installing DBD::mysql on Windows: What a pain! (lpsolit.wordpress.com) Allison Randal on how open source is more than just...</summary>
    <author>
        <name>Andy Lester</name>
        <uri>http://theworkinggeek.com/</uri>
    </author>
    
        <category term="Parrot" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 5" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl 6" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://perlbuzz.com/">
        <![CDATA[<p>
These links are collected from the
<a href="http://twitter.com/perlbuzz">Perlbuzz Twitter feed</a>.
If you have suggestions for news bits, please mail me at
<a href="mailto:andy@perlbuzz.com">andy@perlbuzz.com</a>.
</p>

<ul>

<li>Installing DBD::mysql on Windows: What a pain! (<a href="http://lpsolit.wordpress.com/2010/05/15/installing-dbdmysql-what-a-pain/">lpsolit.wordpress.com</a>)</li>
<li>Allison Randal on how open source is more than just code (<a href="http://perlbuzz.com/2010/05/allison-randal-on-how-open-source-is-more-than-code.html">perlbuzz.com</a>)</li>
<li>Screencasts from Italian Perl Workshop 2009 (<a href="http://blog.timbunce.org/2010/05/31/screencasts-from-the-italian-perl-workshop-2009/">blog.timbunce.org</a>)</li>
<li>Excellent tips for working with a new codebase (<a href="http://use.perl.org/~scrottie/journal/40373">use.perl.org</a>)</li>
<li>Someone needs to buy this camel table for their local Perl Mongers group (<a href="http://www.yousuckatcraigslist.com/?p=4659">yousuckatcraigslist.com</a>)</li>
<li>Dave Rolsky on the pros and cons of Dist::Zilla (<a href="http://blog.urth.org/2010/05/distzilla-pros-and-cons.html">blog.urth.org</a>)</li>
<li>What the heck does Dist::Zilla do? (<a href="http://blog.urth.org/2010/06/walking-through-a-real-distini.html">blog.urth.org</a>)</li>
<li>Having to work with Class::DBI makes me appreciate what DBIx::Class has added.</li>
<li>bcvi lets you run vi natively across an SSH connection (<a href="http://use.perl.org/~grantm/journal/40379">use.perl.org</a>)</li>
<li>Does Tim Bunce ever stop? Devel::NYTProf v4 handles string evals (<a href="http://blog.timbunce.org/2010/06/09/nytprof-v4-now-with-string-eval-x-ray-vision/">blog.timbunce.org</a>)</li>
<li>Use references to pass large data without copying (<a href="http://www.effectiveperlprogramming.com/blog/298">effectiveperlprogramming.com</a>)</li>
<li>Artistic License 2.0 makes dual-license boilerplate unnecessary (<a href="http://perlbuzz.com/2010/06/artistic-license-20-makes-dual-license-boilerplate-unnecessary.html">perlbuzz.com</a>)</li>
<li>Why Padre is important (<a href="http://samcrawley.wordpress.com/2010/04/29/why-padre-is-important/">samcrawley.wordpress.com</a>)</li>
<li>Know when and when not to write networking code (<a href="http://www.effectiveperlprogramming.com/blog/154">effectiveperlprogramming.com</a>)</li>
<li>Command-line dictionary in Perl w/LWP and XML::XPath (<a href="http://grepmonster.wordpress.com/2010/06/16/command-line-dictionary-in-50-lines-of-perl/">grepmonster.wordpress.com</a>)</li>
<li>Attempts to validate email addresses with regexes has to be the biggest waste of time in programming today (<a href="http://www.reddit.com/r/programming/comments/c9b2f/perfect_email_address_regex_discovered/">reddit.com</a>)</li>
<li>Top 10 tricks of Perl one-liners (<a href="http://blog.ksplice.com/2010/05/top-10-perl-one-liner-tricks/">blog.ksplice.com</a>)</li>
<li>There's more than one bug tracker for CPAN (<a href="http://perlbuzz.com/2010/06/theres-more-than-one-bug-tracker-for-cpan.html">perlbuzz.com</a>)</li>
<li>Ubic is a toolkit for describing services on Linux in perl. (<a href="http://blogs.perl.org/users/vyacheslav_matjukhin/2010/06/announcing-ubic.html">blogs.perl.org</a>)</li>
</ul>
]]>
        

    </content>
</entry>

</feed>
