Skip Menu |

This queue is for tickets about the Perl-Tidy CPAN distribution.

Report information
The Basics
Id: 111512
Status: resolved
Priority: 0/
Queue: Perl-Tidy

People
Owner: Nobody in particular
Requestors: ZDM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Perl::Tidy enable warinings globally
Hi. I found, that following code produce annoying warning: require Perl::Tidy; ... require AnyEvent::IO; That is, because, Perl::Tidy enable warning globally: BEGIN { $^W = 1; } # turn on warnings Is it really necessary? Show quoted text
> perl-tidy enables warnings randomly for *other* modules that might or > might not be prepared for it (kind of enforcing its own coding standard on > other modules), and only when they are loaded after perl::tidy. > > it's the same as if perl-tidy went into every module loaded after it itself > is loaded and added some "use warnings ..." line. > > if perl-tidy wants warnings for its own code, it should "use warnings".
Subject: Re: [rt.cpan.org #111512] Perl::Tidy enable warinings globally
Date: Thu, 28 Jan 2016 10:07:44 -0800
To: "bug-Perl-Tidy [...] rt.cpan.org" <bug-Perl-Tidy [...] rt.cpan.org>
From: Steven Hancock <perltidy [...] users.sourceforge.net>
Thanks, I'll change it to use warnings. Steve On Thu, Jan 28, 2016 at 6:57 AM, Dmytro Zagashev via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Thu Jan 28 09:57:19 2016: Request 111512 was acted upon. > Transaction: Ticket created by ZDM > Queue: Perl-Tidy > Subject: Perl::Tidy enable warinings globally > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: ZDM@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=111512 > > > > Hi. > > I found, that following code produce annoying warning: > > require Perl::Tidy; > ... > require AnyEvent::IO; > > That is, because, Perl::Tidy enable warning globally: > > BEGIN { $^W = 1; } # turn on warnings > > Is it really necessary? >
> > perl-tidy enables warnings randomly for *other* modules that might or > > might not be prepared for it (kind of enforcing its own coding standard
> on
> > other modules), and only when they are loaded after perl::tidy. > > > > it's the same as if perl-tidy went into every module loaded after it
> itself
> > is loaded and added some "use warnings ..." line. > > > > if perl-tidy wants warnings for its own code, it should "use warnings".
>
Fixed in version 20160301