Subject: | Incorrectly forces scalar context with subroutine called in return |
When using Syntax::Keyword::Try, a subroutine called from a return appears to be forced into scalar context. For instance, with:
sub list { (10, 11) }
sub test {try {return list()} catch {}}
"11" is returned by test() in list context.
Note that if I return a list directly from the try, it appears to work as expected, e.g.:
sub test {try {return (10, 11)} catch {}}
Returns "(10, 11)" in list context and "11" in scalar context.
Greg