in reply to Re^3: Initial Devel::UncheckedOps, a macro for perl
in thread Initial Devel::UncheckedOps, a macro for perl

What does it matter which filehandle is being written to if an error is throw? I don't follow why you care whether the handle is named STDIN or is default.
  • Comment on Re^4: Initial Devel::UncheckedOps, a macro for perl

Replies are listed 'Best First'.
Re^5: Initial Devel::UncheckedOps, a macro for perl
by Mr. Muskrat (Canon) on Jun 19, 2004 at 05:01 UTC
    Because not being able to write to STDOUT usually means that there is something more serious than a script error. Right? Or has my brain gone soft this week of vacation?

      I think you were thinking of throwing errors on STDOUT not being a valid handle. If someone had closed it before or something. This generalizes the error checking to any error including such favorites as ENOSPC. It'll still throw errors if the handle being written to isn't valid. Heck, this is how I did most of my testing - checking against a print to an invalid handle. It was too inconvenient to keep a full file system around just for testing.

      print BAR "Hi!" or die $!; # Bad file descriptor at ...