develooper Front page | perl.perl5.porters | Postings from October 2009

Re: [perl #70043] Re: [Sysadmins] Perl allows non-sensical operations on reference converted to an integer

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
October 27, 2009 07:27
Subject:
Re: [perl #70043] Re: [Sysadmins] Perl allows non-sensical operations on reference converted to an integer
Message ID:
b77c1dce0910270727o75d3d2c8p7d12ae488c8627ed@mail.gmail.com
2009/10/27 Abigail <abigail@abigail.be>:
>> If we add a new strict subpragma, like C<use strict
>> "stringificationofrefs">, we'll have problems, because people will
>> want to disable it locally by doing C<use strict; no strict
>> "stringificationofrefs">, and that would be a fatal error on earlier
>> perls.
>
> I would prefer a new pragma as well, but I don't really understand your
> argument. After all, if it's added in a new pragma, people will write
> 'use newpragma', and that will fail on older perls as well, won't it?

Not exactly : to use a new pragma, you have to modify your code, and
implicitly state you require perl >= 5.X. Your old code will run
unmodified. But, if we change the meaning of use strict, and if that
forces you to modify your code to cope with a new strict subpragma,
you make it dependent on perl >= 5.X without really needing to.

(I was assuming that C<use strict> continues to enable all strict subpragmas)

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