Tak

 view release on metacpan or  search on metacpan

lib/Tak/STDIONode.pm  view on Meta::CPAN

    }
  
    my $m;
    if ($INC{"Moo.pm"}
        and $m = Moo->_accessor_maker_for($superclass)
        and ref($m) ne 'Method::Generate::Accessor') {
      # old fashioned way time.
      *{_getglob("${new_name}::ISA")} = [ $superclass ];
      $Moo::MAKERS{$new_name} = {is_class => 1};
      $me->apply_roles_to_package($new_name, @roles);
      _set_loaded($new_name, (caller)[1]);
      return $new_name;
    }
  
    $me->SUPER::create_class_with_roles($superclass, @roles);
  
    foreach my $role (@roles) {
      die "${role} is not a Moo::Role" unless $me->is_role($role);
    }
  
    $Moo::MAKERS{$new_name} = {is_class => 1};
  
    $me->_handle_constructor($new_name, $_) for @roles;
  
    _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);
    _set_loaded(ref $new, (caller)[1]);
  
    my $apply_defaults = $APPLY_DEFAULTS{ref $new} ||= do {
      my %attrs = map { @{$INFO{$_}{attributes}||[]} } @roles;
  
      if ($INC{'Moo.pm'}
          and keys %attrs
          and my $con_gen = Moo->_constructor_maker_for(ref $new)
          and my $m = Moo->_accessor_maker_for(ref $new)) {
        require Sub::Quote;
  

lib/Tak/STDIONode.pm  view on Meta::CPAN

  our $Smells_Like_VCS;
  
  sub import {
    my $class = shift;
    my %opts = ref $_[0] ? %{$_[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)) {

lib/Tak/STDIONode.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>, or C<.hg> is present in the current directory
  (with the intention of only forcing extra tests on the author side) -- or when
  C<.git>, C<.svn>, or C<.hg> 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 1.274 second using v1.01-cache-2.11-cpan-a3c8064c92c )