Plack-App-MCCS

 view release on metacpan or  search on metacpan

local/lib/perl5/IO/Compress/Base.pm  view on Meta::CPAN

        if $outType eq 'buffer' && Scalar::Util::readonly(${ $_[0] });

    return 1;
}


sub _def
{
    my $obj = shift ;

    my $class= (caller)[0] ;
    my $name = (caller(1))[3] ;

    $obj->croakError("$name: expected at least 1 parameters\n")
        unless @_ >= 1 ;

    my $input = shift ;
    my $haveOut = @_ ;
    my $output = shift ;

    my $x = IO::Compress::Base::Validator->new($class, *$obj->{Error}, $name, $input, $output)

local/lib/perl5/IO/Compress/Base/Common.pm  view on Meta::CPAN

#        {
#            return $self->saveErrorString("hash value not ok") ;
#        }
#    }
#
#    return $self ;
#}

sub createSelfTiedObject
{
    my $class = shift || (caller)[0] ;
    my $error_ref = shift ;

    my $obj = bless Symbol::gensym(), ref($class) || $class;
    tie *$obj, $obj if $] >= 5.005;
    *$obj->{Closed} = 1 ;
    $$error_ref = '';
    *$obj->{Error} = $error_ref ;
    my $errno = 0 ;
    *$obj->{ErrorNo} = \$errno ;

local/lib/perl5/IO/Uncompress/Base.pm  view on Meta::CPAN

#    }

    return 1;
}


sub _inf
{
    my $obj = shift ;

    my $class = (caller)[0] ;
    my $name = (caller(1))[3] ;

    $obj->croakError("$name: expected at least 1 parameters\n")
        unless @_ >= 1 ;

    my $input = shift ;
    my $haveOut = @_ ;
    my $output = shift ;


local/lib/perl5/LWP/UserAgent.pm  view on Meta::CPAN

            }
        }
        $self->{conn_cache} = $cache;
    }
    return $old;
}


sub add_handler {
    my($self, $phase, $cb, %spec) = @_;
    $spec{line} ||= join(":", (caller)[1,2]);
    my $conf = $self->{handlers}{$phase} ||= do {
        require HTTP::Config;
        HTTP::Config->new;
    };
    $conf->add(%spec, callback => $cb);
}

sub set_my_handler {
    my($self, $phase, $cb, %spec) = @_;
    $spec{owner} = (caller(1))[3] unless exists $spec{owner};
    $self->remove_handler($phase, %spec);
    $spec{line} ||= join(":", (caller)[1,2]);
    $self->add_handler($phase, $cb, %spec) if $cb;
}

sub get_my_handler {
    my $self = shift;
    my $phase = shift;
    my $init = pop if @_ % 2;
    my %spec = @_;
    my $conf = $self->{handlers}{$phase};
    unless ($conf) {

local/lib/perl5/LWP/UserAgent.pm  view on Meta::CPAN

    my @h = $conf->find(%spec);
    if (!@h && $init) {
        if (ref($init) eq "CODE") {
            $init->(\%spec);
        }
        elsif (ref($init) eq "HASH") {
            $spec{$_}= $init->{$_}
                for keys %$init;
        }
        $spec{callback} ||= sub {};
        $spec{line} ||= join(":", (caller)[1,2]);
        $conf->add(\%spec);
        return \%spec;
    }
    return wantarray ? @h : $h[0];
}

sub remove_handler {
    my($self, $phase, %spec) = @_;
    if ($phase) {
        my $conf = $self->{handlers}{$phase} || return;

local/lib/perl5/Moo/Role.pm  view on Meta::CPAN

    Moo::HandleMoose::inject_fake_metaclass_for($new_name);
  }

  my $lvl = 0;
  my $file;
  while ((my $pack, $file) = caller($lvl++)) {
    if ($pack ne __PACKAGE__ && $pack ne 'Role::Tiny' && !$pack->isa($me)) {
      last;
    }
  }
  _set_loaded($new_name, $file || (caller)[1]);

  return $new_name;
}

sub _gen_apply_defaults_for {
  my ($me, $class, @roles) = @_;

  my @attrs = map @{$INFO{$_}{attributes}||[]}, @roles;

  my $con_gen;

local/lib/perl5/Moo/Role.pm  view on Meta::CPAN

      no_install => 1,
      no_defer => 1,
    }
  );
}

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]);

  if (!exists $APPLY_DEFAULTS{$class}) {
    $APPLY_DEFAULTS{$class} = $me->_gen_apply_defaults_for($class, @roles);
  }
  if (my $apply_defaults = $APPLY_DEFAULTS{$class}) {
    local $Carp::Internal{+__PACKAGE__} = 1;
    local $Carp::Internal{$class} = 1;
    $new->$apply_defaults;
  }
  return $new;

local/lib/perl5/Sort/Versions.pm  view on Meta::CPAN

	} else {
	    $A = uc $A;
	    $B = uc $B;
	    return $A cmp $B if $A cmp $B;
	}	
    }
    @A <=> @B;
}

sub versions () {
    my $callerpkg = (caller)[0];
    my $caller_a = "${callerpkg}::a";
    my $caller_b = "${callerpkg}::b";
    no strict 'refs';
    return versioncmp($$caller_a, $$caller_b);
}

=encoding utf-8

=head1 NAME

local/lib/perl5/oo.pm  view on Meta::CPAN

  exit 0;
}

my $package;
sub import {
  moo() if $0 eq '-';
  $package = $_[1] || 'Class';
  if ($package =~ s/^\+//) {
    _load_module($package);
  }
  my $line = (caller)[2] || 1;
  require Filter::Util::Call;
  my $done;
  Filter::Util::Call::filter_add(sub {
    if (!$done) {
      s{\A}{package $package;\nuse Moo;\n#line $line\n};
      $done = 1;
    }
    return Filter::Util::Call::filter_read();
  });
}

local/lib/perl5/x86_64-linux-thread-multi/AnyEvent.pm  view on Meta::CPAN

   }

   0 # not logged
}

sub _logger($;$) {
   my ($level, $renabled) = @_;

   $$renabled = $level <= $VERBOSE;

   my $logger = [(caller)[0], $level, $renabled];

   $AnyEvent::Log::LOGGER{$logger+0} = $logger;

#   return unless defined wantarray;
# 
#   require AnyEvent::Util;
#   my $guard = AnyEvent::Util::guard (sub {
#      # "clean up"
#      delete $LOGGER{$logger+0};
#   });

local/lib/perl5/x86_64-linux-thread-multi/AnyEvent/Log.pm  view on Meta::CPAN

      }
   while $ctx = pop @ctx;

   fatal_exit if $level <= 1;

   $success
}

sub log($$;@) {
   _log
      $CTX{ (caller)[0] } ||= _pkg_ctx +(caller)[0],
      @_;
}

=item $logger = AnyEvent::Log::logger $level[, \$enabled]

Creates a code reference that, when called, acts as if the
C<AnyEvent::Log::log> function was called at this point with the given
level. C<$logger> is passed a C<$msg> and optional C<@args>, just as with
the C<AnyEvent::Log::log> function:

local/lib/perl5/x86_64-linux-thread-multi/AnyEvent/Log.pm  view on Meta::CPAN

   sub {
      $guard if 0; # keep guard alive, but don't cause runtime overhead

      _log $ctx, $level, @_
         if $$renabled;
   }
}

sub logger($;$) {
   _logger
      $CTX{ (caller)[0] } ||= _pkg_ctx +(caller)[0],
      @_
}

=item AnyEvent::Log::exact_time $on

By default, C<AnyEvent::Log> will use C<AE::now>, i.e. the cached
eventloop time, for the log timestamps. After calling this function with a
true value it will instead resort to C<AE::time>, i.e. fetch the current
time on each log message. This only makes a difference for event loops
that actually cache the time (such as L<EV> or L<AnyEvent::Loop>).

local/lib/perl5/x86_64-linux-thread-multi/AnyEvent/Log.pm  view on Meta::CPAN

returned. If it is called without any arguments, then the context for the
callers package is returned (i.e. the same context as a C<AE::log> call
would use).

If C<undef> is given, then it creates a new anonymous context that is not
tied to any package and is destroyed when no longer referenced.

=cut

sub ctx(;$) {
   my $pkg = @_ ? shift : (caller)[0];

   ref $pkg
      ? $pkg
      : defined $pkg
         ? $CTX{$pkg} ||= AnyEvent::Log::_pkg_ctx $pkg
         : bless [undef, (1 << 10) - 1 - 1], "AnyEvent::Log::Ctx"
}

=item AnyEvent::Log::reset

local/lib/perl5/x86_64-linux-thread-multi/Class/MOP/Class.pm  view on Meta::CPAN

        destructor_class   => $self->destructor_class,
        @args,
    );
}

sub make_immutable {
    my ( $self, @args ) = @_;

    return $self unless $self->is_mutable;

    my ($file, $line) = (caller)[1..2];

    $self->_initialize_immutable(
        file => $file,
        line => $line,
        $self->_immutable_options(@args),
    );
    $self->_rebless_as_immutable(@args);

    return $self;
}



( run in 2.216 seconds using v1.01-cache-2.11-cpan-a3c8064c92c )