in reply to Re: Re^2: Private method variations
in thread Private method variations
Well, I actually thought about that one, but didn't think you'd go for something even longer. :-)
One extra character I can probably cope with :-)
As for whether it's in Perl 6, the only answer I can give is: "not yet". But by and large all-uppercase names are kinda sorta reserved for Perl to grow into. More or less. So maybe Our:: would be a better choice.
Your right that from an upward compatibility point of view Our:: (or My::) is clearly a better choice.
The downside is that it then looks so much like a normal fully qualified method call. Thanks to NEXT and SUPER using UPPERCASE provides a handy cue to the developer that some magic is happening.
Hmmm... Swings or roundabouts. Roundabouts or swings.
Oooohhh! Just had a sneaky idea.
"_" seems to be a valid package name. Is:
sub _::secret { ... }; $self->_::secret();
to evil? Even shorter that MY::, doesn't look like a "normal" fully qualified method call and we get the whole "_" thang that people are already used to.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re^4: Private method variations
by TimToady (Parson) on Mar 02, 2004 at 00:36 UTC | |
by jdporter (Paladin) on Mar 03, 2004 at 20:41 UTC | |
by adrianh (Chancellor) on Mar 02, 2004 at 01:16 UTC | |
by adrianh (Chancellor) on Mar 02, 2004 at 14:00 UTC |