Booking is now a YAPC::NA 2012 sponsor!  Booking.com is...



Booking is now a YAPC::NA 2012 sponsor! 

Booking.com is part of Priceline.com and is World’s #1 Online Hotel Reservations Company, offering over 200,000 hotels worldwide.

Due to the growth of our IT department we are now hiring Perl devs!

We use Perl, Apache, mod_perl, MySQL, Memcache, Mason, JavaScript, Git, Linux & more!

Our software development basis is SCRUM.

If you want to work in an international, result driven, fun & dynamic environment, join our team in Amsterdam, the Netherlands!

[From the YAPC::NA Blog.]

App::TimeTracker 2.016

Read more about App::TimeTracker 2.016 and how Test::MockTime can help you testing stuff that depends on time (an inherent fluid "thing" that's rather annoying test) in the latest App::TimeTracker blog post

Exploit Git Hub tags!

If you put your Perl code on Git Hub, I'd like to encourage you to use a a feature that isn't (at all) intuitive: tags.

Basic tags in git are a human friendly label that point to a certain commit. Basic tags don't have a git object associated with them so they're mostly for use on your local repository.

It is also possible to create "annotated tags" which are first class git objects and point to a specific commit (as the top of a tree of commits.) Because annotated git tags are first class objects, it is possible to share them across repositories. It is these tags that I would encourage you to make if you use Git Hub.

Working on GraphViz2::Marpa

Hi Folks

I've started work on GraphViz2::Marpa, which will use Marpa::XS to parse GraphViz-style 'dot' files.

This is mainly to exercise my Marpa skills. However, I'm hopeful the result might/will lead to an on-line editor for dot files, with 2 panels, a dot editor in one and a result of the server rendering the output from dot (or whatever) in the other, all in Perl. We'll see.

Web Security 101

Michael Peters will be giving a talk at YAPC::NA 2012 described as:

Security is important in any programming environment but programming for the web has some unique possibilities and hazards. Most web programmers have little to no training in security and lots of web development is done by people who don’t wear a full-time developer hat. Add to this the fact that bad security on a web project can have very public, very embarassing, and sometimes legal consequences.

This talk will walk through the basics of web security without focussing too much on the particular tools that you choose. The concepts are universal, although most examples will be in Perl. We’ll also look at various attack vectors (SQL Injection, XSS, CSRF, and more) and see how you can avoid them. Whether you’re an experienced web developer (we all need reminding) or just starting out, this talk can help avoid being the next easy harvest of The Bad Guys.

[From the YAPC::NA Blog.]

More Marpa Madness

For the past year or so, I've been following the posts on Marpa with interest, but I never got around to writing anything with it, because honestly, the docs seemed a little bit opaque and incomplete to me.

Then, the other day, I saw Jeffrey's post about lexing with Marpa and I took it as a challenge. You see, I've never written a lexer. I've written grammars using "lexer-free" parser builders like Parse::RecDescent and [Regexp::Grammars](https://metacpan.org/module/Regexp::Grammars], and hand-written recursive-descent parsers with the help of Parser::MGC, but when it came to writing anything that required a lexer, I was paralyzed. It seemed to me that lexing was frequently ambiguous, and dealing with that ambiguity was a black art that I couldn't understand.

CPAN Testers Summary - December 2011 - Blood on the Tracks

Happy New Year to all. Last year had its ups and downs, so here's hoping that 2012 sees a much more settled year :)

2011 ended on a rather sour note, with our previous hosting company, Hetzner, causing us no small amount of stress and infuriation last year. I could recount all the problems, but suffice to say I would never recommend them to anyone ever again.

Stepping Up


This week I became co-maintainer of a second module: Test::File.  I now have the privelege of being co-maintainer on modules by two of our most prolific Perl authors (i.e. schwern and brian d foy).  And, as you may have gathered from my blogs thus far, I’m certainly no one special.  What did I do to receive such honors?

Nothing, really.

What I Learned Teaching Perl for Advocacy

John Napiorkowski will be giving a talk at YAPC::NA 2012 described as:

In Q4 2011 I taught an eight session class about Modern Perl, which was primarily aimed at people that are new to Perl but wanted to learn.

This is a presentation about what I learned from my students during that class.  I will review what they loved as well as what they found difficult.  The goal of my presentation will be to help those who want to teach Perl for fun and advocacy learn from my experience.  Additionally I think that the community can really benefit from understanding what is on the minds of people new to Perl.

[From the YAPC::NA Blog.]

Mojolicious workshop in Hamburg

The Hamburg perlmongers will be doing a Mojolicious workshop in Hamburg on Sathurday, 28th of January, 10:00 am.

No prior knowledge is necessary, Marcos Rebelo will give an introduction. And later we will hack in small groups on concrete projects.

I love CPAN Testers!

What other language comes with a service like CPAN Testers?

I recently uploaded version 0.02 of Module::UseFrom and little did I know, but it had an odd bug. As hopefully you all know by now, since Perl 5.14 many functions that take hashes or arrays as arguments can now take references as well. This often makes for cleaner code, but I don’t use it (intentionally) on CPAN modules so that they are backwards compatible. However when you write keys $export but meant to write keys %$export and it works you never notice, the tests all pass for me. Release.

On most languages many users would attempt to install and would fail before a few would file bug reports. With CPAN testers however, an army of dedicated volunteers are out there keeping my back. So thanks guys! Bug caught, face saved, everyone wins.

Thank you CPAN Testers!!

I need your help with Perl and the Internet of Things at YAPC::NA


Physical Computing, Internet of Things it does not really matter what you call it. We are talking about controlling things. Maybe you just want a text message when your doorbell rings or maybe you want to print in 3D straight from Perl using a Makerbot. Maybe you just want more control over your Christmas lights, CheerLights. Maybe there are dirty words you want your TV to just mute.

Arduino, PWM, servo motors, stepper motors, wii controllers, the list goes on and on. Have you ever wondered what it all means and how to connect them all?

Many of you know I am working on getting the Perl community interested in the Internet of Things and in getting CPAN stuffed full of Internet of Things code. To do that I need more people interested and enable to hack in the Internet of Things space.

I know we can make Perl a choice language for scripting the physical world together.

Baby XS to get you started

Joel Berger will give a talk at YAPC::NA 2012 described as:

I am no expert in XS, nor am I am expert in C, but events conspired to force me to learn. What I found is that while XS can be used as a language all its own, it can also look and feel very much like C.

In this talk I will present a minimal subset of XS needed to get started. I will present some “easy” idioms and rules-of-thumb to keep XS from becoming overwhelming. Best of all, its still real XS, so you can add all the full-power XS you want later! 

If you would like to learn enough to start a small XS project, come see this talk.

[From the YAPC::NA Blog.]

Skipping Test::Class tests in abstract base classes

With the latest release of Test::Class::Most, I added the is_abstract feature. With this, you can declare a test class like this:

package TestsFor::TV::Episode::Broadcast;
use Test::Class::Most
  parent      => 'TestsFor::TV::Episode',
  is_abstract => 1;

is_abstract is a non-inherited property of a test class which says "I'm abstract" (no surprise there) and you can check it with:

Test::Class::Most->is_abstract($some_test_class);

The reason for that is simple. Imagine you have a TV::Episode class, but it's an abstract base class which should never be instantiated. You actually have a TV::Episode::Broadcast and TV::Episode::OnDemand classes which are the concrete implementations. You can make tests work in your test classes very cleanly with this.

What! No Lexer?

To those who have noted that Marpa::XS does not come with a lexer, I'd respond that, in a very real sense it does -- Perl. Perl5 is a powerful lexical analyzer.

If you're trying to figure out how to write your first Marpa parser, I'd recommend a close look at Wolfgang Kinkeldei's recent posting about his Marpa-powered CSS parser. Wolfgang lays his parser out in a very elegant fashion, and I find his code makes an excellent template.

Especially nice-looking is Wolfgang's lexer. Wolfgang follows one of the two main strategies for lexical analysis in Perl: he consumes the input using substitution ( s/ ... / ... / ) commands.

The other strategy is to use the Perl regex search position to track the progress of the lexical analysis. In the search-position strategy, your cases consist of a lot of match commands using the \G anchor and the gc modifier: m/\G ... /gc . An excellent tutorial on this kind of lexing, albeit in a non-Marpa context, can be found in Mark Jason Dominus's book, Higher Order Perl

API design talks

For the past two days, I've been downloading Ruby conference talks from this wonderful site and watching them on my Samsung Galaxy S Wifi. I recommend all you guys to take a look too, lots and lots of videos there. I wish more Perl talks were available online and of similar recording/encoding quality, but I digress.

I am currently particularly interested in the API design talks. This one from Anthony Eden is one of the better ones: not too long, presents simple things to remember, and comes with concrete examples.

I dabbled a bit in Ruby a few years ago, but never knew that Ruby's Net::HTTP library is so whacky. I wonder why they didn't just copy the LWP interface, the way they also copied DBI's and several other Perl features. LWP has been doing the right thing since the 1990's. The more recent Ruby HTTP libraries like Typhoeus and Faraday are saner, and they mimick LWP to some significant extent. Too many "cute" names though, the slides got the Typhoeus name wrong BTW :)

We will be having a Perl Foundation Party at YAPC::NA 2012 this...



We will be having a Perl Foundation Party at YAPC::NA 2012 this year. At the banquet we’ll hand out clubbing shirts. They light up and animate like the image above. That will be your ticket to get into the party.

The party itself will be hosted a few blocks away at a nightclub called Segredo. If you show up wearing the shirt we’ll let you in to the VIP lounge where you can get your first few drinks for free!

This party is being sponsored by a donor who would like to remain nameless. However, they’d like to encourage you to give generously to the Perl Foundation

[From the YAPC::NA Blog.]

A Simplified Interface for Module::UseFrom

A couple days ago I released Module::UseFrom and I asked Schwern for his comments since it was addressing an issue that I knew he was very familiar with.

In response to his concern that the interface is overly complicated and strays from the known use interface, I really had to examine what I was doing, why, and how best to accomplish it. Most importantly I followed his suggestion to create a separate use_if_available function (exported on request) rather than using flags to use_from.

In the end I needed tidier cleanup from a no-op use_if_available and I needed some way to inform the user whether or not the module had been loaded (without being able to tuck it into a hash). The former was accomplished by injecting a no-op subroutine to catch import parameters intended for the not-available module. The latter involved using the rarely seen dualvar to tuck the module version into the number slot of the original scalar (I thought that was rather cute).

I have released 0.02 which provides this greatly simplified interface and since I’m sure nobody jumped out to use 0.01 in a mission-critical way, I will remove it from CPAN as soon as 0.02 posts.

Special thanks to Schwern for his comments. I welcome yours if you have any.

App::TimeTracker 2.014 and CPAN::Mini::FromList 0.04

Wow, the new year starts with a lot of collaboration!

Today I got two IRC messages from people who added features / fixed bugs in two of my CPAN modules. Only now I had the time to take a closer look at the requests, merge them and push the new version to CPAN and github.

You can read more about the new version of App::TimeTracker in the App::TimeTracker Blog (Thanks, plu)

CPAN::Mini::FromList is a rather old dist I hacked up during the Oslo QA Hackathon, and it seems that it's still in use up there, as Salve submitted a patch that I just had to merge and than `dzil build`.

Only slightly related: A big THANK YOU is also due to the nice members of the #catalyst IRC channel, who (again) answered my question in no time.

Testing Updates

Test::More::Prefix works with new Test::Builder

One of the CPAN testers appears to have picked up that there's a new Test::Builder... Test::More::Prefix knew a little too much about how the old one worked, so there's a new version that handles whichever you have installed...

New Test::BDD::Cucumber

Which worries me that the new Test::BDD::Cucumber, which has loads of fixes, and now passes the core parts of the Cucumber TCK suite, may need a bit of wrangling to work with it...

Automatic generation of Cucumber from code

And if you're in the last bit interested in Cucumber, you might find my article on generating Cucumber automatically from code blocks interesting...

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.