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

Re: variable names in uninit warnings for maint?

Thread Previous
H.Merijn Brand
May 24, 2004 14:22
Re: variable names in uninit warnings for maint?
Message ID:
On Mon 24 May 2004 18:19, Nicholas Clark <> wrote:
> I'm aware that Dave doesn't think it sane to apply his variable naming patch
> to maint as is:
> 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 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 (
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. 
send smoke reports to:, QA:

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