Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Testers needed: autodie 1.10 beta released - It's Fatal 2.0!

by pjf (Curate)
on Jun 12, 2008 at 07:48 UTC ( #691606=perlmeditation: print w/replies, xml ) Need Help??

Update: The code is now on CPAN as a developer release.

G'day Everyone,

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

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].

You can find the distribution on the CPAN. Currently it only works on Perl 5.10 and above. Support for 5.8 is on my TODO list.

I'm specifically after feedback on the following points:

  • Do any tests fail on your system?
  • If you use the new module, does any of your existing code break? (It should be 100% backwards compatible.)
  • 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?

If you really want to get your hands dirty, feel free to look at the TODO file, the DESIGN.pod 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.

If you want to see my five minute talk about what this is about, see the video in my blog.

If you want to track my repository of changes, you can find them at:

I also want to say a special thank-you to Aristotle, who has provided invaluable feedback while I've been working on the project.

Any questions, feedback, criticisms, patches, or ideas are welcome.

Many thanks,


[1] To fatalise system() you'll also need to install IPC::System::Simple.

  • Comment on Testers needed: autodie 1.10 beta released - It's Fatal 2.0!

Replies are listed 'Best First'.
Re: Testers needed: autodie 1.10 beta released - It's Fatal 2.0!
by bingos (Vicar) on Jun 12, 2008 at 09:16 UTC

    If you upload a developer release to CPAN, it'll get tested by the CPAN Testers, but not be indexed, so 'normal' users will not inadverently install it.

      Aha! I had seen those developer releases, but never actually released how to mark them as such. I was hoping it was using the special underscore, but given this replaces a core module, I wanted to be very sure.

      Thanks for the advice, BinGOs, and also for the many many tests you've done on all my other modules.

      Developer release going to CPAN right now.

Re: Testers needed: autodie 1.10 beta released - It's Fatal 2.0!
by pht (Acolyte) on Jun 24, 2008 at 10:34 UTC
    Great idea! But shrug, it doesn't even launch on my system.
    use strict; use warnings; use autodie; open my $file, ">/etc/boo"; # should die print $file "a"; close $file;
    $ perl Bareword "Fatal::LEXICAL_TAG" not allowed while "strict subs" in use a +t /usr/lib/perl5/site_perl/5.10.0/ line 14. Compilation failed in require at line 5. BEGIN failed--compilation aborted at line 5.
    Fatal is v1.05, Perl v5.10.0 built for x86_64-linux-thread-multi-ld

      Aha! My guess is this is going to be an @INC problem. autodie provides a heavily modified but backwards compatible, which will be installed into your site_perl.

      If you're using a version of Perl where site_perl is checked before your core modules, autodie should work fine. If not (and most distros are not), then autodie will try and load the core Fatal, and fail.

      I've added detecting and fixing this to my TODO list. In the meantime, you should be able to tell Perl to search your site_perl first. The following should work on any unix-like system:

      export PERL5LIB=`perldoc -l autodie | perl -pe's{[^/]*$}{};'`

      Alternatively, you can use a more traditional use lib to ensure Perl looks in your appropriate site_lib first.

      Many thanks,

        Thanks, that fixed it. One more question: autodie does not catch print failures, does it?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://691606]
Approved by Erez
Front-paged by jarich
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2017-08-16 21:44 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (275 votes). Check out past polls.