Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: controlling literal variable names

2 views
Skip to first unread message

Tom Christiansen

unread,
Apr 22, 2013, 7:19:47 PM4/22/13
to Ricardo Signes, perl5-...@perl.org
I'm sure it makes sense, but I'm also sure it will cause howling
by the stability folks.

I wonder if Larry or MJD might remember why we did this.

--tom

Mark Jason Dominus

unread,
Apr 22, 2013, 10:55:04 PM4/22/13
to perl5-...@perl.org


> I propose that we deprecate this form of literal variable in 5.19
> for removal in 5.21. If you want $^P, you say $^P or ${"\cP"} and
> can no longer use a literal ^P character.

This will break real programs of mine, and I say, hip hip hooray, go
for it, burn $ to the ground and salt the earth.

Karl Williamson

unread,
Apr 23, 2013, 12:10:31 AM4/23/13
to Ricardo Signes, perl5-...@perl.org
On 04/22/2013 02:15 PM, Ricardo Signes wrote:
> I propose that we
> deprecate this form of literal variable in 5.19 for removal in 5.21. If you
> want $^P, you say $^P or ${"\cP"} and can no longer use a literal ^P character.

I agree with this, but I wonder about the scheduling.

We earlier agreed that deprecations should be in effect for two major
cycles because someone might not see a whole release because of timing
our releases with those of aggregators like Debian. Then it was said
that we could skip the actual deprecation warnings in the first of those
cycles as long as we announce in the perldelta for it that the change
was coming.

I personally think that it is best to have a warning for two cycles, and
we should skip it only for really important, time critical issues; and I
don't think this deprecation rises to that level.

If it is too late to add a deprecation warning in 5.18, I think we
should announce it in the perl5.18 delta, put in the deprecation in
5.19, but not actually forbid these until 5.22.

H.Merijn Brand

unread,
Apr 23, 2013, 2:27:22 AM4/23/13
to perl5-...@perl.org
On Mon, 22 Apr 2013 16:15:13 -0400, Ricardo Signes
<perl...@rjbs.manxome.org> wrote:

> I propose that we deprecate this form of literal variable in 5.19
> for removal in 5.21. If you want $^P, you say $^P or ${"\cP"} and
> can no longer use a literal ^P character.

++ from me

--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.17 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/

Johan Vromans

unread,
Apr 23, 2013, 6:40:38 AM4/23/13
to perl5-...@perl.org
Tom Christiansen <tch...@perl.com> writes:

> I wonder if Larry or MJD might remember why we did this.

I my memory doesn't let me down, this was regarded a 'natural' (for Perl
geeks) way to extend the range of single-character punctuation (i.e.,
non-alpha) special variables. The caret form was just an alternative way
to write these variables, but unsurprisingly the caret form turned out
the be more practical when writing programs.

I don't think any of my programs will break when this feature gets
removed.

-- Johan

Mark Jason Dominus

unread,
Apr 23, 2013, 11:06:33 AM4/23/13
to perl5-...@perl.org

Tom Christiansen <tch...@perl.com>:
> I wonder if Larry or MJD might remember why we did this.

It predates my arrival to Perl. I think it's documented in the pink Camel Book.

Nicholas Clark

unread,
Apr 24, 2013, 3:06:25 PM4/24/13
to Ricardo Signes, Tom Christiansen, perl5-...@perl.org
On Wed, Apr 24, 2013 at 02:48:06PM -0400, Ricardo Signes wrote:

> Larry only suggested that maybe his use of TECO was to blame for this. The
> behavior has been in there since v3 at the latest, I didn't care to dig earlier
> than that, and I found nothing instructive in the newsfroups.

Seems to be present in Perl 1:

$ ./perl -e '$^I = "Hello world"; print "$ \n";'
Hello world
$ ./perl -e '$ = "Hello world"; print "$^I\n";'
Hello world
$ ./perl -v
$Header: perly.c,v 1.0.1.3 88/01/28 10:28:31 root Exp $
Patch level: 16

> I think we file this under "it seemed cute at the time" and gear up to rip it
> out, timetable TBD.

Yes, I think that is the right thing to do.

Nicholas Clark
0 new messages