package
TestHandler;
use
strict;
use
Apache2::RequestRec;
use
Apache2::RequestIO;
use
Apache2::RequestUtil;
sub
handler : method {
my
(
$c
,
$r
)=
@_
;
$r
->content_type(
'text/plain'
);
$r
->
(
$c
);
return
Apache2::Const::OK;
}
sub
pathinfo {
my
$r
=
shift
;
$r
->content_type(
'text/plain'
);
$r
->
(
$r
->path_info );
return
Apache2::Const::OK;
}
sub
meminfo {
my
$r
=
shift
;
$r
->content_type(
'text/plain'
);
my
$m
=Linux::Smaps->new($$);
my
@v
=(
qw/size rss shared_clean shared_dirty private_clean private_dirty/
);
$r
->
(
"$_: "
.
$m
->
$_
.
"\n"
)
for
@v
;
return
Apache2::Const::OK;
}
1;