1package Pod::WSDL::Fault; 2use strict; 3use warnings; 4 5use Pod::WSDL::AUTOLOAD; 6 7our $VERSION = "0.05"; 8our @ISA = qw/Pod::WSDL::AUTOLOAD/; 9 10our %FORBIDDEN_METHODS = ( 11 type => {get => 1, set => 0}, 12 descr => {get => 1, set => 0}, 13 wsdlName => {get => 1, set => 0}, 14); 15 16sub new { 17 my ($pkg, $str) = @_; 18 19 $str ||= '' ; # avoid warnings here, will die soon 20 $str =~ s/^\s*_FAULT\s*//i or die "_FAULT statements must have structure '_FAULT <type> <text>', like '_FAULT My::Fault This is my documentation'"; 21 my ($type, $descr) = split /\s+/, $str, 2; 22 23 my $wsdlName = $type; 24 $wsdlName =~ s/::(.)/uc $1/eg; 25 26 $descr ||= ''; 27 28 bless { 29 _type => $type, 30 _descr => $descr, 31 _wsdlName => ucfirst $wsdlName, 32 }, $pkg; 33} 34 351; 36__END__ 37 38=head1 NAME 39 40Pod::WSDL::Fault - Represents the WSDL pod describing the fault of a method (internal use only) 41 42=head1 SYNOPSIS 43 44 use Pod::WSDL::Fault; 45 my $fault = new Pod::WSDL::Fault('_FAULT My::Fault This happens if something happens'); 46 47=head1 DESCRIPTION 48 49This module is used internally by Pod::WSDL. It is unlikely that you have to interact directly with it. If that is the case, take a look at the code, it is rather simple. 50 51=head1 METHODS 52 53=head2 new 54 55Instantiates a new Pod::WSDL::Fault. The method needs one parameter, the fault string from the pod. Please see SYNOPSIS or the section "Pod Syntax" in the description of Pod::WSDL. 56 57=head1 EXTERNAL DEPENDENCIES 58 59 [none] 60 61=head1 EXAMPLES 62 63see Pod::WSDL 64 65=head1 BUGS 66 67see Pod::WSDL 68 69=head1 TODO 70 71see Pod::WSDL 72 73=head1 SEE ALSO 74 75 Pod::WSDL :-) 76 77=head1 AUTHOR 78 79Tarek Ahmed, E<lt>bloerch -the character every email address contains- oelbsk.orgE<gt> 80 81=head1 COPYRIGHT AND LICENSE 82 83Copyright (C) 2006 by Tarek Ahmed 84 85This library is free software; you can redistribute it and/or modify 86it under the same terms as Perl itself, either Perl version 5.8.5 or, 87at your option, any later version of Perl 5 you may have available. 88 89=cut 90