| 1 | #============================================================================== | ||||||||||||||||||||
| 2 | # LibWeb::HTML::Error -- Displaying error messages (`stderr') in html for libweb | ||||||||||||||||||||
| 3 | # applications. | ||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | package LibWeb::HTML::Error; | ||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | # Copyright (C) 2000 Colin Kong | ||||||||||||||||||||
| 8 | # | ||||||||||||||||||||
| 9 | # This program is free software; you can redistribute it and/or | ||||||||||||||||||||
| 10 | # modify it under the terms of the GNU General Public License | ||||||||||||||||||||
| 11 | # as published by the Free Software Foundation; either version 2 | ||||||||||||||||||||
| 12 | # of the License, or (at your option) any later version. | ||||||||||||||||||||
| 13 | # | ||||||||||||||||||||
| 14 | # This program is distributed in the hope that it will be useful, | ||||||||||||||||||||
| 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||||||||||||||||
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||||||||||||||||
| 17 | # GNU General Public License for more details. | ||||||||||||||||||||
| 18 | # | ||||||||||||||||||||
| 19 | # You should have received a copy of the GNU General Public License | ||||||||||||||||||||
| 20 | # along with this program; if not, write to the Free Software | ||||||||||||||||||||
| 21 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||||||||||||||||||||
| 22 | #============================================================================= | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | # $Id: Error.pm,v 1.6 2000/07/19 20:31:57 ckyc Exp $ | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | 3 | $VERSION = '0.02'; | |||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | # Contains site's common help instructions for users when error occurs. | ||||||||||||||||||||
| 29 | # Please DO NOT make this a subclass of any class in the LibWeb package | ||||||||||||||||||||
| 30 | # since it will generate infinite loop at initialization due to the fact | ||||||||||||||||||||
| 31 | # that LibWeb::Core uses this module. Also please do not put any ``use'' | ||||||||||||||||||||
| 32 | # statement in this class to use any LibWeb classes. Same reason applies. | ||||||||||||||||||||
| 33 | # Any idea of how to improve this? | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | #-############################## | ||||||||||||||||||||
| 36 | # Use standard libraries. | ||||||||||||||||||||
| 37 | 3 | ▶ | use SelfLoader; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 38 | 3 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 39 | 3 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 40 | 3 | ▶ | use vars qw($VERSION); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | #-############################## | ||||||||||||||||||||
| 43 | # Methods. | ||||||||||||||||||||
| 44 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=8.1
Pod
undocumented
| |||||||||||||||||||||
| 45 | # | ||||||||||||||||||||
| 46 | # You don't use or ISA this class directly. Use or ISA | ||||||||||||||||||||
| 47 | # LibWeb::HTML::Default instead. | ||||||||||||||||||||
| 48 | # | ||||||||||||||||||||
| 49 | 2 | my $class = shift; | |||||||||||||||||||
| 50 | 2 | ▶ | bless( {}, ref($class) || $class ); | ||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 51 | } | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | 0 | ▶ | sub DESTROY {} | ||||||||||||||||||
|
Subroutine
DESTROY: not called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | # Selfloading methods declaration. | ||||||||||||||||||||
| 56 | sub LibWeb::HTML::Error::cookie_error ; | ||||||||||||||||||||
| 57 | sub LibWeb::HTML::Error::database_error ; | ||||||||||||||||||||
| 58 | sub LibWeb::HTML::Error::display_error ; | ||||||||||||||||||||
| 59 | sub LibWeb::HTML::Error::exceeded_max_login_attempt ; | ||||||||||||||||||||
| 60 | sub LibWeb::HTML::Error::hit_back_and_edit ; | ||||||||||||||||||||
| 61 | sub LibWeb::HTML::Error::login_expired ; | ||||||||||||||||||||
| 62 | sub LibWeb::HTML::Error::login_failed ; | ||||||||||||||||||||
| 63 | sub LibWeb::HTML::Error::logout_failed ; | ||||||||||||||||||||
| 64 | sub LibWeb::HTML::Error::mysterious_error ; | ||||||||||||||||||||
| 65 | sub LibWeb::HTML::Error::post_too_large ; | ||||||||||||||||||||
| 66 | sub LibWeb::HTML::Error::registration_failed ; | ||||||||||||||||||||
| 67 | sub LibWeb::HTML::Error::special_characters_not_allowed ; | ||||||||||||||||||||
| 68 | 3 | 1; | |||||||||||||||||||
| 69 | __DATA__ | ||||||||||||||||||||