Skip to content

Commit

Permalink
Use another lexical filehandle instead of a local *DH
Browse files Browse the repository at this point in the history
  • Loading branch information
sartak committed Apr 25, 2011
1 parent 8820b5c commit 112f0ae
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Test/Spelling.pm
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,9 @@ sub all_pod_files {
while ( @queue ) {
my $file = shift @queue;
if ( -d $file ) {
local *DH;
opendir DH, $file or next;
my @newfiles = readdir DH;
closedir DH;
opendir my $dirhandle, $file or next;
my @newfiles = readdir $dirhandle;
closedir $dirhandle;

@newfiles = File::Spec->no_upwards( @newfiles );
@newfiles = grep { $_ ne "CVS" && $_ ne ".svn" } @newfiles;
Expand Down

0 comments on commit 112f0ae

Please sign in to comment.