APR-Emulate-PSGI
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
$class =~ s/^\Q$args{prefix}\E:://;
$args{name} ||= $class;
$args{version} ||= $class->VERSION;
unless ( $args{path} ) {
$args{path} = $args{name};
$args{path} =~ s!::!/!g;
}
$args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm";
$args{wrote} = 0;
bless( \%args, $class );
}
sub call {
my ($self, $method) = @_;
my $obj = $self->load($method) or return;
splice(@_, 0, 2, $obj);
goto &{$obj->can($method)};
}
sub load {
inc/Module/Install/Base.pm view on Meta::CPAN
#line 42
sub new {
my $class = shift;
unless ( defined &{"${class}::call"} ) {
*{"${class}::call"} = sub { shift->_top->call(@_) };
}
unless ( defined &{"${class}::load"} ) {
*{"${class}::load"} = sub { shift->_top->load(@_) };
}
bless { @_ }, $class;
}
#line 61
sub AUTOLOAD {
local $@;
my $func = eval { shift->_top->autoload } or return;
goto &$func;
}
inc/Module/Install/Base.pm view on Meta::CPAN
package Module::Install::Base::FakeAdmin;
use vars qw{$VERSION};
BEGIN {
$VERSION = $Module::Install::Base::VERSION;
}
my $fake;
sub new {
$fake ||= bless(\@_, $_[0]);
}
sub AUTOLOAD {}
sub DESTROY {}
# Restore warning handler
BEGIN {
$SIG{__WARN__} = $SIG{__WARN__}->();
}
inc/Module/Install/Metadata.pm view on Meta::CPAN
$self->version( ExtUtils::MM_Unix->parse_version($file) );
# for version integrity check
$self->makemaker_args( VERSION_FROM => $file );
}
sub abstract_from {
require ExtUtils::MM_Unix;
my ( $self, $file ) = @_;
$self->abstract(
bless(
{ DISTNAME => $self->name },
'ExtUtils::MM_Unix'
)->parse_abstract($file)
);
}
# Add both distribution and module name
sub name_from {
my ($self, $file) = @_;
if (
lib/APR/Emulate/PSGI.pm view on Meta::CPAN
my $r = APR::Emulate::PSGI->new($psgi_env);
HTTP environment information is read from the PSGI environment that is
passed in as a parameter. If no PSGI environment is supplied,
environment information is read from the global %ENV.
=cut
sub new {
my ( $class, $env ) = @_;
my $self = bless {
'psgi_env' => $env,
'cgi_mode' => ( defined($env) ? 0 : 1 ),
}, $class;
return $self;
}
=item psgi_status
Returns the numeric HTTP response that should be used when building
a PSGI response.
lib/APR/Emulate/PSGI.pm view on Meta::CPAN
sub rflush {}
=back
=cut
# See APR::Table in mod_perl 2 distribution.
package APR::MyTable;
sub make {
return bless {}, __PACKAGE__;
}
sub copy {
my ($self) = @_;
my %copy = %$self;
return bless \%copy, ref($self);
}
sub clear {
my ($self) = @_;
my (@keys) = keys %$self;
foreach my $key (@keys) {
delete $self->{$key};
}
return 1;
}
lib/APR/Emulate/PSGI.pm view on Meta::CPAN
@keys = keys %$self if (scalar(@keys) == 0);
foreach my $key (@keys) {
$code->($key, $self->{$key});
}
return 1;
}
package APR::MyPool;
sub new {
bless {}, $_[0];
}
sub cleanup_register {
my ($self, $code, @args) = @_;
foreach my $arg (@args) {
$code->($arg);
}
return 1;
}
( run in 0.350 second using v1.01-cache-2.11-cpan-de7293f3b23 )