I am sad

I am just sad seeing people paint the Perl 6 developers as the enemy. As the reason for whatever trouble Perl 5 experiences. It looks like a search for a scapegoat. Please, stop this.

Pumpkin Perl Breakdown

Enough broad strokes.

You can find the initial outline and rationale for my proposal here, and my response to the comments and suggestions I got following it here.

And now, here's a breakdown of the what, the why and the how, so that we can make a proper start at turning this from an idea into a concrete reality.

All comments are, as always, very much welcome.

Building pluggable backends with Moo

I've been working through the design and implementation (using Moo) of a module (IPC::PrettyPipe) which implements some backend functionality via plugins. The nature of the module isn't that important; suffice it to say that there's a rendering backend and an execution backend.

I've previously implemented pluggable backends using Module::Pluggable and kin, but since I'm using Moo for this module I thought I'd investigate how its capabilities enabled (or constrained) pluggability.

What goes well with DBIx::Class - the review.

In my case, it went very well with Fideos de Sepia and a nice glass of Fina Enguera.

This is not really a review of Dave's Perl School. His style is competent, informative, sometimes entertaining and pitched right at my level of Perl. Unlike the Moose school I went to in December, this lecture could have gone on for another hour discussing the finer points, but people have lives and we finished at 5pm.

This is more a bit of navel-gazing about what DBIx::Class might mean to me.

Prototype changes across Perl release boundaries

At a previous employer, one of the things I ran into from time to time was the need to get the keys of a hash back out in the same order they were provided. Yes, Tie::IxHash exists to solve this problem: but it always felt like a heavy-weight solution to a simple problem. Why bother adding a new dependency to the system when I could just swap my %hash out for a @hashlike array?


    my @hashlike = (1..10);    # generally the return value of a subroutine

    while (my ($k, $v) = splice @hashlike, 0, 2) {
        ...  # do something with $k, $v
    }

Pumpkin Perl - Redux

And lo, did I write a blog post proposing we rename perl5 to Pumpkin Perl, and lo, did people make lots of comments here, and on IRC, and by other means.

And lo, have I just spent the last three hours going through them all and trying to produce some sort of coherent response to all the various points that people raised.

And lo, here is the result of those three hours, in which I have attempted to cover every important comment and objection I've heard so far. So please, go forth and read it, and point out the things I've missed and any new thoughts you have as a result.

And lo, do I have no idea why I keep saying lo. I think possibly I sprained a neuron or something. Go read the post and think about your comments while I have a lie down in a darkened room ...

... (edit) and I've just posted a more concrete breakdown, nailing down the what, the why and the how and hopefully clarifying the answers to the questions raised in the comments below

First post

First post!

PAUSE permissions should be case-insensitive

The PAUSE permissions model is case-sensitive, which means that Foobar is treated as a different module from foobar. This all works fine unless your filesystem is case-insensitive, like on MacOSX, for example. In this article I expand on what the above means, and give some examples of problems that already exist on CPAN.

My first thought is that PAUSE should be case-insenstive for its permissions model, but maybe there's another solution?

Play Perl is more popular than rt.cpan.org!

Sorry for the eye-catchy title, but seriously, number of Play Perl quests created in 1 week since its launch:

$ curl -s 'http://play-perl.org/api/quest' | jq length
197

rt.cpan.org tickets created after 2013-02-07: 128 (no idea how to add a permanent link to its search results).

Some other stats:

  • 282 players
  • 200 comments
  • 309 likes
  • 1,349 unique visitors
  • 28,222 page views (half of them are probably mine)

New features since my last post:

  • Email notifications (if you have registered in the first few days, go to your settings and set your email!)
  • New Explore tab
  • Players list is now the leaderboard
  • Comments preview with client-side markdown engine
  • Comments and quests editing
  • Auto-highlighting CPAN module names in comments
  • "Like" button in quest lists
Also, tons of JS refactorings and bugfixes, backbone and bootstrap upgrades, etc.

Names and Numbers, Brand and Identity

I've just put a post up on my shadowcat blog talking about where the 'perl 7' meme came from, why it's a terrible idea, and suggesting what we should do instead.

tl;dr - Pumpkin Perl!

This post exists to provide somewhere for people to comment that isn't Hacker News or reddit; I've cross linked it from the end of the blog post itself so hopefully people who want to discuss the idea will find their way here.

(if you haven't seen, there's already been a followup responding to the comments made here and elsewhere and a third post breaking down the what, the why and the how of the proposal)

#galileo on irc.perl.org

Hi all,

I just wanted to drop a quick note to announce #galileo on irc.perl.org as a place to talk about Galileo my CPAN installable CMS and its new companion project GalileoSend which isn’t quite to CPAN yet, but it will be soon.

GalileoSend will make sending files via websocket easy! So far the package includes a command-line sender (client) and receiver (listener/server), a Mojolicious plugin and a javascript client. Futher GalileoSend is a protocol spec, which means if you want to write a client or server in your other favorite language, or a plugin for your favorite framework, its very possible.

Interested? Drop on by and chat about it!

Web Scraping with Perl & PhantomJS

PhantomJS is a 'headless' WebKit browser, mainly intended for use as a web testing framework, and is controlled by a JavaScript API. The 'headless' aspect of that also makes the framework extremely useful for scraping JavaScript heavy websites.

The problem with PhantomJS (up until the v1.8 release on 23 December 2012), was that if you were unfamiliar with JavaScript, CoffeeScript or Node.js (if you were using the Casper.js fork), was that it wasn't very easy understand or control. Since the v1.8 release in December, PhantomJS now supports WebDriver, which basically means you can control it from pretty any language you like (although Perl isn't explicitly mentioned).

Since I like Perl, I decided to give it a go after trying WWW::Mechanize::Firefox + MozRepl, which is great, but doesn't work if you're going double-headless and are running it on a GUI-less server.

Initial entry

perl -le 'print "Hello, World!";'

Bringing Perl5 to GitHub

Even though Git sometimes gives me heartburn, I'm a huge fan of GitHub. The fork & pull workflow makes it sooo easy (and fun) to contribute to other projects. And as a project owner, it is very easy for me to manage incoming contributions. My absolute favorite feature is the discussions that are inline with the code. To me, that is much more natural than talking about code in a separate mailing list.

So I started thinking...what if Perl5 was developed on GitHub[1]?

Moving a large and mature project like Perl5 to a new set of tools and workflows will certainly not be easy and I expect a lot of resistance. I don't expect perfect feature parity either -- some capabilities will be gained and others will be lost. But GitHub has worked really, really well for a lot of projects (including Perl6). So I think it is definitely worth investigating.

Introducing Net::EC2::Tiny

One of the fun / cool things about Perl is that it can easily inhabit that space between "too complex for bash" and "too insignificant to invest in a C implementation." In my opinion a lot of the command line tools for EC2 are pretty terrible - they have a large learning curve, a high amount of dependencies and they just aren't that easy to get up and going.

So I started by thinking what was the "minimum viable product" for an EC2 client? Something that slaps a valid v2 AWS signature on any arbitrary API request and translates the XML returned into a Perl data structure. And that's exactly what Net::EC2::Tiny is.

In the spirit of *::Tiny modules, I tried to restrict the number of dependencies, but when I decided firmly to require HTTPS support, that locked me into IO::Socket::SSL and Net::SSLeay, so I opted to give myself a little bit of sugar and used Moo. So there's 5 non-core dependencies.

Anyway, when you're in the mood for a quick (and possibly dirty) EC2 client, whip up a simple(ish) script using Net::EC2::Tiny. It's the low learning curve glue between the raw EC2 API and Perl - perfect for those jobs which interact with EC2 in a relatively minor way.

Bytes::Random::Secure -- A no-fuss CSPRNG.

There are a lot of contributions on CPAN that fill one niche or another with respect to pseudo-randomness generation. What is hard to find is a solution that provides cryptographically secure pseudo random number generation, reliable and strong seeding, a light-weight dependency chain, and cross platform compatibility through a wide range of operating systems and Perl versions.

Bytes::Random::Secure is one of those modules that gets written to fill a personal need, and then begins to take on a broader life of its own. As is often the case, the contributions of others in the community have served to improve the module beyond its original specifications. Dana Jacobsen provided a lot of suggestions, and even went so far as to create a new seeding module (Crypt::Random::Seed) which helped Bytes::Random::Secure to reduce its dependency footprint greatly.

MooX::LvalueAttribute - Lvalue accessors in Moo

cross-posted from dams blog

MooX::LvalueAttribute - Lvalue accessors in Moo

Yesterday I was reading Joel's post, where he lists great Perl things he's seen done lately. Indeed these are great stuff. I was particulary interested by his try at playing with Lvalue accessors.

I thought that it would be a great exercise to try to implement it in Moo, as an additional feature, trying to get rid of the AUTOLOAD. Also, I was willing to avoid doing a tie every time an instance attribute accessor was called. Surely, I needed to tie only once per instance and per attribute, not each time the attribute is accessed.

So I started hacking on the code of Moo. Getting rid of the AUTOLOAD was easy, as I could change the way the accessor generator was, well, generating the, err, accessors.

Introducing quickcd

Hi guys,

This is my first post on b.p.o. I know you guys are arguing about the version issue of Perl recently. How about take a short escape and try quickcd at https://github.com/jchain/quickcd? If you are a Linux && Bash guy, you might find it useful.

deb.perl.it - bridging CPAN and Ubuntu → step3

Now also Ubuntu Perl packages indexed. For example Moose::Meta::Class

SQLite and Writes

Most DBI tutorials will show you how to use prepare()/execute(). Something like this:

my $sth = $dbh->prepare( 'INSERT INTO table (foo, bar) VALUES (?, ?)' ) or die ...;
$sth->execute( 1, 2 ) or die ...;
$sth->finish;

Most of us write DBI this way when we don't use DBIx::Class or some other abstraction layer (or we use $dbh->do(), but it won't end up changing my point). For most databases, the above is fine.

On SQLite, you can lose data that otherwise would have gone in fine.

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.