Damian Conway writes:
> Hmmmmmm. I think I may have missed Luke's point. Which was (presumably):
> what if C<$opus.write_to_file($file);> validly returns C<undef>?
> 
> In which case I think we just fall back to:
> 
>     try{$opus.write_to_file($file); CATCH {die "Couldn't write to $file: 
>     $!"}}
> 
> which is, after all, only 5 characters longer than:
> 
>     $opus.write_to_file($file) catch die "Couldn't write to $file: $!\n";
> 
> ;-)

Fair enough :-)

No, I wasn't implying that C<write_to_file> could validly return undef.  
I just failed to realize how short the "long" version was.  

But you have to admit, the latter version makes the important part of
the expression stand out, and is more natural to write (IMHO, as
always).

But it's moduleable, so I won't worry about it.

Luke

> Damian
> 
> 

Reply via email to