The Perl Testing Workshop at YAPC::NA 2012 has officially sold out. We have no more seats to sell. We only have a few more seats left in the Zero to Perl Workshop and the Hackathon, so if you want to participate in either of those, be sure to buy a badge for them today!
If you go to a bookstore to get some books about modern software development, you will find a lot there, but all these books are written from and written for the "java-guys". In my opinion we need to show, that you can use all these techniques in perl too...
Test Driven Development
I cannot remember a time, where modules in perl from cpan were without a test-suite, and we have many test-modules out there, but all the books about tdd are about Java or .Net.
Automatic Acceptance Tests
All agile developers love automatisation. There is Fit developed in java and you need some time to find Test::C2FIT and even then, the documentation is not so easy to read, so we germans are happy to find the Fit Cookbook (in german)
Domain Specific Language (DSL)
I don't know a language in wich it is easier to build up domain-specific-languages, but if you look up the books, you will again find examples in java and in ruby.
After the public buyers-remorse that I (almost) had on the name of my latest module Tie::Select, I got to thinking about the filling of CPAN namespaces.
CPAN is awesome; many have said that it is Perl’s killer app. It has tons of modules to do many many things. The problem is that some of the obvious names are gone. Certain namespaces have implications. For Tie::Select I thought of IO::Select, which exists. I thought of going underneath an existing module’s namespace, for example IO::Handle::Select, but this implies, at least to me, that it is either a part of, or derivative of IO::Handle. Its not, and in fact it isn’t even OO as that module is.
I have settled on the current name for now, but I am not totally happy with it. I got to thinking about other naming problems I’ve had. (And note I am not complaining about any of this, just ruminating):
We’ve posted it before here, and on the web site, but we want to make sure nobody missed it. Here are all the links you need for lodging at YAPC::NA 2012:
Lowell Center (Hotel at the Conference Facilities) - $89 / night
When writing a review of CPAN modules I have a rule that if I come across an issue, I have to do my best to see it resolved. My process for this is something like:
Have you ever forgotten to restore your original STDOUT (or other handle) when you want to select another one for a brief time? Does the usage
my $stdin = select *STDERR;
print "To STDERR";
select $stdin;
seem clunky?
I have always loved the interface provided by File::chdir. It gives you the $CWD variable. When you assign to it you change the working directory. Even better, if you do that with the local directive, you dynamically scope the change!
It struck me, while I was working on the test suite for another project, that I wished that I could have that same kind of interface to select. And why not, they both need changing and restoring of a global property? So I gave it a try, and lo and behold it was simple!
brian d foy will be giving a free workshop at YAPC::NA 2012 described as:
Become a CPAN author and upload your first module while in this workshop. I’ll get you the PAUSE ID, show you how to make a starter module, show you how to upload it, file a bug against it, and show you how to fix it and re-upload. After this workshop, you won’t be scared of the process. It’s easy once you’ve seen it done once. Not only that, you’ll be able to show other people how to do it.
You sure make it hard to submit articles for publication on perl.com:
Hi. This is the qmail-send program at mail1.qnetau.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
:
Connected to 199.45.135.9 but connection died. Possible duplicate! (#4.4.2)
I'm not going to try again; this message has been in the queue too long.
--- Enclosed are the original headers of the message.
An article on Marpa.eml
Subject:
An article on Marpa
From:
Ron Savage
Date:
Sun, 29 Jan 2012 14:44:19 +1100
To:
Karen Pauley
(Body supressed)
And, yes, it is a duplicate...
But don't worry, the article - not quite finished - has not been lost. I'll blog about it here soon.
This blog engine had become too restrictive for writing these reviews, so from now on they'll be static web pages, with a reference here. Comments can be left here, or you can email me at neilb at cpan dot org.
Some people had reported that the reservation system for the YAPC::NA 2012 conference center hotel at the Lowell Center wasn’t allowing them to book a room. Someone at Lowell had entered our room block wrong, it was set to force everyone to check out on June 15th, rather than allowing people to choose to stay until the 16th if they wanted. This has been fixed.
If you would like to stay at the conference facilities (Lowell Center) for YAPC::NA 2012, you can now register here.
Interpreting byte code can never be faster than native code. We all know. But two benchmarks generated in different programs might tell a different story. So I thought I should share my wisdom.
Some days ago, I was experimenting with the Redis noSQL Database in order to find an alternative to file based session storage for Catalyst web applications. Redis comes bundled with a benchmark tool redis-benchmark which reveals the speed of this database. On my Macbook I get these counts when benchmarking the database with single concurrency:
I do not test Komodo for years. Decided to give it a chance. Sometimes I miss autocomplete in emacs (any emacs user suggesting any emacs plugin?). But first script I edit with Komodo, and it doesn't know how to highlight the file, when I have a line like:
@files = <????/*.abs>
It thinks that is starting a regular expression. Oh damn :)
Hi. I'm Nathan. I go by Ravenhall on Perl Monks/PAUSE for those of you in the Perl world. I'm starting this blog to record my work revolutionizing things here at FedEx.
As far as I know, I'm the only full-time Perl programmer here. Perl is used heavily in my group - for both system automation and administration, as well as a few simple web applications. Most of this code is functional in nature, and was written between 12-5 years ago. It's also spread across many servers, and is not very maintainable or portable. It was written under Perl 5.4 - 5.8, so there's lots of room to improve things and bring them up to date.
Sterling Hanenkamp will give a talk at YAPC::NA 2012 described as:
I’ve been building an Android application to access Perl documentation through the MetaCPAN API. This talk will give a brif look at the MetaCPAN API and how it can be used to build a mobile app like this.
Suppose I have a Runner which holds a Prober object. I need the Runner to call the Prober and update stuff according to the result. Pretty simple, right?
my $prober = Prober->new(...);
my $result = $prober->check;
if ( $result eq 'whatiwant' ) {
$self->update($stuff);
}
However, I'm running in asynchronous mode, which means I need the prober and update to run somewhere in the loop, and I can't just sit around and wait for a reply. I gotz otha dingz to do, mon! So, I have two options:
- I call the Prober and sends it the Runner object ($self to you). Once the Prober is done, it will call the correct update method in the Runner object object.
- The Runner calls the Prober and sends it a callback containing updating code.
I asked around at $work and had been suggested to use the first method. Instead, I actually went for the second. (let this be a lesson to you: always listen to suggestions, but make up your mind youself!)
So the most important takeaway from this blog post is that Test::File version 1.31 is now available on CPAN, with some new functions for your testing pleasure: dir_exists_ok, dir_contains_ok, file_contains_like, and file_contains_unlike. Check it out.
But I thought it might also be enlightening if I went into a little more detail about the story behind this release. Now, I already talked about how I became co-maintainer for this module. At the time, I asked brian d foy if there was anything special he wanted me to do for releasing, any particular procedures he wanted followed. As I said, it’s his car—I’m just driving it for a bit—so I want to do things the way he expects them done. The only thing he really mentioned was that he typically puts out a developer release and makes sure it passes CPAN Testers before doing an official release. Of course, I replied, I do that too.