diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-08-23 00:50:40 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-23 00:50:40 -0700 |
commit | f2ea74629375eafb0aec4965074eaf5ad9dbfe2b (patch) | |
tree | 75ffc96164929b9f93a2aea2d2c01e937ca4f0c9 /embed.h | |
parent | e708fa6e6e538adb6b46af045936a149c00d1e5c (diff) | |
download | perl-f2ea74629375eafb0aec4965074eaf5ad9dbfe2b.tar.gz |
Carp: paranoid sub lookup
Carp avoids autovivifying stashes when seeing whether a sub like
utf8::is_utf8 or overload::StrVal exists.
Its logic was slightly faulty, in that it did not take into account
that the existence of $::{"utf8::"} does not indicate the presence
of a typeglob in that element. It could have been created due to
autovivification. It also failed to take into account that $utf8::’s
HASH slot might be empty. This would result in death.
In fixing this, I moved the common logic into a single function
and also took the opportunity to avoid multiple hash lookups in
a row.
Diffstat (limited to 'embed.h')
0 files changed, 0 insertions, 0 deletions