<?xml version="1.0"?>
<rss version="2.0.">
  <channel>
    <title>Advogato blog for pjf</title>
    <link>http://www.advogato.org/person/pjf/</link>
    <description>Advogato blog for pjf</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Fri, 25 Jul 2008 12:18:43 GMT</pubDate>
    <item>
      <pubDate>Mon, 21 Jul 2008 09:44:28 GMT</pubDate>
      <title>21 Jul 2008</title>
      <link>http://www.advogato.org/person/pjf/diary.html?start=546</link>
      <guid>http://www.advogato.org/person/pjf/diary.html?start=546</guid>
      <description>&lt;p&gt;&lt;b&gt;autodie 1.99 &lt;i&gt;stable&lt;/i&gt; released - codename jarich&lt;/b&gt;&lt;br&gt;
I said that I'd get a stable release of &lt;a href="http://search.cpan.org/perldoc?autodie" &gt;autodie&lt;/a&gt; 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.
&lt;p&gt;
After 243 commits since project inception, and three and a half months of work, the first &lt;i&gt;stable&lt;/i&gt; 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 &lt;i&gt;dh-make-perl&lt;/i&gt;, or whatever other tools you prefer to use to manage your modules.
&lt;p&gt;
The observant reader will notice this is a 1.99 release, but I've occasionally bandied around the phrase &lt;i&gt;"autodie - It's Fatal 2.0"&lt;/i&gt;.  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.
&lt;p&gt;
That's not to say the 1.99 release isn't good.  It's awesome.  autodie has already gone through &lt;i&gt;eight&lt;/i&gt; dev releases, as well as being used on my own systems.  Go and use it.
&lt;p&gt;
Note that autodie &lt;i&gt;does&lt;/i&gt; overpower (and on some systems, overwrite) the version of &lt;tt&gt;Fatal.pm&lt;/tt&gt; that comes with Perl.  Some of the &lt;i&gt;internal&lt;/i&gt; interfaces of &lt;tt&gt;Fatal&lt;/tt&gt; have changed to support new functionality.  If you've been calling &lt;i&gt;internal&lt;/i&gt; Fatal subroutines (ie, things &lt;i&gt;not&lt;/i&gt; documented in &lt;tt&gt;perldoc Fatal&lt;/tt&gt;), then you may wish to hold off until the 2.00 release.
&lt;p&gt;
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.
&lt;p&gt;
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.
</description>
    </item>
    <item>
      <pubDate>Fri, 18 Jul 2008 16:57:29 GMT</pubDate>
      <title>18 Jul 2008</title>
      <link>http://www.advogato.org/person/pjf/diary.html?start=545</link>
      <guid>http://www.advogato.org/person/pjf/diary.html?start=545</guid>
      <description>&lt;p&gt;&lt;b&gt;Journey to OSCON / Module releases&lt;/b&gt;&lt;br&gt;
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 &lt;i&gt;now&lt;/i&gt; and sleeping on the plane is going to be better than being awake during the plane and whacked in Portland.
&lt;p&gt;
At least, that's the plan.
&lt;p&gt;
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.
&lt;p&gt;
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 &lt;a href="http://search.cpan.org/perldoc?IPC::System::Simple" &gt;IPC::System::Simple&lt;/a&gt;.  It now has &lt;tt&gt;capturex()&lt;/tt&gt; and &lt;tt&gt;systemx()&lt;/tt&gt;, which are variants of &lt;tt&gt;capture()&lt;/tt&gt; and &lt;tt&gt;system()&lt;/tt&gt; that never ever ever use the shell, even if you use one argument.  Thanks to ikegami for encouraging me to implement this.
&lt;p&gt;
In order to make sure my &lt;a href="http://en.oreilly.com/oscon2008/public/schedule/detail/3049" &gt;Perl Security&lt;/a&gt; tutorial matches reality, there's also a new release of &lt;a href="http://search.cpan.org/perldoc?Proc::UID" &gt;Proc::UID&lt;/a&gt; making its way to the CPAN.  It's mainly a tidy-up of the old code, with better documentation, tests, and build system.
&lt;p&gt;
What I haven't got out yet is &lt;i&gt;the&lt;/i&gt; stable release of &lt;a href="http://search.cpan.org/perldoc?autodie" &gt;autodie&lt;/a&gt;.  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.
&lt;p&gt;
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.
</description>
    </item>
    <item>
      <pubDate>Mon, 14 Jul 2008 02:50:59 GMT</pubDate>
      <title>14 Jul 2008</title>
      <link>http://www.advogato.org/person/pjf/diary.html?start=544</link>
      <guid>http://www.advogato.org/person/pjf/diary.html?start=544</guid>
      <description>&lt;p&gt;&lt;b&gt;See me talk at OSCON 2008&lt;/b&gt;&lt;br&gt;
Next week is &lt;a href="http://en.oreilly.com/oscon2008/" &gt;OSCON 2008&lt;/a&gt;, 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:

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://en.oreilly.com/oscon2008/public/schedule/detail/3049" &gt;Perl Security&lt;/a&gt;, 1:30pm - 5:00pm, Monday 21st July.
&lt;li&gt;&lt;a href="http://en.oreilly.com/oscon2008/public/schedule/detail/3072" &gt;An Illustrated History of Failure&lt;/a&gt;, 5:20pm - 6:05pm, Wednesday 23rd July.
&lt;li&gt;&lt;a href="http://en.oreilly.com/oscon2008/public/schedule/detail/3170" &gt;General lightning talks&lt;/a&gt;, 1:45pm-2:30pm, Thursday 24th July.
&lt;li&gt;&lt;a href="http://en.oreilly.com/oscon2008/public/schedule/detail/3107" &gt;Hacking Wetware for Fun and Profit&lt;/a&gt; (aka "Human Interfaces for Geeks"), 2:35pm-3:20pm, Thursday 24th July.
&lt;li&gt;&lt;a href="http://en.oreilly.com/oscon2008/public/schedule/detail/2501" &gt;Perl lightning talks&lt;/a&gt;, 4:30pm-5:15pm, Thursday 24th July.
&lt;/ul&gt;
&lt;p&gt;
Of course the lightning talks will have other people presenting as well, and should be &lt;i&gt;heaps&lt;/i&gt; of fun.  Anthony Baxter runs the &lt;a href="http//www.osdc.com.au/" &gt;OSDC&lt;/a&gt; lightning talks, and is also running the general lightning talks at OSCON.  OSDC has the best lightning talks ever.
&lt;p&gt;
On the topic of &lt;a href="http://www.osdc.com.au/" &gt;OSDC&lt;/a&gt;, 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!
</description>
    </item>
    <item>
      <pubDate>Fri, 4 Jul 2008 03:54:49 GMT</pubDate>
      <title>4 Jul 2008</title>
      <link>http://www.advogato.org/person/pjf/diary.html?start=543</link>
      <guid>http://www.advogato.org/person/pjf/diary.html?start=543</guid>
      <description>&lt;p&gt;&lt;b&gt;autodie 1.11_01 "Aristotle" released - Awesome inheritance&lt;/b&gt;&lt;br&gt;
&lt;tt&gt;autodie&lt;/tt&gt; version 1.11_01, codename "Aristotle", is now making its way &lt;a href="http://search.cpan.org/perldoc?autodie" &gt;through the CPAN&lt;/a&gt;.  The new version contains quite a few exciting &lt;a href="http://github.com/pfenwick/autodie/tree/master/Changes" &gt;changes&lt;/a&gt;.  You should be able to make and install the new version just like any other module, without having to muck around with &lt;tt&gt;@INC&lt;/tt&gt;.  Do be warned it will overpower your existing &lt;tt&gt;Fatal.pm&lt;/tt&gt;, and while it should be completely backwards compatible, there's always the small risk of bugs that I've missed.
&lt;p&gt;
In this post, I want to show you why &lt;tt&gt;autodie&lt;/tt&gt; is so cool, particularly with this new release.
&lt;p&gt;
Because &lt;tt&gt;autodie&lt;/tt&gt; is smarter than &lt;tt&gt;Fatal&lt;/tt&gt;, a whole bunch of things which are normally bugs start being correct if you're using &lt;tt&gt;autodie&lt;/tt&gt;.  As an example, take the following code:
&lt;pre&gt;
if ( fork() ) {
   # This is the parent process.
} else {
   # This is the child process.
}
&lt;/pre&gt;&lt;p&gt;
Normally, that code involving &lt;tt&gt;fork&lt;/tt&gt; contains a bug, because &lt;tt&gt;fork&lt;/tt&gt; could return an &lt;i&gt;undefined&lt;/i&gt; 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.
&lt;p&gt;
However, with &lt;tt&gt;autodie&lt;/tt&gt; we can write:
&lt;pre&gt;
use autodie qw(fork);

if ( fork() ) {
   # This is the parent process.
} else {
   # This is the child process.
}
&lt;/pre&gt;&lt;p&gt;
And now the code is correct!  &lt;tt&gt;autodie&lt;/tt&gt; knows that &lt;tt&gt;fork&lt;/tt&gt; is allowed to return zero to the child, but returning undef is an error.  This is &lt;i&gt;much&lt;/i&gt; easier than checking the return values manually.
&lt;p&gt;
However in my opinion the best thing about the new release is that we can now cleanly subclass both &lt;tt&gt;autodie&lt;/tt&gt; and &lt;tt&gt;autodie::exception&lt;/tt&gt;, which means we now have a very easy way to slot in our own exceptions frameworks.
&lt;p&gt;
Let's start with a trivial example, and pretend we think the old name &lt;tt&gt;lethal&lt;/tt&gt; was a better name for the module.  We can just write inside a new &lt;tt&gt;lethal.pm&lt;/tt&gt;:
&lt;pre&gt;
package lethal;

use base qw(autodie);

1;
&lt;/pre&gt;&lt;p&gt;
And now, we can &lt;tt&gt;use lethal&lt;/tt&gt; the same way we would &lt;tt&gt;use autodie&lt;/tt&gt;.
&lt;p&gt;
As a more complex example, let's say that we want to do a bit of localisation.  I want an Australian version of &lt;tt&gt;autodie&lt;/tt&gt; that caters to our strong cultural identity.  I can write inside &lt;tt&gt;bludging.pm&lt;/tt&gt;:
&lt;pre&gt;
package bludging;

use base qw(autodie);

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

   return bludging::exception-&amp;gt;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-&amp;gt;SUPER::stringify;

    return "$original_string\n" . $this-&amp;gt;time_for_a_beer;
}

1;
&lt;/pre&gt;&lt;p&gt;
I can now write:
&lt;pre&gt;
use bludging qw(open);

open(my $fh, "&amp;lt;", "fair_dinkum.txt");
&lt;/pre&gt;&lt;p&gt;
If &lt;tt&gt;fair_dinkum.txt&lt;/tt&gt; doesn't exist, I get the Australian-friendly error message:
&lt;pre&gt;
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.
&lt;/pre&gt;&lt;p&gt;
Of course, one could instead extend the exceptions to &lt;a href="http://moose.perl.org/" &gt;use your favourite object framework&lt;/a&gt;, 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.
&lt;p&gt;
So, what are you waiting for?  Grab yourself &lt;tt&gt;autodie&lt;/tt&gt; 1.11_01 from &lt;a href="http://search.cpan.org/perldoc?autodie" &gt;the CPAN&lt;/a&gt; now, or (if your mirror is a little behind) you can &lt;a href="http://perltraining.com.au/~pjf/autodie/autodie-1.11_01.tar.gz" &gt;download the release directly from my server&lt;/a&gt;.
</description>
    </item>
    <item>
      <pubDate>Sun, 29 Jun 2008 07:08:56 GMT</pubDate>
      <title>29 Jun 2008</title>
      <link>http://www.advogato.org/person/pjf/diary.html?start=542</link>
      <guid>http://www.advogato.org/person/pjf/diary.html?start=542</guid>
      <description>&lt;p&gt;&lt;b&gt;autodie release 1.10_07 - Codename ikegami&lt;/b&gt;&lt;br&gt;
&lt;i&gt;Don't know what autodie is?  Check out &lt;a href="http://pjf.id.au/blog/?position=540" &gt;the 5 minute video&lt;/a&gt; and find out.&lt;/i&gt;
&lt;p&gt;
It's Sunday, and that means &lt;a href="http://search.cpan.org/perldoc?autodie" &gt;autodie&lt;/a&gt; release day!  The new version of &lt;tt&gt;autodie&lt;/tt&gt; is codenamed "ikegami" in honour of the wonderful perlmonk who assisted me in solving one of the &lt;a href="http://perlmonks.org/?node_id=693338" &gt;trickiest problems&lt;/a&gt; in getting &lt;tt&gt;autodie&lt;/tt&gt; running under its new architecture.
&lt;p&gt;
In fact, the architecture is the big change for this release.  In older versions of &lt;tt&gt;autodie&lt;/tt&gt;, 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.
&lt;p&gt;
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 &lt;a href="http://en.wikipedia.org/wiki/Technical_debt" &gt;technical debt&lt;/a&gt; I've been accumulating in the project.
&lt;p&gt;
There's also been the regular swag of bugfixes, improvements and tests. You can check out the &lt;a href="http://github.com/pfenwick/autodie/tree/master/Changes" &gt;changes file&lt;/a&gt; for full information.
&lt;p&gt;
&lt;b&gt;You can help autodie!&lt;/b&gt;&lt;br&gt;
I've still got a big list of things to complete in &lt;a href="http://github.com/pfenwick/autodie/tree/master/TODO" &gt;my TODO list&lt;/a&gt;.  Some of them are large, and some of them are small.  I also need a bunch more test cases, both working and failing.
&lt;p&gt;
If you do wish to help, then feel free to grab the code from CPAN, or take a copy of &lt;a href="http://github.com/pfenwick/autodie/tree/master/" &gt;the autodie repository&lt;/a&gt; using git, and feel free to &lt;a href="mailto:pjf@cpan.org" &gt;send me patches&lt;/a&gt; or even ask for a commit bit.  I won't bite.
&lt;p&gt;
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. ;)
&lt;p&gt;
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 &lt;a href="mailto:pjf@cpan.org" &gt;pjf@cpan.org&lt;/a&gt;.
</description>
    </item>
    <item>
      <pubDate>Mon, 23 Jun 2008 12:01:53 GMT</pubDate>
      <title>23 Jun 2008</title>
      <link>http://www.advogato.org/person/pjf/diary.html?start=541</link>
      <guid>http://www.advogato.org/person/pjf/diary.html?start=541</guid>
      <description>&lt;p&gt;&lt;b&gt;Be cool and join ohloh&lt;/b&gt;&lt;br&gt;
&lt;a href="http://www.ohloh.net/" &gt;Ohloh&lt;/a&gt; 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 &lt;a href="http://www.ohloh.net/languages/compare?commit=Update&amp;l0=perl&amp;l1=ruby&amp;l2=haskell&amp;l3=-1&amp;measure=commits" &gt;compare your favourite languages&lt;/a&gt;, or &lt;a href="http://www.ohloh.net/projects/perl/analyses/latest" &gt;see how a codebase changes over time&lt;/a&gt;, or &lt;a href="http://www.ohloh.net/accounts/pjf" &gt;see how often you commit to various projects&lt;/a&gt;.  Like anything web 2.0 these days, it has ways of making friends and rating people and projects.
&lt;p&gt;
However, like most things I write about, ohloh has a serious problem.  Put simply, it has me listed as the &lt;a href="http://www.ohloh.net/languages/8" &gt;seventh highest committer in the open source world&lt;/a&gt; for projects written in Perl this quarter.
&lt;p&gt;
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 &lt;i&gt;way&lt;/i&gt; more code than I do, but they're not listed on ohloh.
&lt;p&gt;
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.
&lt;p&gt;
Before long, you'll have a massive kudos score, and you can show off to all the kids on &lt;a href="irc://irc.perl.org#moose" &gt;#moose&lt;/a&gt; about how amazing you are.  The Moose folk are really impressed by ohloh statistics; that's why so many &lt;a href="http://moose.perl.org/" &gt;Moose&lt;/a&gt; contributors are in the &lt;a href="http://www.ohloh.net/languages/8" &gt;Perl top contributors&lt;/a&gt; list.
&lt;p&gt;
And yes, &lt;a href="http://www.ohloh.net/accounts/pjf" &gt;I've already got an account&lt;/a&gt;.
</description>
    </item>
    <item>
      <pubDate>Sun, 22 Jun 2008 12:26:20 GMT</pubDate>
      <title>22 Jun 2008</title>
      <link>http://www.advogato.org/person/pjf/diary.html?start=540</link>
      <guid>http://www.advogato.org/person/pjf/diary.html?start=540</guid>
      <description>&lt;p&gt;&lt;b&gt;autodie release 1.10_06 - Codename chocolateboy&lt;/b&gt;&lt;br&gt;
I'm very pleased to say that the next release of &lt;a href="http://search.cpan.org/perldoc?autodie" &gt;autodie&lt;/a&gt; is making its way to CPAN.  The release's codename is "chocolateboy", after the wonderful author of &lt;a href="http://search.cpan.org/perldoc?autobox" &gt;autobox&lt;/a&gt; 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.
&lt;p&gt;
The new version provides massive improvements in Perl 5.8 support, including:

&lt;ul&gt;
&lt;li&gt;User subroutines can be lexicalised
&lt;li&gt;Fatal and autodie can be used together
&lt;li&gt;Fatal backwards compatibility mode fixed
&lt;li&gt;autodie will no longer cause weird interactions with autobox
&lt;li&gt;Better error messages
&lt;li&gt;Lower memory overheads
&lt;li&gt;Faster loading
&lt;/ul&gt;
&lt;p&gt;
I've still got a huge list of things left to do, but this release is a major stepping stone since it contains code that can lexicalise arbitrary subroutines, with many thanks to &lt;a href="http://perlmonks.org/?node_id=693338" &gt;ikegami for help in debugging&lt;/a&gt;.
&lt;p&gt;
My next big tasks are:
&lt;ul&gt;
&lt;li&gt;Moving the Perl 5.10 implementation to use the Perl 5.8 code, which is actually faster and has less side-effects.
&lt;li&gt;Writing a whole stack of documentation on how to use it, why you'd want to, and what bugs exist.
&lt;li&gt;Having a really good think about the &lt;a href="http://search.cpan.org/perldoc?autodie::exception" &gt;autodie::exception&lt;/a&gt; interface.  I'm planning to bounce ideas off the &lt;a href="http://moose.perl.org/" &gt;Moose&lt;/a&gt; crowd for this one.
&lt;/ul&gt;
&lt;p&gt;
If you're interested in learning more about the project, you can read &lt;a href="http://pjf.id.au/blog/toc.html?tag=autodie" &gt;my previous blog posts&lt;/a&gt;, or track the project &lt;a href="http://github.com/pfenwick/autodie/tree/master" &gt;on github&lt;/a&gt; or &lt;a href="http://www.ohloh.net/projects/autodie" &gt;ohloh&lt;/a&gt;.  I also welcome any questions, feedback, and especially patches at &lt;a href="mailto:pjf@cpan.org" &gt;pjf@cpan.org&lt;/a&gt;.
</description>
    </item>
    <item>
      <pubDate>Sun, 15 Jun 2008 11:48:08 GMT</pubDate>
      <title>15 Jun 2008</title>
      <link>http://www.advogato.org/person/pjf/diary.html?start=539</link>
      <guid>http://www.advogato.org/person/pjf/diary.html?start=539</guid>
      <description>&lt;p&gt;&lt;b&gt;autodie works under Perl 5.8&lt;/b&gt;&lt;br&gt;
After applying a very different paradigm to the code, I have &lt;a href="http://search.cpan.org/perldoc?autodie" &gt;autodie working under Perl 5.8&lt;/a&gt;!  For anyone who's missed my &lt;a href="http://pjf.id.au/blog/toc.html?tag=autodie" &gt;earlier posts&lt;/a&gt; on the subject, autodie allows Perl's built-ins (and your own code, if you like) to 'succeed-or-die' with &lt;i&gt;lexical scope&lt;/i&gt;.  This means you can write code like this:

&lt;pre&gt;

if ($filename) {
    use autodie;  # Turns on all common built-ins by default.

    open(my $fh, '&amp;lt;', $filename);  # This opens or dies

    # Do things with my file.

    close($fh);                    # This closes or dies
}

# This open merely returns false on failure.
open(my $fh2, '&amp;lt;', $file2);

&lt;/pre&gt;
&lt;p&gt;
It gets even better, because unlike the old Fatal.pm, autodie also allows you to enable succeed-or-die semantics with &lt;tt&gt;system()&lt;/tt&gt;, by hooking into &lt;a href="http://search.cpan.org/perldoc?IPC::System::Simple" &gt;IPC::System::Simple&lt;/a&gt; under the hood:

&lt;pre&gt;

eval {
    use autodie qw(system);

    # Perform the commands below in order, but
    # if any fails, we automatically skip to
    # the end of the 'eval' block.

    system($mount_tape);
    system($check_tape_label);
    system($backup_files);
    system($unmount_tape);
    system($delete_old_files);
};

if (my $error = $@) {
    # Something went wrong.  Recover/handle it here.

    system($unmount_tape);  # autodie not in effect, this fails silently.

    wake_sysadmin_from_slumber();

    # $error / $@ stringifies into a helpful error message.  What
    # command failed, which script, which line, what did it return,
    # what signal name/number killed it, etc.

    die "Backup failed - $error";

}
&lt;/pre&gt;
&lt;p&gt;
If an autodying built-in fails, it doesn't just die with an ugly error (like Fatal does), it throws a &lt;a href="http://search.cpan.org/perldoc?autodie::exception" &gt;well-formed exception object&lt;/a&gt;.  You can catch that, inspect it to discover where the error occurred, what called the code that caused the error, what the arguments were, and almost all the things you'd want to discover during exception handling.  If you use it as a string, it becomes a helpful error, which can depend upon the function that threw the exception.  You can even register your own message handlers, making localisation easier.
&lt;p&gt;
Of course, the code isn't complete, I've got a big &lt;a href="http://github.com/pfenwick/autodie/tree/master/TODO" &gt;TODO list&lt;/a&gt; that's far from complete, but the &lt;i&gt;hardest&lt;/i&gt; part of getting it working under 5.8 is done.
&lt;p&gt;
You can grab the latest version of autodie &lt;a href="http://search.cpan.org/perldoc?autodie" &gt;from the CPAN&lt;/a&gt;.  I'd also like to say a special thank-you to &lt;a href="http://github.com/pfenwick/autodie/tree/master/AUTHORS" &gt;all the people who have contributed so far&lt;/a&gt;, especially to Matt Trout for pointing me at &lt;a href="http://search.cpan.org/perldoc?namespace::clean" &gt;namespace::clean&lt;/a&gt;, and Robert 'phaylon' Sedlacek for writing it; the heart of namespace::clean was twisted to my dark will to make autodie work under Perl 5.8.
&lt;p&gt;
If you want to play with the bleeding edge code, you can &lt;a href="http://github.com/pfenwick/autodie/tree/master" &gt;grab the code from git&lt;/a&gt; (or use the download button on that page for a tarball); let me know if you'd like a commit-bit.  If you have bugs, comments, suggestions, praise or encouragement, feel free to &lt;a href="mailto:pjf@cpan.org" &gt;e-mail me&lt;/a&gt; until the &lt;a href="http://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie" &gt;autodie bugtracker&lt;/a&gt; finds its feet.
</description>
    </item>
    <item>
      <pubDate>Thu, 12 Jun 2008 07:55:26 GMT</pubDate>
      <title>12 Jun 2008</title>
      <link>http://www.advogato.org/person/pjf/diary.html?start=538</link>
      <guid>http://www.advogato.org/person/pjf/diary.html?start=538</guid>
      <description>&lt;p&gt;
&lt;b&gt;autodie 1.10 beta released - It's Fatal 2.0!&lt;/b&gt;&lt;br&gt;
After much hacking, I'm very glad to say that I've got a version of Fatal/autodie that I'm willing to foist upon the world for beta testing. It's not a release candidate, but all the important things that should work, do work (I hope).
&lt;p&gt;
For those who haven't seen my previous discussions, you can think of autodie as a Fatal 2.0.  It provides lexical scope, exception objects, and much nicer error messages.  It even lets you make system() fatal[1].
&lt;p&gt;
You can find the distribution at:
&lt;blockquote&gt;
    &lt;a href="http://perltraining.com.au/~pjf/autodie/" &gt;http://perltraining.com.au/~pjf/autodie/&lt;/a&gt;
&lt;/blockquote&gt;&lt;p&gt;
It's currently not on the CPAN because I don't want innocent bystanders replacing their Fatal.pm by accident.
&lt;p&gt;
Currently it only works on Perl 5.10 and above.  Support for 5.8 is on my &lt;a href="http://github.com/pfenwick/autodie/tree/master/TODO " &gt;TODO list&lt;/a&gt;.
&lt;p&gt;
I'm specifically after feedback on the following points:
&lt;ul&gt;
&lt;li&gt;Do any tests fail on your system?
&lt;li&gt;If you use the new Fatal.pm module, does any of your existing code break?  (It should be 100% backwards compatible.)
&lt;li&gt;If you s/Fatal/autodie/; in your code, does it do what you expect?  Are the error messages nicer?  Are there any gotchas I've missed?
&lt;/ul&gt;&lt;p&gt;
If you really want to get your hands dirty, feel free to look at the &lt;a href="http://github.com/pfenwick/autodie/tree/master/TODO" &gt;TODO file&lt;/a&gt;, the &lt;a href="http://github.com/pfenwick/autodie/tree/master/DESIGN.pod" &gt;DESIGN.pod&lt;/a&gt; file, or the source code in general.  Suggestions and patches are very much appreciated.  If you've got a github account, I'm happy to give you commit access, or you can just fork the repository.
&lt;p&gt;
If you want to see my five minute talk about what this is about, see &lt;a href="http://pjf.id.au/blog/?position=540" &gt;the video in my blog&lt;/a&gt;.
&lt;p&gt;
If you want to track my repository of changes, you can find them at:
&lt;blockquote&gt;
    &lt;a href="http://github.com/pfenwick/autodie/tree/master" &gt;http://github.com/pfenwick/autodie/tree/master&lt;/a&gt;
&lt;/blockquote&gt;&lt;p&gt;
I also want to say a special thank-you to Aristotle, who has provided invaluable feedback while I've been working on the project.
&lt;p&gt;
Any questions, feedback, criticisms, patches, or ideas are welcome.
&lt;p&gt;
Many thanks,
&lt;blockquote&gt;
    Paul
&lt;/blockquote&gt;
&lt;p&gt;
[1] To fatalise system() you'll also need to install &lt;a href="http://search.cpan.org/perldoc?IPC::System::Simple" &gt;IPC::System::Simple&lt;/a&gt;.
</description>
    </item>
    <item>
      <pubDate>Wed, 11 Jun 2008 04:24:46 GMT</pubDate>
      <title>11 Jun 2008</title>
      <link>http://www.advogato.org/person/pjf/diary.html?start=537</link>
      <guid>http://www.advogato.org/person/pjf/diary.html?start=537</guid>
      <description>&lt;p&gt;
&lt;tt&gt;brian d foy&lt;/tt&gt; asked in &lt;a href="http://use.perl.org/~brian_d_foy/journal/36646" &gt;his use.perl blog&lt;/a&gt;:

&lt;blockquote&gt;&lt;i&gt;I haven't had time to figure out how to put the slides and audio together in one package. Has anyone done that before?&lt;/i&gt;&lt;/blockquote&gt;
&lt;p&gt;
&lt;a href="http://pjf.id.au/blog/?position=520" &gt;That&lt;/a&gt; &lt;a href="http://pjf.id.au/blog/?position=525" &gt;would&lt;/a&gt; &lt;a href="http://sweeperbot.org/" &gt;be&lt;/a&gt; &lt;a href="http://pjf.id.au/blog/?position=540" &gt;me&lt;/a&gt;.
&lt;p&gt;
I've even had &lt;a href="http://pjf.id.au/blog/?position=523" &gt;a good rant&lt;/a&gt; about how hard it is.
&lt;p&gt;
&lt;b&gt;Slideshare&lt;/b&gt;&lt;br&gt;
Put simply, if you're using slideshare, &lt;i&gt;and&lt;/i&gt; your talk is short, &lt;i&gt;and&lt;/i&gt; you move through your slides relatively slowly, &lt;i&gt;and&lt;/i&gt; you have somewhere to host the audio, then using slideshare's "slidecasting" options is fine.  I've got an example with one of my own &lt;a href="http://www.slideshare.net/pjf/effective-procrastination-with-hiveminder" &gt;talks on hiveminder&lt;/a&gt;.
&lt;p&gt;
If &lt;i&gt;any&lt;/i&gt; of those conditions aren't true, then unless SlideShare's slidecasting software has become significantly better, avoid them.  SlideShare is particularly bad if you have lots of fast slide transitions, because it only tries to cache "one frame ahead", and depending upon network conditions whoever is watching your slidecast may hit that frame before it's fully loaded, in which case it just gets dropped.  I only really consider SlideShare suitable for death-by-powerpoint.
&lt;p&gt;
&lt;b&gt;YouTube&lt;/b&gt;&lt;br&gt;
These days I do videos, and upload them to &lt;a href="http://www.youtube.com/user/pjfenwick" &gt;youtube&lt;/a&gt;.  The resolution sucks, and there's a 10 minute time limit, but &lt;i&gt;everyone&lt;/i&gt; knows how it works, and it doesn't drop frames.
&lt;p&gt;
If you've gone to the effort of putting together a decent movie for youtube, then you can always place the full-resolution copy somewhere for people who care.
&lt;p&gt;
&lt;b&gt;Video Production&lt;/b&gt;&lt;br&gt;
So, how do you put together the video?  For me, it's usually three steps:
&lt;p&gt;
&lt;i&gt;1. Record the audio.&lt;/i&gt;  If you've done this at a life presentation, great, having a real audience laugh at your jokes is fantastic.  If not, then sit down with a mike and your slides, and pretend you have an audience.  Give yourself a few seconds of complete silence at the start, you'll thank yourself when it comes to doing noise-removal later on.
&lt;p&gt;
If you flub while doing the recording, that's fine.  Wait to get a few seconds of silence, then count back in with a "one, two, three".  This makes it easy to see the flub when editing the soundtrack.
&lt;p&gt;
For sound editing, I recommend using &lt;a href="http://audacity.sourceforge.net/" &gt;audacity&lt;/a&gt;.  It's free, open source, cross platform, and totally awesome.  Edit out your flubs and any other sounds you don't want in your final cut.  Do a noise removal and a normalisation on the whole soundtrack if it needs it.
&lt;p&gt;
&lt;i&gt;2. Dump the slides as images.&lt;/i&gt;  This can be really frustrating.  I use &lt;a href="http://www.openoffice.org/" &gt;OpenOffice.org&lt;/a&gt; (OOo), which has an "export as png/jpg/etc" feature.  However it only exports the &lt;i&gt;current&lt;/i&gt; slide, and my talks usually have hundreds.  There are some OOo macros about that apparently do the job for you, but I haven't tried them.  I don't know why "Export entire document as png/jpg/etc" isn't built into the software.
&lt;p&gt;
Instead of using OOo's image export, I use OOo's "Export as PDF" function.  It works really well.  I then convert the PDF into images, since there are lots of PDF-&amp;gt;image converters out there.  I personally use ghostscript for this job.  Make sure all your images sort correctly in &lt;i&gt;asciibetical&lt;/i&gt; order; so the images should be called &lt;tt&gt;slide-001.png&lt;/tt&gt;, &lt;tt&gt;slide-002.png&lt;/tt&gt;.  If you just call your images &lt;tt&gt;slide-1.png&lt;/tt&gt; and &lt;tt&gt;slide-2.png&lt;/tt&gt; you'll hit sorting issues once you get to ten slides or more.
&lt;p&gt;
&lt;i&gt;3. Make the movie.&lt;/i&gt;  If you have decent movie-making software, this should be a matter of importing the slides, importing the audio, and moving the slides back and forth until they match the timing you want.  This can take a lot of time if you have a lot of slides, audio, or both.
&lt;p&gt;
&lt;b&gt;Production Software&lt;/b&gt;&lt;br&gt;
If you're using a Mac, you probably have some awesome video editing software installed which does the job for you; Macs seem to be good at that.  If you're using Linux, there seems to be a huge number of FOSS video editing solutions with great reviews.
&lt;p&gt;
If you're using Windows, then &lt;i&gt;don't&lt;/i&gt; use &lt;i&gt;Windows Movie Maker&lt;/i&gt;.  You'll get about half way through your editing process, and it will die horribly.  Really, it's awful.
&lt;p&gt;
I use &lt;i&gt;CyberLink Power Director&lt;/i&gt;, because it came bundled with a camera I purchased a while ago.  It's more suited to taking the video of your child riding a bike, adding some music and titles and burning onto DVD, but it does an &lt;i&gt;okay&lt;/i&gt; job with talks production.
&lt;p&gt;
The export features on Power Director are &lt;i&gt;awful&lt;/i&gt;, they all produce massively huge files (because that's what DVDs want), or crappy resolution files (designed for mobile devices), or produce audio artefacts when encoding(!), or want to use a widescreen aspect ratio (because you'll be playing your DVDs on your TV), or run incredibly slowly.  With enough screwing around I found I could get it to use the xVid encoders which I probably installed from the &lt;a href="http://www.cccp-project.net/" &gt;Combined Community Codec Pack&lt;/a&gt;, which are fast and awesome and let me specify exactly what I want.
&lt;p&gt;
&lt;b&gt;Now what?&lt;/b&gt;&lt;br&gt;
Once your talk is exported, upload it to youtube, and publicise it.  I recommend embedding it into one of your own pages, and then at the very least submitting &lt;i&gt;that&lt;/i&gt; page to digg and stumbleupon.  I recommend this over publicising the youtube page directly because it gives you more control over your content.  It's &lt;i&gt;much&lt;/i&gt; easier to provide a link to your other presentations, a download link, a list of further resources, or anything else when you control the page your viewers will be going to.
&lt;p&gt;
And that ends my not very brief write-up on how to put a talk on-line.  If you want to see some that I've done myself, you can find an index on &lt;a href="http://pjf.id.au/talks/" &gt;my talks page&lt;/a&gt;.  My most popular so far (with over 100,000 views) has been &lt;a href="http://pjf.id.au/blog/?position=525" &gt;fixing the web with greasemonkey&lt;/a&gt;.
</description>
    </item>
  </channel>
</rss>
