On Tue, Jul 23, 2013 at 2:32 PM, David Golden <xdg@xdg.me> wrote: > I would recommend using $@ for familiarity. Expanding on this thought: I see no problem omitting $@ entirely in the context of a well-designed try/catch syntax that doesn't need to park the exception in a temporary variable (e.g. if 'catch FOO' catches any exception that isa 'FOO'). However, if the exception needs to be parked in a global, I'd park it in $@ for consistency with what happens outside try/catch. I'd also probably be happy with something that moved us away from keeping errors in globals entirely during exception handling and just passed them as arguments to handler blocks. E.g.: try { risky() } catch error::io, error::network { my $err = shift; # do something useful ...; } otherwise { log_this( shift ); } finally { clean_up(); } David -- David Golden <xdg@xdg.me> Take back your inbox! → http://www.bunchmail.com/ Twitter/IRC: @xdgThread Previous | Thread Next