App-Kit
view release on metacpan or search on metacpan
'File::Path::Tiny' => 0.7,
'Module::Want' => 0.6,
'Cwd' => 0,
'File::Temp' => 0.2304,
'File::Slurp' => 9999.19,
'Path::Iter' => 0,
'File::Spec' => 0,
'FindBin' => 0,
'File::ShareDir' => 0,
'String::UnicodeUTF8' => 0.21,
'Try::Tiny' => 0,
'Import::Into' => 0,
'MIME::Types' => 0,
'DBI' => 0,
'DBD::SQLite' => 0,
'Web::Detect' => 0,
'IO::Interactive::Tiny' => 0,
'Net::Detect' => 0,
'Test::Detect' => 0,
'HTTP::Tiny' => 0, # HTTP::Tiny::Multipart too?
'Locale::Maketext::Utils' => 0,
"Moo" : "0",
"Moo::Role" : "0",
"Net::Detect" : "0",
"Path::Iter" : "0",
"Role::Multiton" : "0",
"Role::Tiny" : "0",
"String::UnicodeUTF8" : "0.21",
"Test::Detect" : "0",
"Test::Exception" : "0",
"Test::More" : "0",
"Try::Tiny" : "0",
"Unix::Whereis" : "0",
"Web::Detect" : "0",
"YAML::Syck" : "1.27"
}
}
},
"release_status" : "stable",
"version" : "0.63",
"x_serialization_backend" : "JSON::PP version 4.04"
}
Moo: '0'
Moo::Role: '0'
Net::Detect: '0'
Path::Iter: '0'
Role::Multiton: '0'
Role::Tiny: '0'
String::UnicodeUTF8: '0.21'
Test::Detect: '0'
Test::Exception: '0'
Test::More: '0'
Try::Tiny: '0'
Unix::Whereis: '0'
Web::Detect: '0'
YAML::Syck: '1.27'
version: '0.63'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
Makefile.PL view on Meta::CPAN
'File::Path::Tiny' => 0.7,
'Module::Want' => 0.6,
'Cwd' => 0,
'File::Temp' => 0.2304,
'File::Slurp' => 9999.19,
'Path::Iter' => 0,
'File::Spec' => 0,
'FindBin' => 0,
'File::ShareDir' => 0,
'String::UnicodeUTF8' => 0.21,
'Try::Tiny' => 0,
'Import::Into' => 0,
'MIME::Types' => 0,
'DBI' => 0,
'DBD::SQLite' => 0,
'Web::Detect' => 0,
'IO::Interactive::Tiny' => 0,
'Net::Detect' => 0,
'Test::Detect' => 0,
'HTTP::Tiny' => 0, # HTTP::Tiny::Multipart too?
'Locale::Maketext::Utils' => 0,
lib/App/Kit.pm view on Meta::CPAN
## no critic (RequireUseStrict) - Moo does strict and warnings
use Moo;
our $VERSION = '0.63';
sub import {
strict->import;
warnings->import;
unless ( defined $_[1] && $_[1] eq '-no-try' ) { # Yoda was right: there *is* -no-try!
require Try::Tiny;
# Try::Tiny->import(); # not like pragma in import, so:
require Import::Into;
my $caller = caller();
Try::Tiny->import::into($caller);
}
}
# tidyoff
with 'Role::Multiton', # Would like to do ::New but that falls apart once you decide to extend() See rt 89239. For now we TODO the multiton-via-new tests
'App::Kit::Role::Log',
'App::Kit::Role::Locale',
'App::Kit::Role::HTTP',
'App::Kit::Role::NS',
'App::Kit::Role::FS',
lib/App/Kit.pm view on Meta::CPAN
App-Kit-Util-RW=1 prove -w t
=head1 INTERFACE
=head2 auto imports
=head3 strict and warnings enabled automatically
=head3 try/catch/finally imported automatically (unless you say not to)
L<Try::Tiny> is enabled automatically unless you pass import() â-no-tryâ flag (Yoda was right: there *is* -no-try!):
use App::Kit '-no-try';
same goes for your App::Kit based object:
use My::App '-no-try';
=head2 constructors: multiton support
=head3 new()
lib/App/Kit.pm view on Meta::CPAN
=head1 CONFIGURATION AND ENVIRONMENT
App::Kit requires no configuration files or environment variables.
If, however, the façade object in question does it will be documented specifically under it.
=head1 DEPENDENCIES
L<Moo> et al.
If you don't pass in -no-try: L<Try::Tiny> and L<Import::Into>
Other modules would be documented above under each façade object that brings them in.
=head1 INCOMPATIBILITIES
None reported.
=head1 BUGS AND LIMITATIONS
No bugs have been reported.
lib/App/Kit/Obj/NS.pm view on Meta::CPAN
#######################
# $app->ns->impose('pragma', 'Mod::Ule', ['foo::bar',1,2,3]);
# maybe if pragmas could happen, otherwise re-think
# Sub::Defer::defer_sub __PACKAGE__ . '::impose' => sub {
# require Import::Into;
# return sub {
# my $self = shift;
# my $caller = caller(1) || caller(0);
#
# for my $class ( @_ ? @_ : qw(strict warnings Try::Tiny Carp) ) {
# my ( $ns, @import_args ) = ref($class) ? @{$class} : ($class);
#
# # ?? if !$self->is_ns($ns);
# $self->have_mod($ns); # or ???
#
# if (@import_args) {
# $ns->import::into( $caller, @import_args );
# }
# else {
# # use Devel::Kit::TAP;
# eval 'print $x;';
# Test::More::ok( $@, 'impose() no args obj: strict' );
#
# my $warn = '';
# local $SIG{__WARN__} = sub {
# $warn = join( '', @_ );
# };
# eval 'print @X[0]';
# Test::More::ok( $warn, 'impose() no args obj: warnings' );
#
# Test::More::ok( defined &try, 'impose() no args obj: Try::Tiny' );
# Test::More::ok( defined &carp, 'impose() no args obj: Carp' );
#
# package main;
# }
# {
#
# package Bar;
#
# # do these no()'s to ensure they are off before testing
# eval 'print $x;';
# Test::More::ok( $@, 'impose() no args class: strict' );
#
# my $warn = '';
# local $SIG{__WARN__} = sub {
# $warn = join( '', @_ );
# };
# eval 'print @X[0]';
# Test::More::ok( $warn, 'impose() no args class: warnings' );
#
# Test::More::ok( defined &try, 'impose() no args class: Try::Tiny' );
# Test::More::ok( defined &carp, 'impose() no args class: Carp' );
#
# package main;
# }
#
# {
# $app->ns->impose( 'integer', [qw(File::Slurp write_file)] );
# is( 10 / 3, 3, 'impose() obj: pragma imposed on caller' );
# ok( defined &write_file, 'impose() obj: module w/ args imposed on caller' );
# }
( run in 0.476 second using v1.01-cache-2.11-cpan-05444aca049 )