view release on metacpan or search on metacpan
lib/Acme/Globus.pm view on Meta::CPAN
use strict;
use warnings;
use Carp ;
use JSON ;
use Net::OpenSSH ;
=pod
=head1 NAME
view all matches for this distribution
view release on metacpan or search on metacpan
snippets/NERDVANA/delorean_options.pl
snippets/SLU/MAZE.BAS
snippets/SLU/schwartzian_transform.pl
CONTRIBUTING.md
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
"Dist::Zilla::Plugin::GithubMeta" : "0",
"Dist::Zilla::Plugin::InsertCopyright" : "0",
"Dist::Zilla::Plugin::License" : "0",
"Dist::Zilla::Plugin::MakeMaker" : "0",
"Dist::Zilla::Plugin::Manifest" : "0",
"Dist::Zilla::Plugin::MetaJSON" : "0",
"Dist::Zilla::Plugin::MetaNoIndex" : "0",
"Dist::Zilla::Plugin::MetaProvides::Package" : "0",
"Dist::Zilla::Plugin::MetaTests" : "0",
"Dist::Zilla::Plugin::MetaYAML" : "0",
"Dist::Zilla::Plugin::MinimumPerl" : "0",
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
}
sub write_mymeta_json {
my $self = shift;
# We need JSON to write the MYMETA.json file
unless ( eval { require JSON; 1; } ) {
return 1;
}
# Generate the data
my $meta = $self->_write_mymeta_data or return 1;
# Save as the MYMETA.yml file
print "Writing MYMETA.json\n";
Module::Install::_write(
'MYMETA.json',
JSON->new->pretty(1)->canonical->encode($meta),
);
}
sub _write_mymeta_data {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
"url" : "git://github.com/imacat/Acme-GuessNumber.git",
"web" : "https://github.com/imacat/Acme-GuessNumber"
}
},
"version" : "0.05",
"x_serialization_backend" : "JSON::PP version 2.97001"
}
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST This list of files
MANIFEST.SKIP
README
t/001Basic.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
"web" : "https://github.com/tomcha/Acme-Helloworld"
}
},
"version" : "0.01",
"x_authority" : "cpan:TOMCHA",
"x_serialization_backend" : "JSON::PP version 2.27300"
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
}
sub write_mymeta_json {
my $self = shift;
# We need JSON to write the MYMETA.json file
unless ( eval { require JSON; 1; } ) {
return 1;
}
# Generate the data
my $meta = $self->_write_mymeta_data or return 1;
# Save as the MYMETA.yml file
print "Writing MYMETA.json\n";
Module::Install::_write(
'MYMETA.json',
JSON->new->pretty(1)->canonical->encode($meta),
);
}
sub _write_mymeta_data {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
"web" : "https://codeberg.org/ilmari/Acme-Holy-Shit-Here-Come-s-An-S/"
}
},
"version" : "0.003",
"x_generated_by_perl" : "v5.40.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.39",
"x_spdx_expression" : "MIT"
}
view all matches for this distribution
view release on metacpan or search on metacpan
"x_authority" : "cpan:HAYAJO",
"x_contributors" : [
"hayajo <hayato.imai@gmail.com>",
"ä»äºé¼äºº <imai.h@imaihayato-no-MacBook-Pro.local>"
],
"x_serialization_backend" : "JSON::PP version 2.27400_02"
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/manifest.t
t/pod-coverage.t
t/pod.t
xt/boilerplate.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "0.02",
"x_authority" : "cpan:ANATOFUZ",
"x_contributors" : [
"AnaTofuZ <e155730@ie.u-ryukyu.ac.jp>"
],
"x_serialization_backend" : "JSON::PP version 2.27300"
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-load.t
t/manifest.t
t/pod-coverage.t
t/pod.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
"web" : "https://github.com/sanko/Acme-ICan-tBelieveItCanSort"
}
},
"version" : "0.01",
"x_authority" : "cpan:SANKO",
"x_serialization_backend" : "JSON::PP version 4.06",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/manifest.t
t/pod-coverage.t
t/pod.t
xt/boilerplate.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
"class" : "Dist::Zilla::Plugin::IfBuilt",
"name" : "@Author::PERLANCAR/IfBuilt",
"version" : "0.03"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@Author::PERLANCAR/MetaJSON",
"version" : "6.014"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Author::PERLANCAR/MetaConfig",
"version" : "6.014"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.19",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/02reverse.t
t/98podsyn.t
t/99podcov.t
eg/example.pl
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
"url" : "https://github.com/sanko/Acme-Image-Stb.git",
"web" : "https://github.com/sanko/Acme-Image-Stb"
}
},
"version" : "0.01",
"x_serialization_backend" : "JSON::PP version 4.16",
"x_static_install" : 0
}
view all matches for this distribution
view release on metacpan or search on metacpan
"license" : [
"http://www.perlfoundation.org/artistic_license_2_0"
]
},
"version" : "0.01",
"x_serialization_backend" : "JSON::PP version 4.02"
}
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST This list of files
MANIFEST.SKIP
README
t/Acme-Include-Data.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
t/10b-input-record-separator.t
t/manifest.t
t/pod-coverage.t
t/pod.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Insult/Evil.pm view on Meta::CPAN
package Acme::Insult::Evil 1.1 { # https://www.freepublicapis.com/evil-insult-generator
use v5.38;
use HTTP::Tiny;
use JSON::Tiny qw[decode_json];
use URI;
use parent 'Exporter';
our %EXPORT_TAGS = ( all => [ our @EXPORT_OK = qw[insult] ] );
#
use overload '""' => sub ( $s, $u, $b ) { $s->{insult} // () };
lib/Acme/Insult/Evil.pm view on Meta::CPAN
//= HTTP::Tiny->new( default_headers => { Accept => 'application/json' }, agent => sprintf '%s/%.2f ', __PACKAGE__, our $VERSION );
state $api //= URI->new('https://evilinsult.com/generate_insult.php');
# API accepts languages as a param named 'lang' but returns the language in a field called 'language'... why?
$api->query_form( type => 'json', ( defined $params{language} ? ( lang => delete $params{language} ) : () ), %params );
my $res = $http->get($api); # {success} is true even when advice is not found but we'll at least know when we have valid JSON
$res->{success} ? decode_json( $res->{content} ) : ();
}
#
sub insult (%args) { my $ref = _http(%args); $ref ? bless $ref, __PACKAGE__ : $ref }
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Insult/Glax.pm view on Meta::CPAN
package Acme::Insult::Glax 1.1 { # https://www.freepublicapis.com/insult-api
use v5.38;
use HTTP::Tiny;
use JSON::Tiny qw[decode_json];
use URI;
use parent 'Exporter';
our %EXPORT_TAGS = ( all => [ our @EXPORT_OK = qw[insult adjective] ] );
#
use overload '""' => sub ( $s, $u, $b ) { $s->{insult} // () };
lib/Acme/Insult/Glax.pm view on Meta::CPAN
sub _http ( $endpoint, %params ) {
state $http
//= HTTP::Tiny->new( default_headers => { Accept => 'application/json' }, agent => sprintf '%s/%.2f ', __PACKAGE__, our $VERSION );
( my $hey = $api->clone )->path( '/api/' . $endpoint . '.json' );
$hey->query_form(%params);
my $res = $http->get( $hey->as_string ); # {success} is true even when advice is not found but we'll at least know when we have valid JSON
$res->{success} ? decode_json( $res->{content} ) : ();
}
#
sub insult (%args) { my $ref = _http( insult => %args ); $ref ? bless $ref, __PACKAGE__ : $ref }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Insult/Pirate.pm view on Meta::CPAN
package Acme::Insult::Pirate 1.1 {
use v5.38;
use HTTP::Tiny;
#~ use JSON::Tiny qw[decode_json]; # Not needed here (yet)
use URI;
use parent 'Exporter';
our %EXPORT_TAGS = ( all => [ our @EXPORT_OK = qw[insult] ] );
#
use overload '""' => sub ( $s, $u, $b ) { $s->{insult} // () };
lib/Acme/Insult/Pirate.pm view on Meta::CPAN
state $http
//= HTTP::Tiny->new( default_headers => { Accept => 'application/json' }, agent => sprintf '%s/%.2f ', __PACKAGE__, our $VERSION );
state $api //= URI->new('https://pirate.monkeyness.com/api/insult');
#~ $api->query_form( %params );
my $res = $http->get($api); # {success} is true even when advice is not found but we'll at least know when we have valid JSON
# This API only returns strings for now
#~ $res->{success} ? decode_json( $res->{content} ) : ();
$res->{success} ? { insult => $res->{content} } : ();
}
view all matches for this distribution
view release on metacpan or search on metacpan
script/insult.pl view on Meta::CPAN
#
my $raw = 0;
my $flavor;
sub _echo ($insult) {
$raw && eval 'require JSON::Tiny' ? JSON::Tiny::encode_json( {%$insult} ) : $insult;
}
GetOptions(
\my %h, 'language=s',
'help' => sub { pod2usage( -exitval => 1 ) },
'flavors!' => sub { exit !say 'Supported insult flavors: ' . join ', ', Acme::Insult::flavors() },
script/insult.pl view on Meta::CPAN
insult -pirate # generate a pirate themed insult
insult -help # get help
=head1 OPTIONS
-json Echo raw JSON encoded data
-flavors List supported insult flavors
-glax Generate an insult with Acme::Insult::Glax
-evil Generate an insult with Acme::Insult::Evil
-pirate Generate an insult with Acme::Insult::Pirate
-help Display this help message
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST
Makefile.PL
lib/Acme/Iota.pm
t/iota.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/IsItJSON.pm view on Meta::CPAN
package Acme::IsItJSON;
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw/is_it_json/;
%EXPORT_TAGS = (
all => \@EXPORT_OK,
);
use warnings;
use strict;
use Carp;
use JSON::Parse qw/parse_json valid_json/;
use JSON::Create 'create_json';
our $VERSION = '0.02';
my @responses = (
"That seems to be {X}.",
"That might be {X}.",
lib/Acme/IsItJSON.pm view on Meta::CPAN
sub is_it_json
{
my ($input) = @_;
if (valid_json ($input)) {
babble ('JSON');
}
else {
babble ('a Perl data structure');
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-load.t
t/manifest.t
t/pod-coverage.t
t/pod.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
t/manifest.t
t/pod-coverage.t
t/pod.t
t/sum.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "1.182081",
"x_contributor_covenant" : {
"version" : 0.02
},
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0239"
}
view all matches for this distribution