App-JsonLogUtils
view release on metacpan or search on metacpan
"develop" : {
"requires" : {
"Test::Pod" : "1.41"
}
},
"runtime" : {
"requires" : {
"Fcntl" : "0",
"Getopt::Long" : "0",
"Iterator::Simple" : "0",
"JSON::XS" : "0",
"List::Util" : "0",
"Pod::Usage" : "0",
"Term::ReadLine" : "0",
"Term::SimpleColor" : "0",
"Time::HiRes" : "0",
"parent" : "0"
}
},
"test" : {
"recommends" : {
"CPAN::Meta" : "2.120900"
},
"requires" : {
"ExtUtils::MakeMaker" : "0",
"File::Spec" : "0",
"JSON::XS" : "0",
"Test2::V0" : "0",
"Test::More" : "0",
"Test::Pod" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/sysread/App-JsonLogUtils/issues"
},
"homepage" : "https://github.com/sysread/App-JsonLogUtils",
"repository" : {
"type" : "git",
"url" : "https://github.com/sysread/App-JsonLogUtils.git",
"web" : "https://github.com/sysread/App-JsonLogUtils"
}
},
"version" : "0.03",
"x_generated_by_perl" : "v5.28.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.06"
}
---
abstract: 'Command line utilities for dealing with JSON-formatted log files'
author:
- 'Jeff Ober <sysread@fastmail.fm>'
build_requires:
ExtUtils::MakeMaker: '0'
File::Spec: '0'
JSON::XS: '0'
Test2::V0: '0'
Test::More: '0'
Test::Pod: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: App-JsonLogUtils
requires:
Fcntl: '0'
Getopt::Long: '0'
Iterator::Simple: '0'
JSON::XS: '0'
List::Util: '0'
Pod::Usage: '0'
Term::ReadLine: '0'
Term::SimpleColor: '0'
Time::HiRes: '0'
parent: '0'
resources:
bugtracker: https://github.com/sysread/App-JsonLogUtils/issues
homepage: https://github.com/sysread/App-JsonLogUtils
repository: https://github.com/sysread/App-JsonLogUtils.git
Makefile.PL view on Meta::CPAN
"bin/jcut",
"bin/jgrep",
"bin/jshell"
],
"LICENSE" => "perl",
"NAME" => "App::JsonLogUtils",
"PREREQ_PM" => {
"Fcntl" => 0,
"Getopt::Long" => 0,
"Iterator::Simple" => 0,
"JSON::XS" => 0,
"List::Util" => 0,
"Pod::Usage" => 0,
"Term::ReadLine" => 0,
"Term::SimpleColor" => 0,
"Time::HiRes" => 0,
"parent" => 0
},
"TEST_REQUIRES" => {
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"JSON::XS" => 0,
"Test2::V0" => 0,
"Test::More" => 0,
"Test::Pod" => 0
},
"VERSION" => "0.03",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"ExtUtils::MakeMaker" => 0,
"Fcntl" => 0,
"File::Spec" => 0,
"Getopt::Long" => 0,
"Iterator::Simple" => 0,
"JSON::XS" => 0,
"List::Util" => 0,
"Pod::Usage" => 0,
"Term::ReadLine" => 0,
"Term::SimpleColor" => 0,
"Test2::V0" => 0,
"Test::More" => 0,
"Test::Pod" => 0,
"Time::HiRes" => 0,
"parent" => 0
);
# ABSTRACT: filters fields in JSON output
# PODNAME: jcut
use strict;
use warnings;
$0 = 'jcut';
use Getopt::Long;
use Pod::Usage;
use JSON::XS qw(encode_json);
use App::JsonLogUtils qw(lines json_cut);
my $help = 0;
my $inverse = 0;
my $fields = '';
GetOptions(
'help' => \$help,
'fields=s' => \$fields,
'complement' => \$inverse,
requires 'Fcntl' => 0;
requires 'Getopt::Long' => 0;
requires 'Iterator::Simple' => 0;
requires 'JSON::XS' => 0;
requires 'List::Util' => 0;
requires 'Pod::Usage' => 0;
requires 'Term::ReadLine' => 0;
requires 'Term::SimpleColor' => 0;
requires 'Time::HiRes' => 0;
requires 'parent' => 0;
on test => sub {
requires 'Test2::V0' => '0';
requires 'Test::Pod' => '0';
requires 'JSON::XS' => '0';
};
lib/App/JsonLogUtils.pm view on Meta::CPAN
package App::JsonLogUtils;
# ABSTRACT: Command line utilities for dealing with JSON-formatted log files
$App::JsonLogUtils::VERSION = '0.03';
use strict;
use warnings;
use Fcntl qw(:seek);
use Iterator::Simple qw(iterator iter igrep imap ichain);
use JSON::XS qw(decode_json encode_json);
use Time::HiRes qw(sleep);
use Term::SimpleColor;
use parent 'Exporter';
our @EXPORT_OK = qw(
lines
tail
json_log
json_cols
t/00-report-prereqs.dd view on Meta::CPAN
'develop' => {
'requires' => {
'Test::Pod' => '1.41'
}
},
'runtime' => {
'requires' => {
'Fcntl' => '0',
'Getopt::Long' => '0',
'Iterator::Simple' => '0',
'JSON::XS' => '0',
'List::Util' => '0',
'Pod::Usage' => '0',
'Term::ReadLine' => '0',
'Term::SimpleColor' => '0',
'Time::HiRes' => '0',
'parent' => '0'
}
},
'test' => {
'recommends' => {
'CPAN::Meta' => '2.120900'
},
'requires' => {
'ExtUtils::MakeMaker' => '0',
'File::Spec' => '0',
'JSON::XS' => '0',
'Test2::V0' => '0',
'Test::More' => '0',
'Test::Pod' => '0'
}
}
};
$x;
}
use strict;
use warnings;
use Test2::V0;
use JSON::XS;
use App::JsonLogUtils qw(lines json_cols);
my @log = (
{a => 1, b => 2, c => 3},
{a => 1, b => 2, c => 3},
{a => 1, b => 2, c => 3},
);
my $log = join "\n", map{ encode_json $_ } @log;
use strict;
use warnings;
use Test2::V0;
use JSON::XS;
use App::JsonLogUtils qw(lines json_cut);
my @log = (
{a => 1, b => 2, c => 3},
{a => 1, b => 2, c => 3},
{a => 1, b => 2, c => 3},
);
my $log = join "\n", map{ encode_json $_ } @log;
( run in 0.808 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )