develooper Front page | perl.perl5.porters | Postings from May 2013

[perl #117087] forbid empty parts in package names

Father Chrysostomos via RT
May 26, 2013 07:52
[perl #117087] forbid empty parts in package names
Message ID:
On Thu Mar 07 20:29:25 2013, wrote:
> * Jesse Luehrs <> [2013-03-07T16:42:45]
> > Foo:: has a documented meaning too - it's a form of quoting, so that
> > Foo::->new always means "Foo"->new, and never Foo()->new (which is the
> > default interpretation of Foo->new).
> > 
> > That said, I'm fairly sure that all of these forms are only being
> > deprecated in package statements - I don't see any reason why
> > "package ::X" or "package X::" are reasonable things to do.
> More importantly, in package names, even if the practical effect is
> through the "package" statement.  It doesn't affect the meaning of $::x or
> Foo::
> $x::::y is right out, though.

But why? Is it harmful? I actually find $x::::y useful, as ‘use
Foo::::Bar’ vs ‘use Foo::Bar’ actually lets me have two separate import
subs in the same module.

It may be uncommon, but I have actual code using that.

Also, arbitrary string are currently allowed for ${"..."}.  I hope
*that* doesn’t change!


Father Chrysostomos

via perlbug:  queue: perl5 status: open Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About