Ticket #1988 (closed bug: fixed)
lib/Parrot/Pmc2c/PMCEmitter.pm: make file match package.
Reported by: | jkeenan | Owned by: | jkeenan |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | build | Version: | 3.0.0 |
Severity: | medium | Keywords: | |
Cc: | tewk, mikehh | Language: | |
Patch status: | applied | Platform: | all |
Description
During cage-cleaning today I reviewed TT #682 in which chromatic commented on some consequences of a modification of lib/Parrot/Pmc2c/PMCEmitter.pm. I subsequently examined this file and was puzzled by what I saw:
1. The file is named lib/Parrot/Pmc2c/PMCEmitter.pm and the POD that appears at the head of the file is consistent with that:
NAME Parrot::Pmc2c::PMCEmitter - PMC to C Code Generation SYNOPSIS use Parrot::Pmc2c::PMCEmitter; DESCRIPTION "Parrot::Pmc2c::PMCEmitter" is used by tools/build/pmc2c.pl to generate C code from PMC files.
But then the package declaration is this:
package Parrot::Pmc2c::PMC;
... which flies in the face of this file: lib/Parrot/Pmc2c/PMC.pm, which itself contains a package Parrot::Pmc2c::PMC; declaration.
ack-ing for PMCEmitter shows this:
lib/Parrot/Pmc2c/Library.pm:27:use Parrot::Pmc2c::PMCEmitter (); lib/Parrot/Pmc2c/PMC/RO.pm:28:use Parrot::Pmc2c::PMCEmitter ();
... but, AFAICT, no functions from lib/Parrot/Pmc2c/PMCEmitter.pm are ever called in Parrot::Pmc2c::Library or Parrot::Pmc2c::PMC::RO.
All of which suggests that this file is dead code which can be ripped out. I am going to start a branch to explore that possibility -- but does anyone have any better insight into this?
Thank you very much.
kid51