File: status.pm

package info (click to toggle)
libapache2-mod-perl2 2.0.4-7%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 9,896 kB
  • ctags: 3,820
  • sloc: perl: 56,663; ansic: 14,001; makefile: 93; sh: 38
file content (32 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package TestModperl::status;

use strict;
use warnings;

use Apache2::RequestRec;
use Apache2::Const -compile => qw(DECLINED);

use ModPerl::Util;
use Apache::TestUtil qw(t_server_log_error_is_expected);

sub handler {

    my $rc = shift->args;

    if ($rc eq 'die' ||
        $rc eq Apache2::Const::DECLINED ||
        $rc =~ m/foo/) {
        t_server_log_error_is_expected();
    }

    ModPerl::Util::exit if $rc eq 'exit';

    die if $rc eq 'die';

    return if $rc eq 'undef';

    return $rc;
}

1;
__END__