This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[Merge] CVs without GVs
authorFather Chrysostomos <sprout@cpan.org>
Mon, 15 Sep 2014 13:20:16 +0000 (06:20 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 15 Sep 2014 13:20:16 +0000 (06:20 -0700)
commitf9d9e965c852a57faea33a539ecd03a6e825af47
tree9df42e13cab8c6cd52a8e720691fdde95757cf2c
parentbdab7676902d2f95f6fad47110f6e94e386db556
parent0bddbad8d6598bec770281158952e178308f32eb
[Merge] CVs without GVs

Subroutines in packages no longer need typeglobs to live in.  Concep-
tually the typeglobs still exist, and will be reified as necessary.

(This was already the case with constant subs, which could be stored
in the stash as refs to constants, but now the stash can have sub
refs, too.)

Currently this optimisation is undone if a sub is exported or used as
a method.  Also, it does not apply to XSUBs.

Here is the full list of notable changes:

Internal:

• CvGV now reifies the GV if necessary.
• Lexical subs now have notional GVs, which are likewise rei-
  fied by CvGV.
• The new CVf_LEXICAL flag indicates that the package name should be
  dropped in error messages.

XS API:

• New cv_name function
• New cv_set_call_checker_flags function

Perl-visible changes:

• New B::safename function