Skip to content

Commit

Permalink
And workaround for problem with Pod::Coverage in older perls.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdybedahl committed Apr 28, 2015
1 parent 8bd475c commit d5e1ebd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Zonemaster/Nameserver.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use MIME::Base64;
use Module::Find qw[useall];
use Carp;
use List::Util qw[max min sum];
use POSIX qw[setlocale LC_ALL];
use POSIX ();

use overload
'""' => \&string,
Expand Down Expand Up @@ -320,7 +320,7 @@ sub compare {
sub save {
my ( $class, $filename ) = @_;

my $old = setlocale(LC_ALL,'C');
my $old = POSIX::setlocale(POSIX::LC_ALL,'C');
my $json = JSON::XS->new->allow_blessed->convert_blessed;
open my $fh, '>', $filename or die "Cache save failed: $!";
foreach my $name ( keys %object_cache ) {
Expand All @@ -333,7 +333,7 @@ sub save {

Zonemaster->logger->add( SAVED_NS_CACHE => { file => $filename } );

setlocale(LC_ALL, $old);
POSIX::setlocale(POSIX::LC_ALL, $old);
return;
}

Expand Down

0 comments on commit d5e1ebd

Please sign in to comment.