| 1 | package CGI::Test::Page::Error; | ||
| 2 | 23 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 23 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | 23 | require CGI::Test::Page; | |
| 19 | 23 | ▶ | use base qw(CGI::Test::Page); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | ############################################################ | ||
| 22 | # | ||
| 23 | # ->new | ||
| 24 | # | ||
| 25 | # Creation routine | ||
| 26 | # | ||
| 27 | ############################################################ | ||
| 28 | sub new | ||
| 29 | 0 | ▶ | { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 30 | 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 | 0 | ▶ | { |
|
Subroutine
error_code: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 44 | 0 | 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 | 0 | ▶ | { |
|
Subroutine
is_error: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 54 | 0 | return 1; | |
| 55 | } | ||
| 56 | ############################################################ | ||
| 57 | sub content_type | ||
| 58 | 0 | ▶ | { |
|
Subroutine
content_type: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 59 | 0 | return "text/html"; | |
| 60 | } | ||
| 61 | |||
| 62 | 23 | 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<CGI::Test::Page>. | ||
| 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 F<E<lt>tokarev@cpan.orgE<gt>>. | ||
| 84 | |||
| 85 | =head1 SEE ALSO | ||
| 86 | |||
| 87 | CGI::Test::Page(3), CGI::Test::Page::Real(3). | ||
| 88 | |||
| 89 | =cut | ||
| 90 | |||