pjf is currently certified at Journeyer level.

Name: Paul Fenwick
Member since: 2000-03-29 03:29:11
Last Login: 2008-07-21 09:44:28

FOAF RDF Share This

Homepage: http://perltraining.com.au/

Notes:

Personal homepage: http://pjf.id.au/

E-mail: pjf at cpan dot org
AIM: miyuki3k
ICQ:18669287
Yahoo: miyuki3k
Jabber:pjf@jabber.org

Projects

Recent blog entries by pjf

Syndication: RSS 2.0

21 Jul 2008 »

autodie 1.99 stable released - codename jarich
I said that I'd get a stable release of autodie out before OSCON. Since OSCON starts in 5 hours, and I intend to use all that time for sleeping, that means it's being released right now.

After 243 commits since project inception, and three and a half months of work, the first stable release of autodie is making its way to the CPAN. This is not marked as a developer release, so you'll be able to install it using the regular CPAN installer, or dh-make-perl, or whatever other tools you prefer to use to manage your modules.

The observant reader will notice this is a 1.99 release, but I've occasionally bandied around the phrase "autodie - It's Fatal 2.0". The 1.99 release is because I expect to get feedback, patches, and bug-swatting done over OSCON, so the hallowed 2.0 version will appear after the 1.99 release has run the gauntlet of being (ab)used by my peers.

That's not to say the 1.99 release isn't good. It's awesome. autodie has already gone through eight dev releases, as well as being used on my own systems. Go and use it.

Note that autodie does overpower (and on some systems, overwrite) the version of Fatal.pm that comes with Perl. Some of the internal interfaces of Fatal have changed to support new functionality. If you've been calling internal Fatal subroutines (ie, things not documented in perldoc Fatal), then you may wish to hold off until the 2.00 release.

The 1.99 release codename is "jarich", after Jacinta "jarich" Richardson, who pretty much gave up an entire week of her time assisting me with talk preparations for OSCON, and doing practically nothing else. Jacinta, you rock.

For those of you at OSCON, I'll be doing a short talk on autodie at the Perl lightning talks, including showing off some of the cool features like building your own language packs and exception systems.

18 Jul 2008 »

Journey to OSCON / Module releases
It's 4:30pm in Oregon, the jetlag is pretty bad, and I'm drinking yet another coffee to perk myself up. The thing is, I'm still in Australia, where it's stupid-o'clock in the morning. I figure getting the jetlag out of the way now and sleeping on the plane is going to be better than being awake during the plane and whacked in Portland.

At least, that's the plan.

I've spent all of today, and all of yesterday, and all the day before that working on slides. I'm giving 4.5 hours worth of presentations in tutorials and conference talks, and since my presentations tend to move fairly quickly, I have more than one thousand slides prepared. I'm still adding them, or at least I was until brain crashed.

So, as a "reward" for having worked on so many slides, I'm writing code. At 2:30 in the morning. I've pushed out a new release of IPC::System::Simple. It now has capturex() and systemx(), which are variants of capture() and system() that never ever ever use the shell, even if you use one argument. Thanks to ikegami for encouraging me to implement this.

In order to make sure my Perl Security tutorial matches reality, there's also a new release of Proc::UID making its way to the CPAN. It's mainly a tidy-up of the old code, with better documentation, tests, and build system.

What I haven't got out yet is the stable release of autodie. Yes, I know it's what everyone's waiting for. Before I can release it, I want to walk through my TODO list and figure out what really needs doing, and what can be put off. Unfortunately my spell-point meter is dangerously low from the jet-lag, and casting "comprehend project" is rather challenging right now. Instead there's a good chance I'll be making a release while over the Atlantic, and pushing that to the CPAN once I touch-down.

For those hoping to meet me at OSCON, I'll be landing Saturday, but I won't be very sociable until Monday afternoon, after the stress of my tutorial is over.

14 Jul 2008 »

See me talk at OSCON 2008
Next week is OSCON 2008, and I'll be presenting! Since I'm Australian, and I know Perl, you can expect my presentations to be awesome. ;) You can come see me at:

Of course the lightning talks will have other people presenting as well, and should be heaps of fun. Anthony Baxter runs the OSDC lightning talks, and is also running the general lightning talks at OSCON. OSDC has the best lightning talks ever.

On the topic of OSDC, you can see me presenting there as well (paper acceptance is not yet confirmed, actual results may vary), so come to Australia for OSDC from the 2nd-5th December!

4 Jul 2008 »

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);

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

And now the code is correct! autodie knows that fork is allowed to return zero to the child, but returning undef is an error. This is much easier than checking the return values manually.

However in my opinion the best thing about the new release is that we can now cleanly subclass both autodie and autodie::exception, which means we now have a very easy way to slot in our own exceptions frameworks.

Let's start with a trivial example, and pretend we think the old name lethal was a better name for the module. We can just write inside a new lethal.pm:

package lethal;

use base qw(autodie);

1;

And now, we can use lethal the same way we would use autodie.

As a more complex example, let's say that we want to do a bit of localisation. I want an Australian version of autodie that caters to our strong cultural identity. I can write inside bludging.pm:

package bludging;

use base qw(autodie);

sub throw {
   my ($class, @args) = @_;

   return bludging::exception->new(@args);
}

package bludging::exception;

use base qw(autodie::exception);

# Mate, it's always a good time for a beer in Australia!
sub time_for_a_beer {
    return "Now's a good time for a beer.";
}

sub stringify {
    my ($this) = @_;

    my $original_string = $this->SUPER::stringify;

    return "$original_string\n" . $this->time_for_a_beer;
}

1;

I can now write:

use bludging qw(open);

open(my $fh, "<", "fair_dinkum.txt");

If fair_dinkum.txt doesn't exist, I get the Australian-friendly error message:

Can't open 'fair_dinkum.txt' for reading: "No such file or directory" at australia.pl line 1
Now's a good time for a beer.

Of course, one could instead extend the exceptions to use your favourite object framework, wake your sysadmins up in the wee hours of the morning, provide extra diagnostics and stack back-traces, or do anything else you consider worthwhile.

So, what are you waiting for? Grab yourself autodie 1.11_01 from the CPAN now, or (if your mirror is a little behind) you can download the release directly from my server.

29 Jun 2008 »

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.

542 older entries...

 

pjf certified others as follows:

  • pjf certified pjf as Journeyer
  • pjf certified dancer as Journeyer
  • pjf certified Skud as Journeyer
  • pjf certified ajv as Journeyer
  • pjf certified BrentN as Apprentice
  • pjf certified mojotoad as Journeyer
  • pjf certified scottp as Apprentice
  • pjf certified rcp as Apprentice
  • pjf certified lukeh as Journeyer
  • pjf certified sw as Apprentice
  • pjf certified fozbaca as Apprentice
  • pjf certified hypatia as Apprentice
  • pjf certified jenni as Apprentice
  • pjf certified linas as Master
  • pjf certified bekj as Journeyer
  • pjf certified jennv as Journeyer
  • pjf certified benno as Journeyer
  • pjf certified aris as Apprentice
  • pjf certified cdent as Journeyer
  • pjf certified KevinL as Journeyer
  • pjf certified grib as Journeyer
  • pjf certified jmcnamara as Journeyer
  • pjf certified jpr as Journeyer
  • pjf certified hacker as Master
  • pjf certified jesse as Journeyer
  • pjf certified ask as Master

Others have certified pjf as follows:

  • dancer certified pjf as Apprentice
  • pjf certified pjf as Journeyer
  • ajv certified pjf as Journeyer
  • kelly certified pjf as Journeyer
  • BrentN certified pjf as Journeyer
  • taral certified pjf as Journeyer
  • mojotoad certified pjf as Journeyer
  • egad certified pjf as Journeyer
  • scottp certified pjf as Journeyer
  • lukeh certified pjf as Apprentice
  • rcp certified pjf as Apprentice
  • jenni certified pjf as Journeyer
  • jbowman certified pjf as Journeyer
  • mvw certified pjf as Journeyer
  • sjmurdoch certified pjf as Journeyer
  • KevinL certified pjf as Journeyer
  • dneighbors certified pjf as Journeyer
  • benno certified pjf as Journeyer
  • hub certified pjf as Journeyer
  • async certified pjf as Journeyer
  • linas certified pjf as Journeyer
  • jmcnamara certified pjf as Journeyer
  • grib certified pjf as Journeyer
  • Ilan certified pjf as Journeyer
  • fxn certified pjf as Journeyer
  • hacker certified pjf as Journeyer
  • wardv certified pjf as Journeyer
  • helcio certified pjf as Journeyer
  • watete certified pjf as Journeyer
  • ebf certified pjf as Journeyer
  • lerdsuwa certified pjf as Apprentice
  • e8johan certified pjf as Journeyer
  • Apeterson certified pjf as Journeyer
  • avriettea certified pjf as Journeyer

[ Certification disabled because you're not logged in. ]

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page