[libhtml-scrubber-perl] 04/11: Remove use of naked filehandle

Florian Schlichting fsfs at moszumanska.debian.org
Sat Nov 11 13:46:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

fsfs pushed a commit to annotated tag release/0.09
in repository libhtml-scrubber-perl.

commit e5c33233afafe77314051b4c7ba9e43e18ac4739
Author: Nigel Metheringham <nigelm at cpan.org>
Date:   Fri Apr 1 14:59:54 2011 +0100

    Remove use of naked filehandle
---
 lib/HTML/Scrubber.pm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/HTML/Scrubber.pm b/lib/HTML/Scrubber.pm
index e8c0051..6850fc0 100644
--- a/lib/HTML/Scrubber.pm
+++ b/lib/HTML/Scrubber.pm
@@ -337,10 +337,9 @@ sub _out {
     my($self, $o ) = @_;
 
     unless( ref $o and ref \$o ne 'GLOB') {
-        local *F;
-        open F, ">$o" or return undef;
-        binmode F;
-        $self->{_out} = *F;
+        open my $F, '>', $o or return;
+        binmode $F;
+        $self->{_out} = $F;
     } else {
         $self->{_out} = $o;
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libhtml-scrubber-perl.git



More information about the Pkg-perl-cvs-commits mailing list