Add support for Perl 5.22.x.

As outlined by Leon Timmermans in [perl #123687]:

  lookup %ENV's magic, and then replace the pointer to PL_vtbl_env with
  a pointer to MP_vtbl_env. You may have to add some svt_copy magic to
  make it cast MP_vtbl_envelem instead of PL_vtbl_envelem on the elements.

with an added svt_local for the 'local %ENV' tests.

While at it, augment t/modperl/env.t to check that deleting %ENV elements really removes them from subprocess_env. This highlights the need for modifying their vtable, currently in the modperl_envelem_tie() macro.

(MP_vtbl_envelem probably shouldn't be a global variable, but the modperl_envelem_tie() macro needs it, and the perl vtables are global too anyway. I've made MP_vtbl_env global too for symmetry.)

Based on ++Niko Tyni's 0001-Steps-at-Perl-5.22-compatibility-take-3.patch in [rt.cpan.org #101962].

Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101962
Bug: https://rt.perl.org/Ticket/Display.html?id=123687


git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1717474 13f79535-47bb-0310-9956-ffa450edef68
6 files changed