As of 5.15.6, strict.pm puts hints in %^H. B::Deparse still deparses
strict hints in $^H with ‘use strict’. Strictly speaking, deparsing
$^H hints with ‘use strict’ is not strictly correct any more, because
the result of ‘eval 'use v5.10; ...'’ within the same scope is differ-
ent, in that ‘use v5.10’ will disable strictures enabled only through
$^H, but will not disable those enabled also through %^H.
(Strict entries in %^H strictly indicate that strict.pm is overriding
any version declaration. They are always set to undef.)
So the correct way to deparse $^H without %^H would be ‘use 5.011’ or
‘use 5.012’ or ‘use 5.
011001000000001’, which all work. The correct
way to deparse $^H *with* %^H is ‘use strict’.
Determining the actual version number to use is a problem. It is
nowhere to be seen in the op tree. It is visible in the implied BEGIN
block (BEGIN{require 5.012}). Due to limitations in Perl itself,
it is not possible to know exactly where the BEGIN block should go,
so trying to pair up $^H changes with BEGIN blocks could never work
reliably. Simply guessing the version number and printing one the
code did not contain would cause more confusion than the strict
hints in %^H.
Since B::Deparse has special-cased strict mode as far as I can remem-
ber, always putting it in the right place, falling back to relying
BEGIN blocks (collapsing them to version declarations) would be a
regression.
So it seems the best choice is simply to suppress strict hints in %^H
and deparse strict as it has always been deparsed. It’s not strictly
correct, but neither are the alternatives, and it seems the least bad.