Skip Menu |
Report information
Id: 129373
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at]

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Subject: Explicit `return` prevens Failure explosion in sinkage
Download (untitled) / with headers
text/plain 602b
Unsure if this is on purpose or not: If I have a variable with a Failure in it and I let it be the last statement of a sub, so it's returned, and I call the sub and let its return sink, the failure explodes: $ perl6 -e 'sub wone { fail }; sub two { my $x = wone; $x }(); say "all good"' Failed in sub wone at -e line 1 in sub two at -e line 1 in block <unit> at -e line 1 Actually thrown at: in block <unit> at -e line 1 BUT, if I use an explicit `return`, the explosion no longer happens: $ perl6 -e 'sub wone { fail }; sub two { my $x = wone; return $x }(); say "all good"' all good

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at