This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv.c:sv_pos_u2b: Don’t cache anything on magical SVs
This should not change the behaviour. It is just unnecessary to cache
positions on a magical string, as we then just have to invalidate the
cache in mg_get. It will be more efficient just not to create the
cache to begin with.
This does not allow us to remove the cache invalidation in mg_get,
because the cache can sometimes be created while magic is being called
and SvMAGICAL is off. It just avoids extra work in those cases that
are detectable.