[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r8621 - in branches/1.0.x: . tools/hook-scripts

From: Branko Čibej <brane_at_xbc.nu>
Date: 2004-02-13 23:42:33 CET

Blair Zajac wrote:

>Branko ?ibej wrote:
>
>
>>dlr@tigris.org wrote:
>>
>>
>>
>>>Author: dlr
>>>Date: Thu Feb 12 04:07:35 2004
>>>New Revision: 8621
>>>
>>>Modified:
>>> branches/1.0.x/STATUS
>>> branches/1.0.x/tools/hook-scripts/commit-access-control.pl.in
>>> branches/1.0.x/tools/hook-scripts/commit-email.pl.in
>>> branches/1.0.x/tools/hook-scripts/propchange-email.pl.in
>>>Log:
>>>Backport Blair's r8539 and r8540 commits to fix the shebang lines
>>>which were preventing some scripts from running:
>>>
>>>
>>>
>>>
>>I thought we'd agreed that setting the value of ^W not the right
>>solution, and "use warnings" was the right one. How come this change got
>>onto the 1.0.x branch?
>>
>>
>
>I didn't recall any agreement when I wrote those changes. And in
>fact, I still don't :) How long ago was that said. Any why was
>use warnings decided as the right solution?
>
>
Right, there wasn't actually an agreement. However, Ben Reser's comments
are relevant:

> Ben Reser wrote:
>
>On Thu, Jan 29, 2004 at 01:02:09PM -0800, Blair Zajac wrote:
>
>
>>> #!/usr/bin/env perl -w
>>>
>>>
>>Unless someone beats me to the punch, I'll fix this. This also
>>happens on my box.
>>
>>
>
>You shouldn't use -w on the command line anymore.
>
>-w tends to run into command line problems like this and is global for
>the entire interpretor. However, use warnings only is limited to the
>enclosing block. So you won't see errors from other peoples code.
>
>See perldoc perllexwarn for more details.
>
>

In short, changing ^W affects _all_ modules loaded in the interpreter,
whilst the "use warnings" directive only applies to the current scope.

>I'm not in the habit of using "use warnings" since I started with
>Perl before that module was written.
>
Irrelevant.

> And I support older versions
>of Perl on my own projects.
>
>
You support Perl 4? Well fine, but I don't think we have to worry about
versions prior to 5.0.

>And probably because nobody noticed and the original commits were a
>while ago now.
>
>
Ben did notice, quite soon after the commit. I agree with him. The BEGIN
blocks should be replaced by "use warnings". Will you make the change,
or shall I? :-)

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 13 23:42:45 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.