On Fri, Apr 23, 2004 at 10:37:00AM -0400, Aaron Sherman wrote:
: It's a fine point... in the past, P5 and P6 have up-cased such
: constructs in order to warn of their semi-keywordishness (e.g. DESTROY
: or BUILD). I'm wondering why Larry chose to leave dispatcher and meta
: lower in this case.

Hmm, yes.  Well, I chose those for a very strong reason--I hadn't
thought about the issue yet.   :-)

I often throw things into Apocalypses that are "placeholders" when I
know there wants to be something there, but I don't necessarily know
what the right name is yet.

Generally I think of the uppercase names as ones that get called
automatically most of the time.  But there's also a history of
uppercasing reserved names in general.  (Though most of these are
turning into ordinary variable names like $*OUT and @*ARGS).  So we
could uppercase these.

On the other hand, $obj.META.does is ugly.  But maybe it should be ugly.

On the third hand, maybe we should go for $obj._meta_ or some such.

On the fourth hand, maybe it's okay to stick with .meta.

On the fifth hand, since it's aiming at a MetaClass, maybe it should
be C<.Meta>.

On the sixth hand, by that argument, since .dispatcher is aiming at
a Class, it should be an uppercase C<>.   :-)

: However, in existing CPAN modules that I happen to have in my cache at
: the moment:
: 
:         $ grep -ri 'sub meta' .
:         ./Convert-ASN1-0.18/inc/Module/Install/Metadata.pm:sub Meta { shift }
:         $ grep -ri 'sub dispa' .
:         ./Module-Build-0.23/lib/Module/Build/Base.pm:sub dispatch {
:         ./Module-Build-0.23/lib/Module/Build/Platform/MacOS.pm:sub dispatch {
:         ./Module-Build-0.23/blib/lib/Module/Build/Platform/MacOS.pm:sub dispatch {
:         ./Module-Build-0.23/blib/lib/Module/Build/Base.pm:sub dispatch {
: 
: So it's not THAT bad.

Yeah, well, we do have to worry about future proofing.  Whether that's
done culturally or technologically is another matter.  I guess another
consideration is whether there's any valid reason for a class to want
to redefine .meta knowing that it's supposed to return the metaclass.
If so, that would tend to argue it should be kept .meta.  But that's
a weak argument, as arguments go.

: Good catch.

Yup.

Larry

Reply via email to