develooper Front page | perl.perl5.porters | Postings from November 2017

[perl #132485] Old package separator syntax

Thread Next
From:
Father Chrysostomos via RT
Date:
November 26, 2017 21:42
Subject:
[perl #132485] Old package separator syntax
Message ID:
rt-4.0.24-21721-1511732560-986.132485-15-0@perl.org
On Wed, 22 Nov 2017 13:03:28 -0800, sprout wrote:
> On Wed, 22 Nov 2017 10:11:50 -0800, exodist7@gmail.com wrote:
> > Final note: I wonder if it something that can be turned off via a
> > pragma?
> > use strict 'separator'; perhaps (and maybe make it a default, where
> > using
> > strict makes it deprecated?)
> 
> I looked into that several years ago.  Making it dependent on a pragma
> would add more conditions to fairly hot code (gv_fetchsv).  It would
> probably slow things down (and cause bugs at the same time) without
> much benefit.

I have added this warning in commit 2cb35ee:

$ ./perl -cwe '$name = <>; print "I visited $name'\''s house.\n"'
Old package separator used in string at -e line 1.
	(Did you mean "$name\'s"?) at -e line 1.
Name "name::s" used only once: possible typo at -e line 1.
Name "main::name" used only once: possible typo at -e line 1.
-e syntax OK

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=132485

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