autodie 1.11_01 "Aristotle" released - Awesome inheritance

autodie 1.11_01 "Aristotle" released - Awesome inheritance
autodie version 1.11_01, codename "Aristotle", is now making its way through the CPAN. The new version contains quite a few exciting changes. You should be able to make and install the new version just like any other module, without having to muck around with @INC. Do be warned it will overpower your existing Fatal.pm, and while it should be completely backwards compatible, there's always the small risk of bugs that I've missed.

In this post, I want to show you why autodie is so cool, particularly with this new release.

Because autodie is smarter than Fatal, a whole bunch of things which are normally bugs start being correct if you're using autodie. As an example, take the following code:

if ( fork() ) {
   # This is the parent process.
} else {
   # This is the child process.
}

Normally, that code involving fork contains a bug, because fork could return an undefined value to indicate the fork failed. Since we're not checking for undef, our parent would act as a child process, and things are likely to go very badly from there.

However, with autodie we can write:

use autodie qw(fork);


            
        
(read more...)

autodie release 1.10_07 - Codename ikegami

autodie release 1.10_07 - Codename ikegami
Don't know what autodie is? Check out the 5 minute video and find out.

It's Sunday, and that means autodie release day! The new version of autodie is codenamed "ikegami" in honour of the wonderful perlmonk who assisted me in solving one of the trickiest problems in getting autodie running under its new architecture.

In fact, the architecture is the big change for this release. In older versions of autodie, different code was used when running under Perl 5.8 than under Perl 5.10, and each code had its own set of bugs and own maintenance that was required. That meant twice as much work for me.

The new code employs a single unified architecture regardless of the version of Perl used. In fact, in the ikegami release the total number of lines of code dropped, rather than increased. That's a good thing for maintenance, and goes quite some way to paying off a lot of the technical debt I've been accumulating in the project.

There's also been the regular swag of bugfixes, improvements and tests. You can check out the changes file for full information.

You can help autodie!
I've still got a big list of things to complete in my TODO list. Some of them are large, and some of them are small. I also need a bunch more test cases, both working and failing.

If you do wish to help, then feel free to grab the code from CPAN, or take a copy of the autodie repository using git, and feel free to send me patches or even ask for a commit bit. I won't bite.

Also feel free to say "I want to help, but I don't know where to start", and optionally a bit about your skills. I'm sure I can put you to good use. ;)

Even if you don't want to help with the project per se, I am very interested in hearing about if you've been using autodie, are planning on using autodie once it's completely stable, or just think it's a great idea. Likewise, if you think autodie sucks (or needs improvement), I'm also interested in hearing from you, so I can make it suck less. Drop me a note at pjf@cpan.org.

(read more...)

Be cool and join ohloh

Be cool and join ohloh
Ohloh is a website that tracks open source projects. It looks at source code, prepares metrics, and draws lots of pretty graphs. It's great if you want to compare your favourite languages, or see how a codebase changes over time, or see how often you commit to various projects. Like anything web 2.0 these days, it has ways of making friends and rating people and projects.

However, like most things I write about, ohloh has a serious problem. Put simply, it has me listed as the seventh highest committer in the open source world for projects written in Perl this quarter.

This, of course, is complete bollocks. Sure, I write a lot of Perl, but only when I'm at work, travelling, at a Perl conference, at home, or waiting for a bus. There are lots of people out there who write way more code than I do, but they're not listed on ohloh.

So, how can you correct this terrible state of affairs? Well, firstly you can get yourself an ohloh account. Go poking around and claim all the commits you've made on various projects; you may be surprised how many you have, and instead of ohloh thinking of you has half-a-dozen cool people, it'll think of you as one amazing person. Once you've done that, you won't be happy with your score, so go and add any projects to which you've done anything at all to ohloh. Claim those commits. Rinse, repeat.

Before long, you'll have a massive kudos score, and you can show off to all the kids on #moose about how amazing you are. The Moose folk are really impressed by ohloh statistics; that's why so many Moose contributors are in the Perl top contributors list.

And yes, I've already got an account.

(read more...)

autodie release 1.10_06 - Codename chocolateboy

autodie release 1.10_06 - Codename chocolateboy
I'm very pleased to say that the next release of autodie is making its way to CPAN. The release's codename is "chocolateboy", after the wonderful author of autobox who spent many hours discussing the inner workings of pragmas, provided thousands of words of advice, and who allowed me to use him as a sounding-board when I had far too many ideas and not enough implementation.

The new version provides massive improvements in Perl 5.8 support, including:

(read more...)

Bitcoin QR code This site is ad-free, and all text, style, and code may be re-used under a Creative Commons Attribution 3.0 license. If like what I do, please consider supporting me on Patreon, or donating via Bitcoin (1P9iGHMiQwRrnZuA6USp5PNSuJrEcH411f).