in reply to RFC: User subroutine hinting interface for autodie

Why not use Contextual::Return so that you control what to return based upon whether it is being used a LIST or SCALAR context?

  • Comment on Re: RFC: User subroutine hinting interface for autodie

Replies are listed 'Best First'.
Re^2: RFC: User subroutine hinting interface for autodie
by pjf (Curate) on Mar 05, 2009 at 13:11 UTC

    autodie doesn't change what a subroutine returns, it only causes subroutines to throw an exception if that subroutine would have returned in failure.

    The exception to this is autodying system, which returns the exit value, rather than $?. If the command doesn't get around to exiting (because it's killed by a signal, or failure to start), then it doesn't return, it throws an exception instead.