in reply to Re: Re: <rant>CPAN modules failing to check for write errors</rant>
in thread <rant>CPAN modules failing to check for write errors</rant>

The nuclear power plant software looks like it is written in VB, but it might be MFC. That, along with Flash and Crystal Reports. I hope you feel confident about that!

For the necessity of testing, I was thinking of the earlier example of the failover of a full nfs filesystem to a new one. That seems like a fair amount of code, and if I wrote it, I would need to test it.

For example, I was thinking about writing a little test system to see how a module such as File::Slurp handles a full filesystem. Perhaps I could write something like File::Slurp::Failover, which would do the clever nfs failover trick.

By the way, File::Slurp has some options for error handling. Perhaps it could be used as an example of a good way to handle I/O errors. Or is there a better example of a module that has good I/O error handling?

It should work perfectly the first time! - toma
  • Comment on Re: Re: Re: <rant>CPAN modules failing to check for write errors</rant>

Replies are listed 'Best First'.
Re: Re: Re: Re: <rant>CPAN modules failing to check for write errors</rant>
by Anonymous Monk on May 31, 2004 at 10:44 UTC
    The nuclear power plant software looks like it is written in VB, but it might be MFC. That, along with Flash and Crystal Reports. I hope you feel confident about that!

    BOOM !!!!!!!!!!!!!!!!!

    For the necessity of testing, I was thinking of the earlier example of the failover of a full nfs filesystem to a new one. That seems like a fair amount of code, and if I wrote it, I would need to test it.

    Ah yes - I see what you mean. For really critical things I can't see any way round it - generally I assume that any failure from a print is serious enough to switch fs and log whatever was in $!. As you say, it's vitally important that the error handling code does get run before it goes live :)

    Thanks for the info on File::Slurp - I'll have to check it out. No doubt there are modules with good I/O handling on CPAN but I couldnt tell you off hand - another thing to add to my todo list :)

    So I'm going to go off, do a bit more research, and hopefully come back to the monastery with an article and maybe some code for review. Give me a few days and I'll be back :)