Multi-line defaults are broken
Closed this issue · 1 comments
schwern commented
use Method::Signatures;
func whatever(
$arg = { this => 23,
that => 42,
}
) {
return $arg->{that};
}
print whatever();
syntax error at /Users/schwern/tmp/test.plx line 5, near "}"
Missing right curly or square bracket at /Users/schwern/tmp/test.plx line 7, at end of line
Execution of /Users/schwern/tmp/test.plx aborted due to compilation errors.
This is because Devel::Declare::set_linestr
cannot inject a line with newlines in it. Perl ignores the code after the newline.
barefootcoder commented
Fixed by #107 and merged.