mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 14:59:20 +02:00
Use JSON::MaybeXS instead of JSON (courtesy of Ethan Rooke)
This commit is contained in:
@@ -7,7 +7,7 @@ bindir=@bindir@
|
||||
datadir=@datadir@
|
||||
datarootdir=@datarootdir@
|
||||
PERL=@PERL@
|
||||
PERLMODS_NEEDED=JSON::Any Getopt::Long
|
||||
PERLMODS_NEEDED=JSON::MaybeXS Getopt::Long
|
||||
all:
|
||||
true
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
use Getopt::Long;
|
||||
use JSON::Any;
|
||||
use JSON::MaybeXS;
|
||||
|
||||
my %Options;
|
||||
|
||||
@@ -266,7 +266,7 @@ sub parse_input
|
||||
($y, $m, $d, $special, $tag, $duration, $time, $body) =
|
||||
($1, $2, $3, $4, $5, $6, $7, $8);
|
||||
} elsif (/\{/) {
|
||||
my $obj = JSON::Any->jsonToObj($_);
|
||||
my $obj = decode_json($_);
|
||||
next unless ($obj->{date} =~ /^(\d+)-(\d+)-(\d+)$/);
|
||||
$y = $1;
|
||||
$m = $2;
|
||||
|
||||
Reference in New Issue
Block a user