Apache2-SQLRequest

 view release on metacpan or  search on metacpan

t/response/TestApache/call.pm  view on Meta::CPAN

package TestApache::call;

use warnings FATAL => 'all';
use strict;

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;
}

1;

t/response/TestApache/conf.pm  view on Meta::CPAN

use strict;
use warnings; # FATAL => 'all';

use base qw(Apache2::SQLRequest);

use Apache2::RequestIO   ();
use Apache2::Const -compile => qw(OK);
use Data::Dumper qw(Dumper);

sub handler : method {
    my $r = shift->SUPER::new(shift);
    my $conf = $r->{conf};
    $r->content_type('text/plain');
    $r->print(Dumper($r));
    return Apache2::Const::OK;
}

1;

t/response/TestApache/subclass.pm  view on Meta::CPAN


use base qw(Apache2::SQLRequest);
use Apache2::Log ();

use Apache2::RequestIO ();
use Apache2::Const -compile => qw(OK);

use Data::Dumper qw(Dumper);

sub handler : method {
    my $r = shift->SUPER::new(shift);
    $r->log->warn("this should crash me :(");
    $r->print(Dumper($r));
    return Apache2::Const::OK;
}

1;

#package TestApache2::subclass::Config;

#use Apache2::Module      ();



( run in 1.567 second using v1.01-cache-2.11-cpan-49f99fa48dc )