Célestin Matte <[email protected]> writes:
> So using autodie may not be a good idea.
> But the problem is that in the current state, open() return values are
> checked, but print ones are not, although it should be.
I tried "man autodie" and tried to spot 'print' in the categories
list that shows things like ":all covers :default which in turn
covers :io which in turn covers read, seek, ..." and didn't see any.
Running the attached as
$ perl ad.perl >&-
gave me "Hi" (i.e. no failure from print) but of course killed a
failing syswrite().
So I am not sure your "we must check print" matches well with use of
autodie, either.
-- >8 --
#!/usr/bin/perl -w
use warnings;
use autodie;
for (my $i = 0; $i < 256; $i++) {
print "Did this die?\n";
}
print STDERR "Hi\n";
for (my $i = 0; $i < 256; $i++) {
syswrite(1, "Did this die?\n");
}
print STDERR "Lo\n";
exit(0);
--- 8< --
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html