On the removal of some core modules

I’m sure most of the readers of this blog will have seen that both Module::Build and CGI.pm are up for removal from the Perl core. I thought I would toss my $0.03 (inflation) in on the matters.

Reverse installing CPAN, at the Polish Perl Workshop

My Polish Perl Workshop talk on taking an existing Perl installation and creating a CPAN-like repository that would create it.

Using Stratopan To Build ... Stratopan

Stratopan is a slick new service for hosting custom CPAN-like repositories in the cloud. I've been doing all the development work for Stratopan on my laptop computer. But the other day, I decided to try running it on the Linode server I rent.

Stratopan-Screen-Shot.png

So I logged in to the (nearly pristine) server, fired up cpanm to install all the prerequisite modules, and launched the application. Lo and behold, it was broken! Read on to find out how Stratopan actually saved me from hours of debugging pain...

Speeding up Test::WWW::Mechanize tests with clone()

Today I was looking at old automated Perl test based on Test::WWW::Mechanize. It was it testing a complex form. For each of about 10 tests, it loaded the form (with a get_ok() call), and then submitted the form with a variety of input.

Now that we run about 25,000 tests in total in the test suite, I’m always looking for ways to speed up the tests. HTTP calls are relatively slow, so systematic ways to slim them down are attractive.

In this case, I found there was a simple change that I could apply that sped up the particular test by about 28%.

Each time the test was calling get_ok() on the page, it was getting back the same result, which is wasteful. I refactored it like this:

my $base_mech = Test::WWW::Mechanize->new;
$base->get_ok($page_to_test);

Then, everywhere we had a get_ok() call to load the page again, I replaced it with this:

Interview with Jay Hannah

the Chief Ticket Monkey of the Perl Mongers.
24.17 min of video or audio only.

German Perl Workshop 2014 - Act website online - T-306 days

And yet another short status update for the GPW 2014. The official Act-website is now available. You're now able to register and to submit talks.

http://act.yapc.eu/gpw2014/

German version: http://www.perl-community.de/bat/poard/message/167756

Steal this for Perl hackathons

drupal_sprint1.JPGI'm at a conference in Portland this week to learn about a web framework called Symfony2 for my $DAYJOB. The Symfony2 stuff is all co-located with DrupalCon 2013 and one of the rooms across the hall from our workshop was for Drupal sprints. The sign in the picture was posted outside - and it makes it super clear that newbies are welcome, and who they should try to find to get going on a task quickly.

This is an idea we need to steal for Perl hackathons.

A call to action for CPAN authors

CPAN authors should look at the smoke tests for their modules to ensure that they're passing on Perl 5.18. The hash randomization change (and a few others) has bitten many a module that may currently be relying on undefined hash behavior. If you haven't checked your modules recently, you may be in for a surprise.

The problem is significant, especially when compounded by the fact that a single misbehaving module can block many more modules that may depend on it.

As an example (not to finger-point, but just to illustrate): Crypt::DES, Crypt::IDEA, Crypt::Blowfish, and Crypt::Twofish had a single line of XS code that was incompatible with Perl 5.18 (which happened to not be related to hash randomization). As a result, all modules that depended on any of these modules also would fail to install on Perl 5.18. This includes Authen::Passphrase, and Crypt::OpenPGP, as well as dozens of others.

Hallway++ at YAPC::NA 2013

Interested in meeting new people at YAPC::NA? Hallway++ means you're never interrupting

Git is the next Unix?

Is Git the next Unix?

Short answer - no.

Long answer - no, but (a) Git is a powerful distributed source control system for developers and (b) Git's underlying object database is a powerful, fast database (faster than "cp-a" by some accounts). (It might be your next filesystem, though -- read the linked article.)

Git's object database sacrifices some space for ease of manipulation, as each object is a file referred to by its SHA-1 hash. These objects are in a 2-level store, so an object A4F272058... will always be found at A4/272058... This is both fast (as mentioned before) and easy to debug and manipulate. And it is fast (worth mentioning twice), to the point that "git checkout" can be faster than "cp -a" in at least some circumstances.

Take a look at Git Interfaces, frontends, and tools for some of the many tools built on top of or with Git.

Perl 5 Porters Weekly: May 13-19, 2013

Welcome to Perl 5 Porters Weekly, a summary of the email traffic of the perl5-porters email list.

The topic of the week on P5P was the clean up and release of perl 5.18.0 which was released on 5-18 for North Americans. RJBS in a seperate email said blead would be reopen for patches on Tuesday, as 5.19.0 is scheduled to be released on Monday (May 20).

Read the release announcement

Read perldelta

Download a tarball

Congratulations to the perl5 team for this new release!

Strawberry Perl 5.18.0.1 released

Strawberry Perl 5.18.0.1 is available at http://strawberryperl.com
(all editions: MSI, ZIP, PortableZIP for both: 32/64bit MS Windows)

More details in Release Notes:
http://strawberryperl.com/release-notes/5.18.0.1-32bit.html
http://strawberryperl.com/release-notes/5.18.0.1-64bit.html

Cleaning up the Test::Class::Moose base class

I'm quite enjoying Test::Class::Moose. It's very easy to use and it gives you such fine-grained control over your test suite and powerful reporting capabilities that it's turning out to be far more powerful than I had expected. It's actually easy enough to use for beginners, but power users will really appreciate it. There was, however, a major issue I had with it and it stems from a habit I picked up from Test::Class.

For those who are very familiar with using Test::Class (or if you've read my Test::Class tutorial), you may be used to seeing a base class that looks like this:

Augment and Inner: Haters Gotta Hate

The other day, on the Moose mailing list, I read this: “I’m not sure augment/inner is ever the right answer, ...”.  It reminded me of this sentence from the POD for Moo:

... the author considers augment to be a bad idea ...

Here’s another:

Nobody understands augment/inner properly, and the whole idea is broken.

The authors of these statements are intelligent, experienced programmers.  You can find similar statements all over the web, also made by intelligent, experienced programmers.  It certainly sounds like this augment thing is a pretty terrible idea.  So why all the hate for augment?

Shell access to $NOT_MY_ENVIRONMENT for development?

I'm a self employed hacker. My development (actually, my total) infrastructure consists of a six-year old laptop running Linux with a full disk and a noisy fan, and a rented virtual server, also Linux. I have a few modules up on CPAN, which occasionally receive reports from cpantesters or the odd individual user with a build/test failure on a platform I don't have access to. Blinding attempting fixes and waiting for reports is tedious and inefficient.

There are a few no-cost BSD shell providers around, which has allowed me to develop and test directly on that platform. However I haven't found anything similar for Win32. I vaguely remember some offering from Microsoft for CPAN developers, but can no longer find any reference to it. Can someone jog my memory, or give me a pointer to an alternative service?

Indented comments

When I was starting out as a programmer, I used to work with an
engineer who insisted that we write the comments to our C code at the
end of the lines, starting in column 80. "That way", he said, "I can
read the code without being distracted by the comments". I think it
was more his assembly code experience that made him prefer that style,
but unobtrusive comments are certainly a worthwhile goal. Later, I
came up with my own solution to the problem, and although in over
twenty years I have seen only one other programmer who uses it, I
use it all the time in my projects and I wish more people used it too.

WWW::KrispyKreme::Hotlight - first release

I have uploaded the first version of WWW::KrispyKreme::Hotlight. This is basically a Perl wrapper that interfaces with Krispy Kreme's location search page

Creating a new object like this:

# only supports geo right now
my $donuts = 
    WWW::KrispyKreme::Hotlight->new(where => [34.170833,-118.25]);

and calling the locations method like this:

my $locations = $donuts->locations;

will return a structure like this:

An Incident Summary

A short note clarifying the results of an IRC incident.

My "Mojolicious Introduction" now updated for 4.0

On Feb 28, 2013 I gave a talk to Chicago.pm about Mojolicious. I called it an introduction, but I really wanted to show some of the features that sets Mojolicious apart. Because of this, the talk moves very fast. It hits routing and responses quickly, hits testing often, on all the way to well-tested non-blocking websocket examples.

I promised to get my slides up afterwards but life (i.e. my doctoral thesis) got in the way. Now with the release of Mojolicious 4.0 I thought I would take the opportunity to right a wrong and get the slides up; so here they are: http://mojolicious-introduction.herokuapp.com/!

The talk is itself a Mojolicious app, the source of which is available from on GitHub. Not only are all the code snippets shown in the talk included, not only do they all run, but they are actually what is rendered by the talk (DRY++), so what you see is what you get! Please leave any feedback and ask any questions. I may not see the responses here, so feel free to ping me elsewhere if needed.

twinkle twinkle catalyst

I'm developing under Catalyst and am using the Catalyst test server that is running on my local machine and is reloading every time I'm saving changes to the source tree. This is a cool feature, but I have to wait in front of the browser until the application is loaded full and can answer http requests; if I hit F5 in the browser before it is up and running I get a connection refused error and have to hit it again.

Finally I got tired of that and wrote this little hack that shows a load indicator on my ubuntu desktop. The thing is very primitive. While Catalyst app is loading, it blinks yellow. If it has loaded ok, it shows green light for a couple of seconds and then disappears. If there was a failure (syntax failure in my case most of the time), it shows red light which doesn't go away until the problem is fixed.

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.