RogersMine
view release on metacpan or search on metacpan
local/lib/perl5/Moo/Role.pm view on Meta::CPAN
else {
$me->SUPER::create_class_with_roles($superclass, @roles);
$Moo::MAKERS{$new_name} = {is_class => 1};
$me->_handle_constructor($new_name, $_) for @roles;
}
if ($INC{'Moo/HandleMoose.pm'} && !$Moo::sification::disabled) {
Moo::HandleMoose::inject_fake_metaclass_for($new_name);
}
$COMPOSED{class}{$new_name} = 1;
_set_loaded($new_name, (caller)[1]);
return $new_name;
}
sub apply_roles_to_object {
my ($me, $object, @roles) = @_;
my $new = $me->SUPER::apply_roles_to_object($object, @roles);
my $class = ref $new;
_set_loaded($class, (caller)[1]);
my $apply_defaults = exists $APPLY_DEFAULTS{$class} ? $APPLY_DEFAULTS{$class}
: $APPLY_DEFAULTS{$class} = do {
my %attrs = map { @{$INFO{$_}{attributes}||[]} } @roles;
if ($INC{'Moo.pm'}
and keys %attrs
and my $con_gen = Moo->_constructor_maker_for($class)
and my $m = Moo->_accessor_maker_for($class)) {
local/lib/perl5/strictures.pm view on Meta::CPAN
our $Smells_Like_VCS;
sub import {
my $class = shift;
my %opts = @_ == 1 ? %{$_[0]} : @_;
if (!exists $opts{version}) {
$opts{version}
= exists $^H{strictures_enable} ? delete $^H{strictures_enable}
: int $VERSION;
}
$opts{file} = (caller)[1];
$class->_enable(\%opts);
}
sub _enable {
my ($class, $opts) = @_;
my $version = $opts->{version};
$version = 'undef'
if !defined $version;
my $method = "_enable_$version";
if (!$class->can($method)) {
local/lib/perl5/strictures.pm view on Meta::CPAN
malloc
newline
experimental
deprecated
portable
);
no warnings 'once';
except when called from a file which matches:
(caller)[1] =~ /^(?:t|xt|lib|blib)[\\\/]/
and when either C<.git>, C<.svn>, C<.hg>, or C<.bzr> is present in the current
directory (with the intention of only forcing extra tests on the author side)
-- or when C<.git>, C<.svn>, C<.hg>, or C<.bzr> is present two directories up
along with C<dist.ini> (which would indicate we are in a C<dzil test> operation,
via L<Dist::Zilla>) -- or when the C<PERL_STRICTURES_EXTRA> environment variable
is set, in which case it also does the equivalent of
no indirect 'fatal';
no multidimensional;
( run in 2.003 seconds using v1.01-cache-2.11-cpan-a3c8064c92c )