1

Introduce config support, rename fortune.pm to easter_egg.pm

This commit is contained in:
eleksir
2019-08-30 16:34:38 +03:00
parent 5b66e09ed8
commit 3500798f77
5 changed files with 101 additions and 19 deletions

19
myapi-confcheck.pl Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/perl
use strict;
use warnings "all";
use JSON::PP;
my $conf = "data/myapi.json";
my $jstr = "";
my $sep = $/;
$/ = '';
open (C, $conf) || die "No such file $conf\n";
$jstr = <C>;
close C;
my $c = decode_json($jstr);
my $j = JSON::PP->new->pretty->canonical->indent_length(4);
print $j->encode($c);