| 1 | #============================================================= -*-perl-*- | ||||||||||
| 2 | # | ||||||||||
| 3 | # XML::Schema::Exception | ||||||||||
| 4 | # | ||||||||||
| 5 | # DESCRIPTION | ||||||||||
| 6 | # Exception class for throwing around as errors. | ||||||||||
| 7 | # | ||||||||||
| 8 | # AUTHOR | ||||||||||
| 9 | # Andy Wardley <abw@kfs.org> | ||||||||||
| 10 | # | ||||||||||
| 11 | # COPYRIGHT | ||||||||||
| 12 | # Copyright (C) 2001 Canon Research Centre Europe Ltd. | ||||||||||
| 13 | # All Rights Reserved. | ||||||||||
| 14 | # | ||||||||||
| 15 | # This module is free software; you can redistribute it and/or | ||||||||||
| 16 | # modify it under the same terms as Perl itself. | ||||||||||
| 17 | # | ||||||||||
| 18 | # REVISION | ||||||||||
| 19 | # $Id: Exception.pm,v 1.1.1.1 2001/08/29 14:30:17 abw Exp $ | ||||||||||
| 20 | # | ||||||||||
| 21 | #======================================================================== | ||||||||||
| 22 | |||||||||||
| 23 | package XML::Schema::Exception; | ||||||||||
| 24 | |||||||||||
| 25 | 28 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 26 | 28 | ▶ | use vars qw( $VERSION $DEBUG $ERROR ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 27 | |||||||||||
| 28 | 28 | $VERSION = sprintf("%d.%02d", q$Revision: 1.1.1.1 $ =~ /(\d+)\.(\d+)/); | |||||||||
| 29 | 28 | ▶ | $DEBUG = 0 unless defined $DEBUG; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 28 | $ERROR = ''; | |||||||||
| 31 | |||||||||||
| 32 | 28 | ▶ | use overload q|""| => "text"; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 33 | |||||||||||
| 34 | |||||||||||
| 35 | 5 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 36 | 5 | my ($class, $type, $info) = @_; | |||||||||
| 37 | 5 | bless { | |||||||||
| 38 | type => $type, | ||||||||||
| 39 | info => $info, | ||||||||||
| 40 | }, $class; | ||||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | 6 | ▶ | sub type { $_[0]->{ type } } | ||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 44 | 6 | ▶ | sub info { $_[0]->{ info } } | ||||||||
|
Subroutine
info: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 45 | |||||||||||
| 46 | 7 | ▶ | sub text { | ||||||||
|
Subroutine
text: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 47 | 7 | my $self = shift; | |||||||||
| 48 | 7 | sprintf("[%s] %s", @$self{ qw( type info ) }); | |||||||||
| 49 | } | ||||||||||
| 50 | |||||||||||
| 51 | 28 | 1; | |||||||||
| 52 | |||||||||||
| 53 | __END__ | ||||||||||