develooper Front page | perl.perl5.porters | Postings from May 2004

Re: variable names in uninit warnings for maint?

Thread Previous
From:
H.Merijn Brand
Date:
May 24, 2004 14:22
Subject:
Re: variable names in uninit warnings for maint?
Message ID:
20040524231918.D7F8.H.M.BRAND@hccnet.nl
On Mon 24 May 2004 18:19, Nicholas Clark <nick@ccl4.org> wrote:
> I'm aware that Dave doesn't think it sane to apply his variable naming patch
> to maint as is:
> 
> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-04/msg00777.html
> 
> and I now agree with his reasoning. I'm not convinced that if we made it
> optional (but not default) that no-one would use it - the comment of people
> at the Austrian Perl Workshop was that this would be a really useful feature,
> and that they'd use it, if it were available.
> 
> However, the thread died out without any suggestions on how to do this.
> I don't fully understand the warnings pragma, but as far as I can tell
> 
> 1: use warnings; turns on all classes of warnings that warnings.pm holds,
>    and is documented as doing exactly this
> 
> therefore 
> 
> 2: if we were to make named uninit a class of warnings, even if it were not
>    turned on by -w, it would have to be turned on by use warnings; and in
>    turn that could break existing code
> 
> so it seems that
> 
> 3: we need another way of specifying that we'd like uninit warnings to be
>    reported in the new format.
> 
> which sort of comes down to should the change be lexical, or global.
> I'd actually be quite happy with global (so please suggest arguments
> against this) as I'm assuming that this would only be used by main programs,
> and existing test suites are main programs that don't turn this on.
> 
> (ie programmers would have to turn this on by themselves, so they'd be
> aware that they needed to take precautions to ensure that their foot was
> safely elsewhere before pulling this trigger, and any module writer who
> turns this on for the rest of the program is as anti-social as anyone
> modifying an existing global)
> 
> 
> What do people think?

I'm totally against breakage, but i've heared the calls for this feature also,
and I wouldn't mind going through my modules to update them to match either
warning, but than again, I don't have that many modules on CPAN.

If it were included, I'd build all the modules I usually include, and report
to the authors what fails.

So, I'm absolutely not against it, but we should be prepared to catch a lot of
complaints to p5p where they don't belong. Nicholas knows *_all_* about it :)

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.3, & 5.9.x, and 809 on  HP-UX 10.20 & 11.00, 11i,
   AIX 4.3, SuSE 9.0, and Win2k.           http://www.cmve.net/~merijn/
http://archives.develooper.com/daily-build@perl.org/   perl-qa@perl.org
send smoke reports to: smokers-reports@perl.org, QA: http://qa.perl.org



Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About