<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package TestModperl::pnotes2;

use strict;
use warnings FATAL =&gt; 'all';

use Apache2::Log ();
use Apache2::RequestUtil ();
use Apache2::ConnectionUtil ();

use Apache2::Const -compile =&gt; 'OK';

{
    package TestModerl::pnotes2::x;
    use strict;
    use warnings FATAL =&gt; 'all';

    sub new {shift;bless [@_];}
    sub DESTROY {my $f=shift @{$_[0]}; $f-&gt;(@{$_[0]});}
}

sub line {
    our $cleanup;

    Apache2::ServerRec::warn "pnotes are destroyed after cleanup ".$cleanup;
}

sub cleanup {
    our $cleanup;
    $cleanup='passed';

    return Apache2::Const::OK;
}

sub handler {
    my $r = shift;

    our $cleanup;
    $cleanup='';

    $r-&gt;push_handlers( PerlCleanupHandler=&gt;__PACKAGE__.'::cleanup' );

    if(!defined $r-&gt;args) {
    } elsif($r-&gt;args == 1) {
        $r-&gt;pnotes(x1 =&gt; TestModerl::pnotes2::x-&gt;new(\&amp;line));
    } elsif($r-&gt;args == 2) {
        $r-&gt;pnotes-&gt;{x1} = TestModerl::pnotes2::x-&gt;new(\&amp;line);
    } elsif($r-&gt;args == 3) {
        $r-&gt;pnotes(x1 =&gt; TestModerl::pnotes2::x-&gt;new(\&amp;line));
        $r-&gt;pnotes(x2 =&gt; 2);
    } elsif($r-&gt;args == 4) {
        $r-&gt;pnotes-&gt;{x1} = TestModerl::pnotes2::x-&gt;new(\&amp;line);
        $r-&gt;pnotes-&gt;{x2} = 2;
    } elsif($r-&gt;args == 5) {
        $r-&gt;pnotes(x1 =&gt; TestModerl::pnotes2::x-&gt;new(\&amp;line));
        $r-&gt;pnotes-&gt;{x2} = 2;
    } elsif($r-&gt;args == 6) {
        $r-&gt;pnotes-&gt;{x1} = TestModerl::pnotes2::x-&gt;new(\&amp;line);
        $r-&gt;pnotes(x2 =&gt; 2);
    } elsif($r-&gt;args == 7) {
        $r-&gt;connection-&gt;pnotes(x1 =&gt; TestModerl::pnotes2::x-&gt;new(\&amp;line));
    } elsif($r-&gt;args == 8) {
        $r-&gt;connection-&gt;pnotes-&gt;{x1} = TestModerl::pnotes2::x-&gt;new(\&amp;line);
    } elsif($r-&gt;args == 9) {
        $r-&gt;connection-&gt;pnotes(x1 =&gt; TestModerl::pnotes2::x-&gt;new(\&amp;line));
        $r-&gt;connection-&gt;pnotes(x2 =&gt; 2);
    } elsif($r-&gt;args == 10) {
        $r-&gt;connection-&gt;pnotes-&gt;{x1} = TestModerl::pnotes2::x-&gt;new(\&amp;line);
        $r-&gt;connection-&gt;pnotes-&gt;{x2} = 2;
    } elsif($r-&gt;args == 11) {
        $r-&gt;connection-&gt;pnotes(x1 =&gt; TestModerl::pnotes2::x-&gt;new(\&amp;line));
        $r-&gt;connection-&gt;pnotes-&gt;{x2} = 2;
    } elsif($r-&gt;args == 12) {
        $r-&gt;connection-&gt;pnotes-&gt;{x1} = TestModerl::pnotes2::x-&gt;new(\&amp;line);
        $r-&gt;connection-&gt;pnotes(x2 =&gt; 2);
    }

    $r-&gt;content_type('text/plain');
    $r-&gt;print("OK");

    Apache2::Const::OK;
}

1;
__END__

# Local Variables: #
# mode: cperl #
# cperl-indent-level: 4 #
# End: #
</pre></body></html>