view release on metacpan or search on metacpan
use 5.008_001;
use strict;
use warnings;
use utf8;
use Module::Build;
use File::Basename;
use File::Spec;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Auth/Site/Hatena.pm view on Meta::CPAN
1;
__END__
=encoding utf8
=head1 NAME
Amon2::Auth::Site::Hatena - Hatena authentication integration for Amon2
view all matches for this distribution
view release on metacpan or search on metacpan
use 5.008_001;
use strict;
use warnings;
use utf8;
use Module::Build;
use File::Basename;
use File::Spec;
use CPAN::Meta;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Auth/Site/LINE.pm view on Meta::CPAN
package Amon2::Auth::Site::LINE;
use strict;
use warnings;
use utf8;
use URI;
use JSON;
use Mouse;
use LWP::UserAgent;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Auth.pm view on Meta::CPAN
our $VERSION = '0.07';
1;
__END__
=encoding utf8
=head1 NAME
Amon2::Auth - Authentication module for Amon2
view all matches for this distribution
view release on metacpan or search on metacpan
=encoding utf8
This is Perl module B<Amon2::CLI>.
=begin html
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/DBI.pm view on Meta::CPAN
}
if ($dsn =~ /^dbi:SQLite:/i) {
$attr->{sqlite_unicode} = 1 unless exists $attr->{sqlite_unicode};
}
elsif ($dsn =~ /^dbi:mysql:/i) {
$attr->{mysql_enable_utf8} = 1 unless exists $attr->{mysql_enable_utf8};
}
elsif ($dsn =~ /^dbi:Pg:/i) {
my $dbd_pg_version = eval { require DBD::Pg; (DBD::Pg->VERSION =~ /^([.0-9]+)\./)[0] };
if ( !$@ and $dbd_pg_version < 2.99 ) { # less than DBD::Pg 2.99, pg_enable_utf8 must be set for utf8.
$attr->{pg_enable_utf8} = 1 unless exists $attr->{pg_enable_utf8};
}
}
my $self = $class->SUPER::connect($dsn, $user, $pass, $attr) or die "Cannot connect to server: $DBI::errstr";
return $self;
}
lib/Amon2/DBI.pm view on Meta::CPAN
sub sql { $_[0]->{private_sql} }
1;
__END__
=encoding utf8
=head1 NAME
Amon2::DBI - Simple DBI wrapper
lib/Amon2/DBI.pm view on Meta::CPAN
=item Set AutoInactiveDestroy to true.
If your DBI version is higher than 1.614, Amon2::DBI set AutoInactiveDestroy as true.
=item Set sqlite_unicode and mysql_enable_utf8 and pg_enable_utf8 automatically
Amon2::DBI set sqlite_unicode and mysql_enable_utf8 automatically.
If using DBD::Pg version less than 2.99, pg_enable_utf8 too.
=item Nested transaction management.
Amon2::DBI supports nested transaction management based on RAII like DBIx::Class or DBIx::Skinny. It uses L<DBIx::TransactionManager> internally.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Lite.pm view on Meta::CPAN
1;
__END__
=for stopwords TinyURL
=encoding utf8
=head1 NAME
Amon2::Lite - Sinatra-ish framework on Amon2!
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/MobileJP.pm view on Meta::CPAN
package Amon2::MobileJP;
use strict;
use warnings;
use utf8;
use 5.008_001;
our $VERSION = '0.11';
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/01_simple.t view on Meta::CPAN
use Encode;
use File::Spec;
sub dispatch {
my $c = shift;
$c->create_response(200, [], [ encode( utf8 => $c->loc('Hello, %1', 'yappo') ) ]);
}
}
my $app = MyApp::Web->to_app;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Plugin/LogDispatch.pm view on Meta::CPAN
}
1;
__END__
=encoding utf8
=head1 NAME
Amon2::Plugin::LogDispatch - Log::Dispatch glue for Amon2
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Plugin/ShareDir.pm view on Meta::CPAN
}
1;
__END__
=encoding utf8
=head1 NAME
Amon2::Plugin::ShareDir - (EXPERIMENTAL) share directory
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Plugin/Web/CSRFDefender/Random.pm view on Meta::CPAN
package Amon2::Plugin::Web::CSRFDefender::Random;
use strict;
use warnings;
use utf8;
use 5.008_001;
# DO NOT USE THIS DIRECTLY.
use MIME::Base64 ();
view all matches for this distribution
view release on metacpan or search on metacpan
=encoding utf8
This is Perl module B<Amon2::Plugin::Web::ChromeLogger>.
=begin html
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Plugin/Web/CpanelJSON.pm view on Meta::CPAN
__PACKAGE__->load_plugins(
'Web::CpanelJSON' => {
json => {
ascii => 0,
utf8 => 1,
canonical => 1,
}
}
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Plugin/Web/FillInForm.pm view on Meta::CPAN
1;
__END__
=encoding utf8
=head1 NAME
Amon2::Plugin::Web::FillInForm - HTML::FillInForm with Amon2
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Plugin/Web/Flash.pm view on Meta::CPAN
package Amon2::Plugin::Web::Flash;
use strict;
use warnings;
use utf8;
our $VERSION = '0.05';
use Amon2::Util;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Plugin/Web/FormValidator/Simple.pm view on Meta::CPAN
package Amon2::Plugin::Web::FormValidator::Simple;
use utf8;
use strict;
use warnings;
use 5.008001;
our $VERSION = '0.04';
view all matches for this distribution
view release on metacpan or search on metacpan
use 5.008_001;
use strict;
use warnings;
use utf8;
use Module::Build;
use File::Basename;
use File::Spec;
use CPAN::Meta;
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
Exporter 5.57
ExtUtils::MakeMaker 0
MIME::Base64 2
parent 0
perl 5.008001
utf8 0
WWW-Mechanize-1.73
pathname: E/ET/ETHER/WWW-Mechanize-1.73.tar.gz
provides:
WWW::Mechanize 1.73
WWW::Mechanize::Image undef
view all matches for this distribution
view release on metacpan or search on metacpan
=encoding utf8
This is Perl module B<Amon2::Plugin::Web::Woothee>.
=begin html
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Setup/Flavor/Teng.pm view on Meta::CPAN
use strict;
use warnings;
use utf8;
package Amon2::Setup::Flavor::Teng;
use parent qw(Amon2::Setup::Flavor);
our $VERSION = '0.05';
lib/Amon2/Setup/Flavor/Teng.pm view on Meta::CPAN
$self->write_file('lib/<<PATH>>.pm', <<'...');
package <% $module %>;
use strict;
use warnings;
use utf8;
use parent qw/Amon2/;
use 5.008001;
__PACKAGE__->load_plugin(qw/DBI/);
lib/Amon2/Setup/Flavor/Teng.pm view on Meta::CPAN
$self->write_file('lib/<<PATH>>/DB.pm', <<'...');
package <% $module %>::DB;
use strict;
use warnings;
use utf8;
use parent qw(Teng);
1;
...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Web/Dispatcher/RouterSimple/Extended.pm view on Meta::CPAN
package MyApp::Web::Dispatcher;
use strict;
use warnings;
use utf8;
use Amon2::Web::Dispatcher::RouterSimple::Extended;
connect '/' => 'Root#index';
# API
submapper '/api/' => API => sub {
get 'foo' => 'foo';
view all matches for this distribution
view release on metacpan or search on metacpan
author/assets.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use 5.008001;
use lib 'lib';
use LWP::UserAgent;
use autodie;
use Data::Dumper;
author/assets.pl view on Meta::CPAN
return data ? fn( data ) : fn;
};
})();
...
open my $fh, '>:utf8', 'lib/Amon2/Setup/Asset/MicroTemplateJS.pm';
print {$fh} $xslate->render_string(<<'...', +{ file => $0, basename => 'micro_template.js', data => Dumper({ 'js/micro_template.js' => $content})});
# This file is generated by <% file %>. Do not edit manually.
package Amon2::Setup::Asset::MicroTemplateJS;
use strict;
use warnings;
author/assets.pl view on Meta::CPAN
my $res = $ua->get($url);
$res->is_success or die "Cannot fetch $url: " . $res->status_line;
my $content = $res->decoded_content;
open my $fh, '>:utf8', "lib/Amon2/Setup/Asset/${name}.pm";
print {$fh} $xslate->render_string(<<'...', +{ file => $0, basename => basename($url), name => $name, data => Dumper({ 'js/' . basename($url) => $content})});
# This file is generated by <% file %>. Do not edit manually.
package Amon2::Setup::Asset::<% name %>;
use strict;
use warnings;
author/assets.pl view on Meta::CPAN
my $url = 'http://code.jquery.com/jquery-3.6.1.min.js';
my $res = $ua->get($url);
$res->is_success or die "Cannot fetch $url: " . $res->status_line;
my $jquery = $res->decoded_content;
open my $fh, '>:utf8', 'lib/Amon2/Setup/Asset/jQuery.pm';
print {$fh} $xslate->render_string(<<'...', +{ file => $0, basename => basename($url), data => Dumper({ 'js/' . basename($url) => $jquery})});
# This file is generated by <% file %>. Do not edit manually.
package Amon2::Setup::Asset::jQuery;
use strict;
use warnings;
author/assets.pl view on Meta::CPAN
}
1;
...
open my $fh, '>:utf8', 'lib/Amon2/Setup/Asset/Bootstrap.pm';
print {$fh} $content;
close $fh;
eval "use Amon2::Setup::Asset::Bootstrap;";
die $@ if $@;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amp/Util/Strings.pm view on Meta::CPAN
sub json_encode {
my $self = shift;
my $string = shift;
my $opts = shift;
my $json = JSON->new->allow_nonref->allow_blessed->utf8;
if ($opts->{pretty}) {
$json->pretty(1);
}
if ($opts->{indent}) {
$json->indent(1);
lib/Amp/Util/Strings.pm view on Meta::CPAN
}
sub json_decode {
my $self = shift;
my $string = shift;
my $json = JSON->new->allow_nonref->allow_blessed->utf8;
my $data;
if (defined $string) {
$data = $json->decode($string);
}
return $data;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Android/Build.pm view on Meta::CPAN
# Tests and documentation
sub test
{my $p = __PACKAGE__;
binmode($_, ":utf8") for *STDOUT, *STDERR;
return if eval "eof(${p}::DATA)";
my $s = eval "join('', <${p}::DATA>)";
$@ and die $@;
eval $s;
$@ and die $@;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Android/ElectricSheep/Automator.pm view on Meta::CPAN
}
# only pod below
=pod
=encoding utf8
=head1 NAME
Android::ElectricSheep::Automator - Do Androids Dream of Electric Sheep? Smartphone control from your desktop.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Anego.pm view on Meta::CPAN
package Anego;
use 5.008001;
use strict;
use warnings;
use utf8;
our $VERSION = "0.02";
1;
view all matches for this distribution
view release on metacpan or search on metacpan
author/benchmark.pl view on Meta::CPAN
use strict;
use warnings;
use utf8;
use feature qw/say/;
use lib 'lib';
use SampleDbic::Schema;
use SampleAniki::DB;
view all matches for this distribution
view release on metacpan or search on metacpan
script/ansible-perl view on Meta::CPAN
my $res=$t->exec_module($ENV{ANSIBLE_MODULE},decode_json($ENV{ANSIBLE_ARGS}));
print "Output from $ENV{ANSIBLE_MODULE}: ". dumper($t->last_response);
print "Response code: $res\n";
=encoding utf8
=head1 NAME
test_ansible_module - Test ansible modules on the command line
view all matches for this distribution