-
“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.
The main Perl Buzz blog, which you're reading right now, is all about news, reviews, and what's exciting in the Perl world. We're interested in everything from impressive Perl websites (see our review of iusethis.com) to releases of free and commercial Perl software (like Movable Type 4.0, released last week) to interesting uses of Perl you might not know about (like attributes or how to write a LOLCODE parser using Parse::RecDescent).
Over in Project Hum, we track what's going on in Perl projects. Anything from performance tweaks to calls for help to translations of docs into other languages. We watch other Perl news sources to find out what's going on, but please let us know if you'd like us to post something about your project!
CPAN Watch is all about what's noteworthy on CPAN. Watching the full feed of CPAN uploads can be like drinking from the firehose, so we filter it and just post the most interesting releases, along with why you should care.
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.
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.
Norbert E. Grüner is chair of the YAPC::Europe Foundation, founder of the German Perl Workshop, and is involved in organising Perl events throughout Europe.
Tim O'Reilly is not only the publisher of many Perl books, but also founder of The Perl Conference which began in 1997 and grew to become part of the Open Source Conference in later years. He has been a constant supporter of the Perl community over many years.
Allison Randal is architect of Parrot and was previously project manager for Perl 6, has acted as president of The Perl Foundation, and wrote the new version Artistic License 2.0 under which Perl and many related projects are released.
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:
perldoc attributes
- Attribute::Handlers -- a nicer way to handle attributes
- Lightning Strikes Four Times, where Mike Friedman discusses using attributes for logging.