diff options
author | Marc Green <marcgreen@cpan.org> | 2012-01-17 00:58:59 -0500 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2012-02-06 21:21:17 -0500 |
commit | 3fabeba8637b623eb41bd2a3d33d317eba3000ce (patch) | |
tree | 087d01cbfd449c43e85f5674bdb30625f901928c /ext/Pod-Html | |
parent | ccf5eb14a8538b17b03d3544bd1505000fc0a329 (diff) | |
download | perl-3fabeba8637b623eb41bd2a3d33d317eba3000ce.tar.gz |
Modernize the use of open() (copied from old code)
Diffstat (limited to 'ext/Pod-Html')
-rw-r--r-- | ext/Pod-Html/lib/Pod/Html.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm index 1816c523ea..3977ded966 100644 --- a/ext/Pod-Html/lib/Pod/Html.pm +++ b/ext/Pod-Html/lib/Pod/Html.pm @@ -558,33 +558,33 @@ sub load_cache { local $_; warn "scanning for directory cache\n" if $Verbose; - open(CACHE, "<$dircache") || + open(my $cachefh, '<', $dircache) || die "$0: error opening $dircache for reading: $!\n"; $/ = "\n"; # is it the same podpath? - $_ = <CACHE>; + $_ = <$cachefh>; chomp($_); $tests++ if (join(":", @$podpath) eq $_); # is it the same podroot? - $_ = <CACHE>; + $_ = <$cachefh>; chomp($_); $tests++ if ($podroot eq $_); # load the cache if its good if ($tests != 2) { - close(CACHE); + close($cachefh); return 0; } warn "loading directory cache\n" if $Verbose; - while (<CACHE>) { + while (<$cachefh>) { /(.*?) (.*)$/; $Pages{$1} = $2; } - close(CACHE); + close($cachefh); return 1; } |