view release on metacpan or search on metacpan
sub _setup {
my $self = shift;
...do something here...
return $self->SUPER::_setup();
}
=head2 HTML ATTRIBUTES
Any legal attribute can generally be used. Some, however, are important
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/XPointer/RDQL/Parser.pm view on Meta::CPAN
sub parse {
my $self = shift;
my $query = shift;
$self->{'__query'} = $query;
return $self->SUPER::parse($query);
}
=head2 $obj->query_string()
Returns the original RDQL query string.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/API.pm view on Meta::CPAN
$self->{response} = undef unless( $self->{response} );
$self->{apache_request} = $r unless( $self->{apache_request} );
# 200Kb
$self->{compression_threshold} = 204800 unless( length( $self->{compression_threshold} ) );
$self->{use_rfc_error} = $USE_RFC_ERROR unless( length( $self->{use_rfc_error} ) );
$self->SUPER::init( @_ ) || return( $self->pass_error );
unless( $r = $self->apache_request )
{
$r ||= Apache2::RequestUtil->request;
return( $self->error( "No Apache2::RequestRec object was provided." ) ) if( !$r );
$self->apache_request( $r ) || return( $self->pass_error );
lib/Apache2/API.pm view on Meta::CPAN
{
$data = $json->encode( $hash );
};
if( $@ )
{
return( $self->error( "An error occurred while trying to encode perl data: $@\nPerl data are: ", sub{ $self->SUPER::dump( $hash ) } ) );
}
return( $data );
}
sub encode_url
lib/Apache2/API.pm view on Meta::CPAN
$self->{bcrypt_cost} = 12 if( !exists( $self->{bcrypt_cost} ) );
# undef => default (5000)
$self->{sha_rounds} = undef if( !exists( $self->{sha_rounds} ) );
# By default, like Apache does, we use Apache md5 algorithm
# Other possibilities are bcrypt (Blowfish)
$self->SUPER::init( @_ ) ||
return( $self->pass_error );
if( $self->{create} )
{
my $hash = $self->make( $pwd ) ||
return( $self->pass_error );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/ASP/ASPDOM/Document.pm view on Meta::CPAN
#==============================================================================
sub new
{
my ($class) = shift;
my $s = $class->SUPER::new( @_ );
return $s;
}# end new()
1;# return true:
view all matches for this distribution
view release on metacpan or search on metacpan
}
sub configure {
my $self = shift;
bless $self->{server}, "Apache2::AUS::TestServer";
return $self->SUPER::configure(@_);
}
package Apache2::AUS::TestServer;
use base q(Apache::TestServer);
dbh => $dbh,
);
$mh->full_migrate;
$dbh->disconnect;
}
return $self->SUPER::start(@_);
}
sub stop {
my $self = shift;
my $rv;
if($rv = $self->SUPER::stop(@_)) {
warn "removing database schema!";
if(my $dbh = dbh) {
my $mh = DBIx::Migration::Directories->new(
schema => "Schema::RDBMS::AUS",
dbh => $dbh,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCASpbh/UserAgent.pm view on Meta::CPAN
my $cas_cookie_map;
if (exists($conf{cas_cookie_map})) {
$cas_cookie_map = $conf{cas_cookie_map}; delete($conf{cas_cookie_map});
}
my $self = $class->SUPER::new(%conf);
$self->{apache_r} = $r;
$self->{_log} = new Apache2::AuthCASpbh::Log(__PACKAGE__, $r->log);
if (defined($cas_cookie_map)) {
lib/Apache2/AuthCASpbh/UserAgent.pm view on Meta::CPAN
$_log->l($debug_level, 'denying ' . $response->header('Location') .
' redirect, matches ' . $self->{cas_login_url});
return 0;
}
return $self->SUPER::redirect_ok($new_request, $response);
}
sub request {
my ($self, $request, $arg, $size, $previous) = @_;
my $_log = $self->{_log};
lib/Apache2/AuthCASpbh/UserAgent.pm view on Meta::CPAN
}
}
NO_SET_COOKIE:
my $response = $self->SUPER::request($request, $arg, $size, $previous);
if ($response->code() == 302 && $response->header('Location') =~ $self->{cas_login_url}) {
$_log->l($debug_level, "request redirected to CAS login URL $self->{cas_login_url}");
if (!exists($self->{cas_ua})) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
To make "LogoutURL" working you can subsclass Apache2::ApacheCookieLDAP and provide it with:
sub logout {
my ( $self, $r ) = @_;
$self->SUPER::logout($r);
my $logout_url = $r->dir_config( $r->auth_name . 'LogoutURL' );
if ($logout_url) {
$r->headers_out->set( Location => $logout_url );
$r->status(Apache2::Const::REDIRECT);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/CondProxy.pm view on Meta::CPAN
$r->content_type($subr->content_type) if $subr->content_type;
$r->content_encoding($subr->content_encoding)
if $subr->content_encoding;
$r->set_last_modified($subr->mtime) if $subr->mtime;
$r->SUPER::handler('modperl');
$r->set_handlers(PerlResponseHandler => \&_response_handler);
$r->push_handlers(PerlCleanupHandler => \&_cleanup_handler);
$r->add_output_filter(\&_output_filter_release);
return Apache2::Const::OK;
lib/Apache2/CondProxy.pm view on Meta::CPAN
# URIs. AHA: MAGIC.
$r->notes->set('proxy-nocanon', 1);
$r->filename(sprintf 'proxy:%s', $base);
$r->proxyreq(Apache2::Const::PROXYREQ_REVERSE);
$r->SUPER::handler('proxy-server');
$r->add_output_filter(\&_output_filter_fix_location);
if ($first) {
$r->push_handlers(PerlCleanupHandler => \&_cleanup_handler);
$r->add_input_filter(\&_input_filter_tee);
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
sub clean {
my $self = shift;
return $self->Apache::TestMM::clean(@_) if $HAS_APACHE_TEST;
return $self->SUPER::clean(@_);
}
__DATA__
<IfModule mod_perl.c>
PerlSetVar arp_binary '%s'
PerlLoadModule Apache2::Connection::Arp
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
sub clean {
my $self = shift;
return $self->Apache::TestMM::clean(@_) if $HAS_APACHE_TEST;
return $self->SUPER::clean(@_);
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
sub clean {
my $self = shift;
return $self->Apache::TestMM::clean(@_) if $HAS_APACHE_TEST;
return $self->SUPER::clean(@_);
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Controller.pm view on Meta::CPAN
via the module chosen by your L<Apache2::Controller::Dispatch> subclass.
We use C<< a2c_new >> instead of the conventional C<< new >>
because, in case you want to suck in the L<Apache2::Request>
methods with that module's automagic, then you don't get
confused about how C<<SUPER::>> behaves. Otherwise you
get into a mess of keeping track of the order of bases
so you don't call C<< Apache2::Request->new() >> by accident,
which breaks everything.
=head3 subclassing C<a2c_new()>
lib/Apache2/Controller.pm view on Meta::CPAN
package MyApp::ControllerBase;
use base qw( Apache2::Controller Apache2::Request );
sub a2c_new {
my ($class, $r) = @_;
return SUPER::new(
$class, $r,
POST_MAX => 65_535,
TEMP_DIR => '/dev/shm',
);
# $self is already blessed in the class hierarchy
lib/Apache2/Controller.pm view on Meta::CPAN
package MyApp::ControllerBase;
use base qw( Apache2::Controller Apache2::Request );
sub new {
my ($class, $r, @apr_override_args) = @_;
my $self = SUPER::new(
$class, $r,
POST_MAX => 65_535,
TEMP_DIR => '/dev/shm',
@apr_override_args,
);
lib/Apache2/Controller.pm view on Meta::CPAN
use base qw( MyApp::ControllerBase );
sub allowed_methods qw( uri_one uri_two );
sub new {
my ($class, $r) = @_;
my $self = SUPER::a2c_new(
$class, $r,
);
# no need to bless, A2C blesses into the child class
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/DirBasedHandler/TT.pm view on Meta::CPAN
our $tt;
our $VERSION = 0.03;
sub init {
my ($self,$r) = @_;
my $hash = $self->SUPER::init($r);
my ($tt,$vars) = $self->get_tt($r);
$hash->{'tt'} = $tt;
$hash->{'vars'} = $vars;
return $hash;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/My/Thingy.pm view on Meta::CPAN
use Apache2::Const -compile => qw(:common);
sub init {
my $self = shift;
Apache2::DirBasedHandler::set_debug(1);
return $self->SUPER::init(@_);
}
sub root_index {
my $self = shift;
my ($r,$uri_args,$args) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
package MY;
sub postamble {
my $self = shift;
my $string = $self->SUPER::postamble;
$string .= <<'EOF';
tag :
svn copy https://apache-dispatch.svn.sourceforge.net/svnroot/apache-dispatch/trunk https://apache-dispatch.svn.sourceforge.net/svnroot/apache-dispatch/tags/$(VERSION_SYM)
@echo update lib/Apache/Dispatch.pm VERSION now
Makefile.PL view on Meta::CPAN
sub clean {
my $self = shift;
return $self->Apache::TestMM::clean(@_) if $HAS_APACHE_TEST;
return $self->SUPER::clean(@_);
}
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use 5.008008;
use ExtUtils::MakeMaker;
package MY;
sub test_via_harness {
my($self, $perl, $tests) = @_;
local $_ = $self->SUPER::test_via_harness($perl, $tests);
s/PERL_DL_NONLAZY=1//g;
return $_;
}
sub test_via_script {
my($self, $perl, $tests) = @_;
local $_ = $self->SUPER::test_via_script($perl, $tests);
s/PERL_DL_NONLAZY=1//g;
return $_;
}
package main;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Filter/TagAware.pm view on Meta::CPAN
my $r = $self->r;
my $log = $r->log;
#
# $context is used to store state
#
my $context = $self->SUPER::ctx();
#
# if there is no context yet, set up
# our default context
#
if (!$context) {
lib/Apache2/Filter/TagAware.pm view on Meta::CPAN
#
# originally, i was trying to not return more than $bytes, but if there
# is a tag larger than the buffer, that won't work, so now we just read
# $bytes no matter what.
#
my $ret_val = $self->SUPER::read($buffer, $bytes);
$buffer ||= '';
$log->info('read buffer: '. $buffer ? $buffer : '');
#
# if there is something extra in our context, prepend
# it to what we just read
lib/Apache2/Filter/TagAware.pm view on Meta::CPAN
}
else {
# there's more data to come
# store the filter context, including any leftover data
# in the 'extra' key
$self->SUPER::ctx($context);
}
#
# in order to pass the buffer back out to the caller we have
# to do this assignment, then we return the length of the data
# that we are passing back in the buffer
lib/Apache2/Filter/TagAware.pm view on Meta::CPAN
sub ctx {
my ($self, $args) = @_;
#
# grab the real context
#
my $real_ctx = $self->SUPER::ctx() || {};
#
# if they are setting the context then we set their context as
# a key within our context hash, then set that and return whatever our
# parent returns
#
if ($args) {
$real_ctx->{theirs} = $args;
return $self->SUPER::ctx($real_ctx);
}
#
# if they are getting, we just return to them their portion
# of the actual context, if it doesn't have a value, explicitly return
# undef
view all matches for this distribution
view release on metacpan or search on metacpan
use base qw(Apache::TestConfig);
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
# explicit call to apxs...
$self->configure_apxs;
# ... so this works.
$self->{vars}{src_dir} ||= $self->apxs('LIBEXECDIR');
view all matches for this distribution
view release on metacpan or search on metacpan
use base qw(Apache::TestConfig);
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
# explicit call to apxs...
$self->configure_apxs;
# ... so this works.
$self->{vars}{src_dir} ||= $self->apxs('LIBEXECDIR');
view all matches for this distribution
view release on metacpan or search on metacpan
# replaced in generated httpd.conf
sub new_test_config {
my $self=shift;
$self->{conf_opts}->{maxclients}=2;
$self=$self->SUPER::new_test_config;
my $serverroot=Apache::Test::vars->{serverroot};
my $confdir=Apache::Test::vars->{t_conf};
unless( defined $db and length $db ) {
($db,$user,$pw)=("dbi:SQLite:dbname=$serverroot/test.sqlite", '', '');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/PageKit/View.pm view on Meta::CPAN
sub new {
require Template;
require Template::Parser;
require Template::Context;
return shift->SUPER::new(@_);
}
sub fill_in_view {
my ($view) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/PodBrowser.pm view on Meta::CPAN
sub new {
local $Pod::Simple::HTML::Doctype_decl=
(qq{<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"}.
qq{ "http://www.w3.org/TR/html4/loose.dtd">\n});
return shift->SUPER::new(@_);
}
sub resolve_pod_page_link {
my ($I, $to, $sec)=@_;
lib/Apache2/PodBrowser.pm view on Meta::CPAN
} elsif( -f $base.'/'.$to.'.pm' ) {
return '/'.$to.'.pm';
} elsif( -f $base.'/'.$to.'.pl' ) {
return '/'.$to.'.pl';
} else {
return $I->SUPER::resolve_pod_page_link(@_[1,$#_]);
}
}
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Protocol/ESMTP.pm view on Meta::CPAN
}
sub new {
my $proto = shift;
my $class = ref $proto || $proto;
my $self = bless($class->SUPER::new(@_), $class);
$self->{_bodystate} = '';
$self->{_headername} = '';
$self->{_headervalue} = '';
$self->{_seenDATA} = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/REST/Handler.pm view on Meta::CPAN
return 0 ;
}
=head2 new
You can override this in subclasses. Do not forget to call $class->SUPER::new() ;
=cut
sub new{
my ( $class , $parent ) = @_ ;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/SOAP.pm view on Meta::CPAN
my $server = __PACKAGE__->new;
sub handler {
$server->configure(@_);
$server->SUPER::handler(@_);
}
# ======================================================================
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/response/TestApache/call.pm view on Meta::CPAN
use base qw(Apache2::SQLRequest);
use Apache2::RequestIO ();
use Apache2::Const -compile => qw(OK);
sub handler : method {
my $r = shift->SUPER::new(shift);
my $rc = $r->execute_query('response') or die "$!";
my $out = join (' ', map { "$_\n" } $rc,
$r->sth('response')->fetchrow_array);
$r->print($out);
Apache2::Const::OK;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Expression.pm view on Meta::CPAN
sub init
{
my $self = shift( @_ );
$self->{legacy} = 0;
$self->{trunk} = 0;
$self->SUPER::init( @_ );
return( $self );
}
sub legacy { return( shift->_set_get_boolean( 'legacy', @_ ) ); }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/TaintRequest.pm view on Meta::CPAN
# Escape any HTML content if the data is tainted.
$value = escape_html($value) if tainted($value);
}
$self->{request}->SUPER::print(@data);
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
# subclass new_test_config to add some config vars which will be
# replaced in generated httpd.conf
sub new_test_config {
my $self=shift;
$self->{conf_opts}->{maxclients}=2;
$self=$self->SUPER::new_test_config;
my $serverroot=Apache::Test::vars->{serverroot};
my $confdir=Apache::Test::vars->{t_conf};
unless( defined $db and length $db ) {
view all matches for this distribution
view release on metacpan or search on metacpan
use base qw(Apache::TestConfig);
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
# explicit call to apxs...
$self->configure_apxs;
# ... so this works.
$self->{vars}{src_dir} ||= $self->apxs('LIBEXECDIR');
# XXX dodgy, not through the interface
# my $tc = $self->{test_config} or die $!;
# map { $tc->find_and_load_module($_) } qw(proxy proxy_http proxy_connect);
# $self->SUPER::pre_configure;
#}
view all matches for this distribution