in reply to Re: Bug ? Perl dumps core on reference to @_ ?
in thread Bug ? Perl dumps core on reference to @_ ?

Hook::LexWrap appears to autovivify wrappers to undef in lines like:
# Hook/LexWrap.pm:43 () = $wrapper{post}->(@_, $return) if $wrapper{post};
It looks like if exists $wrapper{'post'}; should be preferred.
Perhaps from an aesthetic point-of-view, but it makes absolutely no difference in terms of behaviour. Testing $wrapper{'post'} in an if will not autovivify it. And even if it did, it would autovivify to undef, so the if would still fail, preventing the undefined value from ever actually being used as a subroutine reference.
I can imagine that undef coderefs might confuse it.
Quite probably. But only if they were actually ever called, which the if $wrapper{'post'}; ensures they never will be.