Skip Menu |

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

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

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

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



Subject: Scalar filehandles not recognized properly
Perl::Tidy doesn't properly recognize scalar filehandles for "stderr" and "logfile" arguments, created as "open my $fh, '>', \$buf". You can relace: 124: if ( $ref eq 'IO::File' || defined &{ $ref . "::getline" } ) { with $ref->can('getline'); and 141: if ( $ref eq 'IO::File' || defined &{ $ref . "::print" } ) { with $ref->can('print'); I think this will be more correct.
Subject: Re: [rt.cpan.org #97159] Scalar filehandles not recognized properly
Date: Sat, 12 Jul 2014 09:40:35 -0700
To: "bug-Perl-Tidy [...] rt.cpan.org" <bug-Perl-Tidy [...] rt.cpan.org>
From: Steven Hancock <perltidy [...] users.sourceforge.net>
Thanks, Steve On Fri, Jul 11, 2014 at 5:19 PM, Dmytro Zagashev via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Fri Jul 11 20:19:38 2014: Request 97159 was acted upon. > Transaction: Ticket created by ZDM > Queue: Perl-Tidy > Subject: Scalar filehandles not recognized properly > Broken in: (no value) > Severity: Unimportant > Owner: Nobody > Requestors: ZDM@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=97159 > > > > Perl::Tidy doesn't properly recognize scalar filehandles for "stderr" and > "logfile" arguments, created as "open my $fh, '>', \$buf". > > You can relace: > > 124: if ( $ref eq 'IO::File' || defined &{ $ref . "::getline" } ) { > with > $ref->can('getline'); > > and > > 141: if ( $ref eq 'IO::File' || defined &{ $ref . "::print" } ) { > with > $ref->can('print'); > > I think this will be more correct. >
This suggested change is implemented in version 20150815.