Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

3 subroutines with same name

3 views
Skip to first unread message

James E Keenan

unread,
Nov 21, 2006, 9:36:53 PM11/21/06
to perl6-i...@perl.org
Note the results:

[parrot] 502 $ ack 'sub gen_c'

lib/Parrot/Pmc2c.pm
1221:sub gen_c {

lib/Parrot/Pmc2c/Library.pm
134:sub gen_c {

tools/build/pmc2c.pl
821:sub gen_c {

3 identically named subroutines: 2 in modules and 1 in a script. And
all 3 will be in modules as I'm planning to refactor much of pmc2c.pl
into a module called Parrot::Pmc2c::Utils. (For drafts of these
revisions, see http://thenceforward.net/parrot/.)

This is not good, right? Suggestions as to how to proceed?

Thanks.

kid51

Chromatic

unread,
Nov 21, 2006, 10:43:24 PM11/21/06
to perl6-i...@perl.org, James E Keenan
On Tuesday 21 November 2006 18:36, James E Keenan wrote:

> 3 identically named subroutines: 2 in modules and 1 in a script. And
> all 3 will be in modules as I'm planning to refactor much of pmc2c.pl
> into a module called Parrot::Pmc2c::Utils. (For drafts of these
> revisions, see http://thenceforward.net/parrot/.)
>
> This is not good, right? Suggestions as to how to proceed?

Which one do we actually use now? Let's consider that the canonical one. If
there is one, it'll be nice to see if there are any appreciable differences
in output between the three. That'll let those of us who've written PMCs
before have a chance to see if there are significant features of one over the
others.

-- c

James E Keenan

unread,
Nov 22, 2006, 7:48:14 AM11/22/06
to perl6-i...@perl.org, chromatic, perl6-i...@perl.org
chromatic wrote:

The coverage analysis I'm running on my tests indicates that
Parrot::Pmc2c::gen_c() is definitely used, as is (the future)
Parrot::Pmc2c::Utils::gen_c() (what is currently found in
tools/build/pmc2c.pl).

I suspect Parrot::Pmc2c::Library::gen_c() is not currently used, but I
can't definitely rule the contrary possibility out. All I can say is
that my test suite doesn't touch it. Nor does my test suite touch the
same package's gen_h() module either.

jimk

0 new messages