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

[perl #132485] Old package separator syntax

Thread Next
Father Chrysostomos via RT
November 26, 2017 21:42
[perl #132485] Old package separator syntax
Message ID:
On Wed, 22 Nov 2017 13:03:28 -0800, sprout wrote:
> On Wed, 22 Nov 2017 10:11:50 -0800, 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

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About