in reply to (tye)Re: Stringing method calls
in thread Stringing method calls

For the second problem I would just write a small function:
sub error_out { defined(wantarray()) ? shift : croak("Untrapped error '$_[0]'"); }
and then in your module generously use code like:
return error_out($failure) if $failure;

Replies are listed 'Best First'.
(tye)Re2: Stringing method calls
by tye (Sage) on Oct 11, 2001 at 01:28 UTC

    No kidding; that part isn't hard. I only mentioned it because I want to combine the two features and the obvious method you show above doesn't help in that case.

            - tye (but my friends call me "Tye")