in reply to Re^6: chaining method calls (perl/DWIM)
in thread chaining method calls

If the last method in the chain returns an interesting value, then that method wouldn't return an error object on failure.

I guess even if you need to return false values, you can still do

if( ! eval { $count = $obj->GetCount(); 1 } ) { # Can determine count }
so Perl makes it pretty easy to turn exceptions into Booleans. My real-life "more painful" example was in C++ (I don't see many thrown exceptions in Perl).

But every time I start down the road of throwing exceptions in Perl, I run into a lack of standardization and don't manage to pick an exception module to use. So I don't have a good excuse.

                - tye