Skip Menu |

This queue is for tickets about the Syntax-Feature-Try CPAN distribution.

Report information
The Basics
Id: 110072
Status: open
Priority: 0/
Queue: Syntax-Feature-Try

People
Owner: Nobody in particular
Requestors: EDAVIS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.002
Fixed in: (no value)



Subject: Disable 'exiting' warning so that next, etc works right
Often in a catch block you want to break out of the loop, or continue to the next iteration. You can do so with 'next', 'last', and 'redo', but these give an error Exiting subroutine via next at... Catch blocks should run under "no warnings 'exiting'" to suppress this warning, since it is not helpful and indeed misleading in this case (the containing subroutine is not exited, just the catch block).
See documentation: http://search.cpan.org/~tnt/Syntax-Feature-Try-1.002/lib/Syntax/Feature/Try.pm#CAVEATS next, last and redo is not working inside try/catch/finally blocks, because these blocks are internally called in different context. Dne Pá 04.pro.2015 09:27:30, EDAVIS napsal(a): Show quoted text
> Often in a catch block you want to break out of the loop, or continue > to the next iteration. You can do so with 'next', 'last', and 'redo', > but these give an error > > Exiting subroutine via next at... > > Catch blocks should run under "no warnings 'exiting'" to suppress this > warning, since it is not helpful and indeed misleading in this case > (the containing subroutine is not exited, just the catch block).