develooper Front page | perl.perl5.porters | Postings from September 2021

Re: removing the old-style package separator

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
September 3, 2021 15:19
Subject:
Re: removing the old-style package separator
Message ID:
20210903161937.75c1aaac@shy.leonerd.org.uk
On Mon, 30 Aug 2021 11:31:55 +0100
Dave Mitchell <davem@iabyn.com> wrote:

> On Sat, Aug 14, 2021 at 11:08:40PM -0400, Ricardo Signes wrote:
> > The following two expressions are equivalent:
> > $x::y::z
> > 
> > $x'y'z  
> 
> Are we talking about just removing the parsing of "'" in package
> names in source code, or more generally the run-time processing of
> package names, e.g.
> 
>     sub a::b { print "a::b called\n" }
>     my $name = "a'b";
>     &{$name}();

I think the primary motivation was to catch it in string interpolation,
because of the common failures like

   print "$name's score is 10\n";

Next up is general static source, and finally symbolic references.
Perhaps it could be attacked in several phases.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About