NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
use fatal 'print'; ? (Score:1)
Wow! That's a surprise to me, and I certainly don't check the return value of print in my own code. I guess an easy way to bundle this up would be to make print fatal in a block that prints to file handles, and trap with eval? Are there other (better) ways to handle this?
osfameron
Re:use fatal 'print'; ? (Score:1)
perl -e'use Fatal qw(print);'
Cannot make a non-overridable builtin fatal at
Another thing worth remembering is print doesn't seem to return failure every time it fails. I think it returns success if you print to a file in a full filesystem ( or did when I checked on linux and hp a year or so ago ).
Re:use fatal 'print'; ? (Score:1)
Fortunately, I also patched to check that -s $file >= length $message.
rjbs
Reply to This
Parent
Re:use fatal 'print'; ? (Score:2)
Re:use fatal 'print'; ? (Score:1)
rjbs