On Wed Oct 19 07:20:42 2016, mauke- wrote: > Here's the merge I'm talking about: > http://perl5.git.perl.org/perl.git/commitdiff/f9d9e965 > > Also listed in perl5220delta: > > Subroutines in packages no longer need to be stored in typeglobs: > declaring a subroutine will now put a simple sub reference directly in > the stash if possible, saving memory. > > This works fine for the main script: > > $ perl -wE 'sub foo { 42 } say $main::{foo}' > CODE(0xa06f668) > > But not in other packages: > > $ perl -wE 'package Other; sub foo { 42 } say $Other::{foo}' > *Other::foo > > I.e. this optimization doesn't apply to modules, which is where most > subroutines come from. Here's a patch that adds a TODO test for now. --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=129916Thread Next