Skip to content

Commit 47ceab0

Browse files
Merge pull request #9 from demerphq/yves/fix_sub_attrs_and_spelling_issues
Fix _sub_attrs for perl 5.37.9
2 parents 0b5917c + 602a6b4 commit 47ceab0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/Class/Method/Modifiers.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ sub _sub_attrs {
208208
my ($coderef) = @_;
209209
local *_sub = $coderef;
210210
local $@;
211+
local $SIG{__DIE__};
211212
# this assignment will fail to compile if it isn't an lvalue sub. we
212213
# never want to actually call the sub though, so we return early.
213214
(eval 'return 1; &_sub = 1') ? ':lvalue' : '';

0 commit comments

Comments
 (0)