Re: [PATCH] Refactor cargo-cult PMC

[email protected] (Nicholas Clark) Sun, 22 Aug 2004 21:42:39 +0100
Newsgroups perl.ponie.dev
Message-ID <[email protected]>
On Sat, Aug 14, 2004 at 12:22:27AM +0200, Mattia Barbon wrote:
>   Hello,
> this patch moves most of the code in perl5cargo_cult.pm to a
> new Perl5Base PMC. It also adds some initialization code to
> set struct PERL5_SV fields to 0/NULL and to initialize the
> SvTYPE field.

Thanks for the unsolicited patch.

However, I'm not sure that I want to apply it. My plan was to leave all the
throw away code in perl5cargocult.pmc and write the real perl5 PMCs from
scratch, pulling over only the good code. For example, the current code is
unsuitable as a Perl5 Base PMC because it contains IV and NV slots and
code to access them, whereas in a proper hierarchy they will not be present
in the base PMC, the RV, or the PV PMCs.

> P.S.: the src/pmc/perl5base.pmc needs to be added to CVS

It would also need some code added to copy it from src/pmc into
parrot/classes.

Nicholas Clark