• “Beginning Perl” turned into a wiki

    Simon Cozens has been mostly absent from the Perl community since he's gone off to mission work in Japan, but he writes in to tell us:
    I've begun the process of putting my (very) old book Beginning Perl, first edition, into a wiki to allow it to be updated, corrected and annotated: http://books.simon-cozens.org/index.php/Beginning_Perl It's a very rough data dump at the moment and needs a lot of gardening, but hopefully it's still a useful resource.
    Thanks to Simon for making this available to the community.
  • PerlBuzz is go for launch!

    Welcome to Perl Buzz! Andy and I are excited to be launching a new Perl blog, and hope you'll like it as much as we do.

    A lot of people have been asking us, "Why do we need another Perl blog?" We believe that there's room for as many Perl blogs, journals, and news sites as people want to set up. Each has its own flavour and will appeal to different groups of people, and that's just fine. Perl Buzz's unique selling point is that we're bringing a shiny, happy view of the Perl world to the masses. Some other sites focus on communicating within the existing Perl community. We'll do that, too, but we also hope to reach out to those who aren't yet part of the tribe, and show them just how cool Perl is.

    So, let's take a look at what Perl Buzz has to offer.

    You can subscribe to any or all of the feeds via RSS; see the links in our sidebar.

    If you'd like to contribute to Perl Buzz, please email us at editors@perlbuzz.com, or see our How to contribute page.

  • Organizing Tests with Test::Class

    At the Perl and Mac Development Blog, Christopher Humphries has written a tutorial on using Test::Class.

    There are basically two schools of testing that is either Test::Harness based or Test::Class based. Test::Harness school runs a series of scripts which have tests in them top down, usually with a plan at the top of the file (plan is the number of tests you are planning on running). Test::Class manages itself, using Test::Class for tests and to run them...

    Most of my test files use Test::More and little else, but Test::Class is a great way to organize tests for larger projects. Best of all, it works with all test modules built on Test::Builder, which is to say almost every test module on the CPAN.

  • I CAN HAS LOLCODE PARSER?

    Unless you've been buried in a bog for the last year, you'll have come across lolcats, the pictures of cats speaking an amusingly stilted dialect of English.

    From lolcats came lolgeeks and then, inevitably, lolcode:

    HAI
    I HAS A VAR ITZ 1
    IM IN YR LOOP
    VISIBLE VAR
    IZ VAR BIGGER THAN 39 O RLY?
    YA RLY
    GTFO
    NO WAI
    UP VAR!!1
    KTHX
    KTHX
    KTHXBYE
    

    I talked to Joe Drago, author of a lolcode interpreter written in Perl.  The parser is based on Parse::RecDescent, a recursive descent parser written by Damian Conway.

    Joe's a Senior Software Developer at a video game company, where most of his work is in other languages, but he says he prefers Perl to the C++ that pays the bills.

    Joe says, “I'd never used Parse::RecDescent before… I found it to be wonderful. I've been wanting to write a parser for a while now (I own the Dragon book and one on lex/yacc), but I needed a test case. This was a great opportunity to screw around with that. The module is very Perlish, in the sense that it lets you have fun with the grammar of a language without having to plan complex data structures too much to see some results. I highly recommend P::RD for Perl programmers interested in how grammars are written.”

    Unfortunately Joe's lolcode interpreter predates the official lolcode specifications and isn't compliant with them. But, he says, “I released it under the BSD license under the notion that someone more interested in the final standard would be inspired by my simple stuff and make something really cool with it. Hint, hint!”

  • Perl debugger reference card

    Andrew Ford, maintainer of refcards.com has released a reference card for the Perl debugger.

    refcard.png

    All his reference cards are downloadable as PDFs in the paper size of your choice.  His current reference card project is for WWW::Mechanize, which just tickles me.

  • White Camels for 2007

    The 2007 White Camel awards for achievements in promoting the Perl community have been awarded to Norbert E. Grüner, Allison Randal and Tim O'Reilly.

    The White Camel awards were started in 1999 to acknowledge the work of Perl's community leaders, and are awarded each year at the O'Reilly Open Source Conference.

  • Attributes: powerful Perl syntax you might not know

    An anonymous monk at PerlMonks asks How is this Perl?.

    sub end : ActionClass('RenderView') {}
    

    As it turns out, they're attributes, one of the newer and less well understood additions to Perl. You won't see them everywhere, but they're starting to appear in a number of places; many people -- including the anonymous perlmonk -- first encounter them in the Catalyst MVC framework.

    Attributes allow you to add extra semantics to any Perl subroutine or variable. The typical example -- given in both the perlmonks thread linked above, and in the Attribute::Handlers docs linked below, is an attribute :Loud which makes any subroutine called with it behave as if it only knew how to shout:

    sub greet : Loud {
    print "Good morning.n";
    }
    greet();
    

    ... prints "GOOD MORNING";

    You can also declare variables using attributes:

    my $greeting : Loud;
    

    To learn more about attributes and how to write them: