This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deparse stash subs stores as RVs
authorFather Chrysostomos <sprout@cpan.org>
Sat, 25 Oct 2014 01:20:01 +0000 (18:20 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 25 Oct 2014 03:20:22 +0000 (20:20 -0700)
commitfe8d6c18fac3e6f25c32980e576a7fad32b20962
tree3f8d42f1fdd69984a134d3cf716d89187ac6df7a
parent8c225ab79ea4360be9f3c8f4accb055adc2a9269
Deparse stash subs stores as RVs

Commit 2eaf799e74b stop most declarations like ‘sub foo{}’ from creat-
ing GVs.  Instead, simple sub refs are stored in the stash.

That broke deparsing of package subs:

$ perl5.21.4 -MO=Deparse -e 'sub foo{die}'
-e syntax OK

Deparse needs to know about these references, so that we get this:

$ ./perl -Ilib -MO=Deparse -e 'sub foo{die}'
sub foo {
    die;
}
-e syntax OK
lib/B/Deparse.pm
lib/B/Deparse.t