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.
>