Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 109676
Status: resolved
Priority: 0/
Queue: Moose

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

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



Subject: [Lack of doc] Method modifiers and exceptions
Manual page "Moose::Manual::MethodModifiers" (https://metacpan.org/pod/distribution/Moose/lib/Moose/Manual/MethodModifiers.pod) says nothing about exceptions (thrown by 'die'). In particular, I would like to know: 1. If 'before' method modifier dies, is method and/or 'after' modifier executed? There is an example where 'die' is called from 'before' method modifier. It seems the method is not called in such a case; but it is not stated explicitly. 2. If method dies, is 'after' method modifier executed?
When an exception is thrown, anywhere, execution stops and the stack is unwound to the closest __DIE__ handler in scope, if there is one. There is nothing special done by Moose; normal Perl exception semantics apply.