line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::WSDL::Attr; |
2
|
9
|
|
|
9
|
|
16644
|
use strict; |
|
9
|
|
|
|
|
11
|
|
|
9
|
|
|
|
|
291
|
|
3
|
9
|
|
|
9
|
|
34
|
use warnings; |
|
9
|
|
|
|
|
10
|
|
|
9
|
|
|
|
|
222
|
|
4
|
9
|
|
|
9
|
|
987
|
use Pod::WSDL::AUTOLOAD; |
|
9
|
|
|
|
|
9
|
|
|
9
|
|
|
|
|
2200
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "0.05"; |
7
|
|
|
|
|
|
|
our @ISA = qw/Pod::WSDL::AUTOLOAD/; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our %FORBIDDEN_METHODS = ( |
10
|
|
|
|
|
|
|
name => {get => 1, set => 0}, |
11
|
|
|
|
|
|
|
type => {get => 1, set => 0}, |
12
|
|
|
|
|
|
|
nillable => {get => 1, set => 0}, |
13
|
|
|
|
|
|
|
descr => {get => 1, set => 0}, |
14
|
|
|
|
|
|
|
array => {get => 1, set => 0}, |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
14
|
|
|
14
|
1
|
709
|
my ($pkg, $str) = @_; |
19
|
|
|
|
|
|
|
|
20
|
14
|
100
|
|
|
|
32
|
defined $str or $str = ''; # avoids warnings |
21
|
14
|
100
|
|
|
|
70
|
$str =~ s/\s*_ATTR\s*//i or die "Input string '$str' does not begin with '_ATTR'"; |
22
|
12
|
|
|
|
|
31
|
my ($name, $type, $needed, $descr) = split /\s+/, $str, 4; |
23
|
|
|
|
|
|
|
|
24
|
12
|
|
100
|
|
|
30
|
$descr ||= ''; |
25
|
|
|
|
|
|
|
|
26
|
12
|
100
|
|
|
|
23
|
if ((uc $needed) ne '_NEEDED') { |
27
|
4
|
|
|
|
|
6
|
$descr = "$needed $descr"; |
28
|
4
|
|
|
|
|
5
|
$needed = 0; |
29
|
|
|
|
|
|
|
} else { |
30
|
8
|
|
|
|
|
9
|
$needed = 1; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
12
|
|
|
|
|
25
|
$type =~ /([\$\@])(.*)/; |
34
|
12
|
100
|
|
|
|
30
|
die "Type '$type' must be prefixed with either '\$' or '\@', died" unless $1; |
35
|
|
|
|
|
|
|
|
36
|
11
|
100
|
|
|
|
86
|
bless { |
|
|
100
|
|
|
|
|
|
37
|
|
|
|
|
|
|
_name => $name, |
38
|
|
|
|
|
|
|
_type => $2, |
39
|
|
|
|
|
|
|
_nillable => $needed ? undef : 'true', |
40
|
|
|
|
|
|
|
_descr => $descr, |
41
|
|
|
|
|
|
|
_array => $1 eq '@' ? 1 : 0, |
42
|
|
|
|
|
|
|
}, $pkg; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
__END__ |