develooper Front page | perl.perl5.porters | Postings from January 2013

[perl #104060] Writing to $> and friends hide errors

Thread Next
Ricardo SIGNES via RT
January 24, 2013 15:09
[perl #104060] Writing to $> and friends hide errors
Message ID:

So some of the options:

1. deprecate assigning to these vars, giving a long deprecation period (2yr) to let the 
deprecation warnings hit people using vendorperls;  after that period, assigning to $<,etc. is 

2. continue to allow assignment to $<,etc., but make failures fatal

3. leave things as they are, but document the acrobatics that are required to try for sane error 

Also mentioned: #2, but fatal only under some pragma like autodie or a feature.

My tentative favorite is #2.  A grep of CPAN finds people using assignment to these vars, but 
not checking that things work.  Programs that are working should keep working.  Programs 
that are silently "working" should admit their sins.  I predict that often these programs will be 
run in contexts where warnings will be invisible.

Documentation should also be updated to explain why users should look at using something 
else instead, too.


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