Algorithm-Diff-JSON
view release on metacpan or search on metacpan
}
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
"Algorithm::Diff" : "0",
"Cpanel::JSON::XS" : "0",
"Sub::Exporter" : "0",
"Test::Differences" : "0",
"Test::More" : "0.88"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/DrHyde/perl-modules-Algorithm-Diff-JSON/issues"
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Algorithm-Diff-JSON
no_index:
directory:
- t
- inc
requires:
Algorithm::Diff: '0'
Cpanel::JSON::XS: '0'
Sub::Exporter: '0'
Test::Differences: '0'
Test::More: '0.88'
resources:
bugtracker: https://github.com/DrHyde/perl-modules-Algorithm-Diff-JSON/issues
repository: https://github.com/DrHyde/perl-modules-Algorithm-Diff-JSON
version: '1.000'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
Makefile.PL view on Meta::CPAN
META_MERGE => {
license => 'open_source',
resources => {
repository => 'https://github.com/DrHyde/perl-modules-Algorithm-Diff-JSON',
bugtracker => 'https://github.com/DrHyde/perl-modules-Algorithm-Diff-JSON/issues'
},
},
VERSION_FROM => 'lib/Algorithm/Diff/JSON.pm',
PREREQ_PM => {
'Algorithm::Diff' => 0,
'Cpanel::JSON::XS' => 0,
'Sub::Exporter' => 0,
'Test::Differences' => 0,
'Test::More' => 0.88, # done_testing
},
);
lib/Algorithm/Diff/JSON.pm view on Meta::CPAN
package Algorithm::Diff::JSON;
use strict;
use warnings;
use Algorithm::Diff qw(diff);
use Cpanel::JSON::XS qw(encode_json);
use Sub::Exporter -setup => { exports => [ 'json_diff' ] };
our $VERSION = '1.000';
sub json_diff {
my @changes = ();
foreach my $diff (map { @{$_} } diff(@_)) {
my($action, $this_line, $content) = @{$diff};
t/algorithm-diff-json.t view on Meta::CPAN
use strict;
use warnings;
use Algorithm::Diff::JSON 'json_diff' => { -as => 'jsondiff' };
use Cpanel::JSON::XS qw(decode_json);
use Test::Differences;
use Test::More;
eq_or_diff(
decode_json(jsondiff(
file_to_list('t/algorithm-diff-json-base'),
file_to_list('t/algorithm-diff-json-additions'),
)),
[
( run in 0.292 second using v1.01-cache-2.11-cpan-4d50c553e7e )