Tak
view release on metacpan or search on metacpan
lib/Tak/STDIONode.pm view on Meta::CPAN
my ($target, $name, $code) = @_;
$MAKERS{$target}{exports}{$name} = $code;
_install_coderef "${target}::${name}" => "Moo::${name}" => $code;
}
sub import {
my $target = caller;
my $class = shift;
_set_loaded(caller);
strict->import;
warnings->import;
if ($INC{'Role/Tiny.pm'} and Role::Tiny->is_role($target)) {
die "Cannot import Moo into a role";
}
$MAKERS{$target} ||= {};
_install_tracked $target => extends => sub {
$class->_set_superclasses($target, @_);
$class->_maybe_reset_handlemoose($target);
return;
lib/Tak/STDIONode.pm view on Meta::CPAN
my ($target, $name, $code) = @_;
$INFO{$target}{exports}{$name} = $code;
_install_coderef "${target}::${name}" => "Moo::Role::${name}" => $code;
}
sub import {
my $target = caller;
my ($me) = @_;
_set_loaded(caller);
strict->import;
warnings->import;
if ($Moo::MAKERS{$target} and $Moo::MAKERS{$target}{is_class}) {
die "Cannot import Moo::Role into a Moo class";
}
$INFO{$target} ||= {};
# get symbol table reference
my $stash = _getstash($target);
_install_tracked $target => has => sub {
my $name_proto = shift;
my @name_proto = ref $name_proto eq 'ARRAY' ? @$name_proto : $name_proto;
lib/Tak/STDIONode.pm view on Meta::CPAN
use warnings;
sub import {
if ($ENV{MOO_FATAL_WARNINGS}) {
require strictures;
strictures->VERSION(2);
@_ = ('strictures');
goto &strictures::import;
}
else {
strict->import;
warnings->import;
}
}
1;
MOO__STRICTURES
$fatpacked{"Moo/sification.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MOO_SIFICATION';
package Moo::sification;
lib/Tak/STDIONode.pm view on Meta::CPAN
my $method = "_enable_$version";
if (!$class->can($method)) {
require Carp;
Carp::croak("Major version specified as $version - not supported!");
}
$class->$method($opts);
}
sub _enable_1 {
my ($class, $opts) = @_;
strict->import;
warnings->import(FATAL => 'all');
if (_want_extra($opts->{file})) {
_load_extras(qw(indirect multidimensional bareword::filehandles));
indirect->unimport(':fatal')
if $extra_load_states{indirect};
multidimensional->unimport
if $extra_load_states{multidimensional};
bareword::filehandles->unimport
if $extra_load_states{'bareword::filehandles'};
lib/Tak/STDIONode.pm view on Meta::CPAN
'experimental', # no reason for these to be fatal
'deprecated', # unfortunately can't make these fatal
'portable', # everything worked fine here, just may not elsewhere
);
our @V2_DISABLE = grep { exists $warnings::Offsets{$_} } (
'once' # triggers inconsistently, can't be fatalized
);
sub _enable_2 {
my ($class, $opts) = @_;
strict->import;
warnings->import;
warnings->import(FATAL => @WARNING_CATEGORIES);
warnings->unimport(FATAL => @V2_NONFATAL);
warnings->import(@V2_NONFATAL);
warnings->unimport(@V2_DISABLE);
if (_want_extra($opts->{file})) {
_load_extras(qw(indirect multidimensional bareword::filehandles));
indirect->unimport(':fatal')
if $extra_load_states{indirect};
( run in 0.463 second using v1.01-cache-2.11-cpan-299005ec8e3 )