Skip to content

Commit

Permalink
allow relaxed json in config
Browse files Browse the repository at this point in the history
  • Loading branch information
mauke committed Mar 28, 2012
1 parent cd85082 commit c6d3c26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vision.pl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
use again 'Data::Munge' => qw(list2re); BEGIN { Data::Munge->VERSION('0.04') } use again 'Data::Munge' => qw(list2re); BEGIN { Data::Munge->VERSION('0.04') }
use again 'List::Util' => qw(max); use again 'List::Util' => qw(max);


our $VERSION = '0.04'; our $VERSION = '0.041';


our %IRSSI = ( our %IRSSI = (
authors => 'mauke', authors => 'mauke',
Expand Down Expand Up @@ -261,7 +261,7 @@ sub read_net_json_from_default {
$!{ENOENT} or die "$file: $!"; $!{ENOENT} or die "$file: $!";
return $def; return $def;
} }
my $r = decode_json slurp $fh; my $r = JSON->new->relaxed->decode(slurp $fh);
ref($r) eq ref($def) or die "$file: type doesn't match default (${\ref $def})"; ref($r) eq ref($def) or die "$file: type doesn't match default (${\ref $def})";
$r $r
} }
Expand Down

0 comments on commit c6d3c26

Please sign in to comment.