line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Test::Page::Error; |
2
|
23
|
|
|
23
|
|
72
|
use strict; |
|
23
|
|
|
|
|
23
|
|
|
23
|
|
|
|
|
498
|
|
3
|
23
|
|
|
23
|
|
59
|
use warnings; |
|
23
|
|
|
|
|
23
|
|
|
23
|
|
|
|
|
628
|
|
4
|
|
|
|
|
|
|
#################################################################### |
5
|
|
|
|
|
|
|
# $Id: Error.pm 411 2011-09-26 11:19:30Z nohuhu@nohuhu.org $ |
6
|
|
|
|
|
|
|
# $Name: cgi-test_0-104_t1 $ |
7
|
|
|
|
|
|
|
#################################################################### |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Copyright (c) 2001, Raphael Manfredi |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# You may redistribute only under the terms of the Artistic License, |
12
|
|
|
|
|
|
|
# as specified in the README file that comes with the distribution. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# A reply to an HTTP request resulted in an error. |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
require CGI::Test::Page; |
19
|
23
|
|
|
23
|
|
62
|
use base qw(CGI::Test::Page); |
|
23
|
|
|
|
|
17
|
|
|
23
|
|
|
|
|
7455
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
############################################################ |
22
|
|
|
|
|
|
|
# |
23
|
|
|
|
|
|
|
# ->new |
24
|
|
|
|
|
|
|
# |
25
|
|
|
|
|
|
|
# Creation routine |
26
|
|
|
|
|
|
|
# |
27
|
|
|
|
|
|
|
############################################################ |
28
|
|
|
|
|
|
|
sub new |
29
|
|
|
|
|
|
|
{ |
30
|
0
|
|
|
0
|
0
|
|
my $this = bless {}, shift; |
31
|
0
|
|
|
|
|
|
my ($errcode, $server) = @_; |
32
|
0
|
|
|
|
|
|
$this->{error_code} = $errcode; |
33
|
0
|
|
|
|
|
|
$this->{server} = $server; |
34
|
0
|
|
|
|
|
|
return $this; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# |
38
|
|
|
|
|
|
|
# Attribute access |
39
|
|
|
|
|
|
|
# |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
############################################################ |
42
|
|
|
|
|
|
|
sub error_code |
43
|
|
|
|
|
|
|
{ |
44
|
0
|
|
|
0
|
1
|
|
my $this = shift; |
45
|
0
|
|
|
|
|
|
return $this->{error_code}; |
46
|
|
|
|
|
|
|
} # redefined as attribute |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# |
49
|
|
|
|
|
|
|
# Redefined features |
50
|
|
|
|
|
|
|
# |
51
|
|
|
|
|
|
|
############################################################ |
52
|
|
|
|
|
|
|
sub is_error |
53
|
|
|
|
|
|
|
{ |
54
|
0
|
|
|
0
|
1
|
|
return 1; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
############################################################ |
57
|
|
|
|
|
|
|
sub content_type |
58
|
|
|
|
|
|
|
{ |
59
|
0
|
|
|
0
|
1
|
|
return "text/html"; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 NAME |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
CGI::Test::Page::Error - An HTTP error page |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 SYNOPSIS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
# Inherits from CGI::Test::Page |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 DESCRIPTION |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
This class represents an HTTP error page. |
75
|
|
|
|
|
|
|
Its interface is the same as the one described in L. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 AUTHORS |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
The original author is Raphael Manfredi. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Steven Hilton was long time maintainer of this module. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Current maintainer is Alexander Tokarev Ftokarev@cpan.orgE>. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 SEE ALSO |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
CGI::Test::Page(3), CGI::Test::Page::Real(3). |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |
90
|
|
|
|
|
|
|
|