1package Pod::WSDL::Return; 2use strict; 3use warnings; 4use Pod::WSDL::AUTOLOAD; 5 6our $VERSION = "0.05"; 7our @ISA = qw/Pod::WSDL::AUTOLOAD/; 8 9our %FORBIDDEN_METHODS = ( 10 type => {get => 1, set => 0}, 11 array => {get => 1, set => 0}, 12 descr => {get => 1, set => 0}, 13); 14 15sub new { 16 my ($pkg, $str) = @_; 17 18 defined $str or $str = ''; # avoids warnings, dies soon 19 $str =~ s/\s*_RETURN\s*//i; 20 my ($type, $descr) = split /\s+/, $str, 2; 21 22 $type ||= ''; # avoids warnings, dies soon 23 24 $type =~ /([\$\@])(.+)/; 25 die "Type '$type' must have structure (\$|\@)<typename>, e.g. '\$boolean' or '\@string', died" unless $1 and $2; 26 27 bless { 28 _type => $2, 29 _descr => $descr || '', 30 _array => $1 eq '@' ? 1 : 0, 31 }, $pkg; 32} 33 341; 35__END__ 36 37=head1 NAME 38 39Pod::WSDL::Return - Represents the WSDL pod for the return value of a method (internal use only) 40 41=head1 SYNOPSIS 42 43 use Pod::WSDL::Return; 44 my $return = new Pod::WSDL::Return('_RETURN $string This returns blah ...'); 45 46=head1 DESCRIPTION 47 48This 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. 49 50=head1 METHODS 51 52=head2 new 53 54Instantiates a new Pod::WSDL::Param. The method needs one parameter, the _RETURN string from the pod. Please see SYNOPSIS or the section "Pod Syntax" in the description of Pod::WSDL. 55 56=head1 EXTERNAL DEPENDENCIES 57 58 [none] 59 60=head1 EXAMPLES 61 62see Pod::WSDL 63 64=head1 BUGS 65 66see Pod::WSDL 67 68=head1 TODO 69 70see Pod::WSDL 71 72=head1 SEE ALSO 73 74 Pod::WSDL 75 76=head1 AUTHOR 77 78Tarek Ahmed, E<lt>bloerch -the character every email address contains- oelbsk.orgE<gt> 79 80=head1 COPYRIGHT AND LICENSE 81 82Copyright (C) 2006 by Tarek Ahmed 83 84This library is free software; you can redistribute it and/or modify 85it under the same terms as Perl itself, either Perl version 5.8.5 or, 86at your option, any later version of Perl 5 you may have available. 87 88=cut 89