| 1 | # -*- Mode: perl -*- | ||
| 2 | # | ||
| 3 | # $Id: Exception.pm,v 0.1.1.1 2001/05/30 21:13:28 ram Exp $ | ||
| 4 | # | ||
| 5 | # Copyright (c) 1998-2001, Raphael Manfredi | ||
| 6 | # Copyright (c) 2000-2001, Christophe Dehaudt | ||
| 7 | # | ||
| 8 | # You may redistribute only under the terms of the Artistic License, | ||
| 9 | # as specified in the README file that comes with the distribution. | ||
| 10 | # | ||
| 11 | # HISTORY | ||
| 12 | # $Log: Exception.pm,v $ | ||
| 13 | # Revision 0.1.1.1 2001/05/30 21:13:28 ram | ||
| 14 | # patch1: removed DFEATURE call from stringify hook | ||
| 15 | # | ||
| 16 | # Revision 0.1 2001/04/22 17:57:03 ram | ||
| 17 | # Baseline for first Alpha release. | ||
| 18 | # | ||
| 19 | # $EndLog$ | ||
| 20 | # | ||
| 21 | |||
| 22 | use strict; | ||
| 23 | |||
| 24 | package CGI::MxScreen::Exception; | ||
| 25 | |||
| 26 | use Carp::Datum; | ||
| 27 | use Log::Agent; | ||
| 28 | |||
| 29 | use overload | ||
| 30 | qw("" stringify); | ||
| 31 | |||
| 32 | # | ||
| 33 | # ->make -- deferred | ||
| 34 | # | ||
| 35 | sub make { | ||
| 36 | logconfess "deferred"; | ||
| 37 | } | ||
| 38 | |||
| 39 | # | ||
| 40 | # ->stringify -- may be redefined by heirs | ||
| 41 | # | ||
| 42 | # For display purposes, if they try to stringify us. | ||
| 43 | # | ||
| 44 | sub stringify { | ||
| 45 | # Can't DFEATURE this routine, or would be a recursive call | ||
| 46 | my $self = shift; | ||
| 47 | my $pkg = ref $self; | ||
| 48 | $pkg =~ s/^__PACKAGE__:://; | ||
| 49 | return "CGI::MxScreen exception (type $pkg)"; | ||
| 50 | } | ||
| 51 | |||
| 52 | 1; | ||
| 53 | |||
| 54 | =head1 NAME | ||
| 55 | |||
| 56 | CGI::MxScreen::Exception - Mother of all exception classes | ||
| 57 | |||
| 58 | =head1 SYNOPSIS | ||
| 59 | |||
| 60 | # Deferred class, meant to be inherited from | ||
| 61 | |||
| 62 | =head1 DESCRIPTION | ||
| 63 | |||
| 64 | This B<deferred> class is intended to be the common ancestor for all | ||
| 65 | defined C<CGI::MxScreen> exceptions. | ||
| 66 | |||
| 67 | =head1 AUTHORS | ||
| 68 | |||
| 69 | The original authors are | ||
| 70 | Raphael Manfredi F<E<lt>Raphael_Manfredi@pobox.comE<gt>> | ||
| 71 | and | ||
| 72 | Christophe Dehaudt F<E<lt>Christophe.Dehaudt@teamlog.frE<gt>>. | ||
| 73 | |||
| 74 | Send bug reports, suggestions, problems or questions to | ||
| 75 | Jason Purdy F<E<lt>Jason@Purdy.INFOE<gt>> | ||
| 76 | |||
| 77 | =head1 SEE ALSO | ||
| 78 | |||
| 79 | CGI::MxScreen::Exception::Bounce(3). | ||
| 80 | |||
| 81 | =cut | ||
| 82 |