line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::WolframAlpha::AssumptionValue; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
17
|
use 5.008008; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
61
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
468
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
12
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
13
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# This allows declaration use WWW::WolframAlpha ':all'; |
16
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
17
|
|
|
|
|
|
|
# will save memory. |
18
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw( |
19
|
|
|
|
|
|
|
) ] ); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our @EXPORT = qw( |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
our $VERSION = '1.0'; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new { |
29
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
30
|
0
|
|
|
|
|
|
my $xmlo = shift; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
my $self = {}; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
my ($name,$desc,$input,$valid); |
35
|
|
|
|
|
|
|
|
36
|
0
|
0
|
|
|
|
|
if ($xmlo) { |
37
|
0
|
|
0
|
|
|
|
$name = $xmlo->{'name'} || undef; |
38
|
0
|
|
0
|
|
|
|
$desc = $xmlo->{'desc'} || undef; |
39
|
0
|
|
0
|
|
|
|
$input = $xmlo->{'input'} || undef; |
40
|
0
|
|
0
|
|
|
|
$valid = $xmlo->{'valid'} || undef; |
41
|
|
|
|
|
|
|
|
42
|
0
|
0
|
|
|
|
|
$self->{'name'} = $name if defined $name; |
43
|
0
|
0
|
|
|
|
|
$self->{'desc'} = $desc if defined $desc; |
44
|
0
|
0
|
|
|
|
|
$self->{'input'} = $input if defined $input; |
45
|
|
|
|
|
|
|
|
46
|
0
|
0
|
0
|
|
|
|
if (defined $valid && $valid eq 'true') { |
|
|
0
|
0
|
|
|
|
|
47
|
0
|
|
|
|
|
|
$self->{'valid'} = 1; |
48
|
|
|
|
|
|
|
} elsif (defined $valid && $valid eq 'false') { |
49
|
0
|
|
|
|
|
|
$self->{'valid'} = 0; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
return(bless($self, $class)); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
0
|
0
|
|
sub name {shift->{'name'};} |
57
|
0
|
|
|
0
|
0
|
|
sub desc {shift->{'desc'};} |
58
|
0
|
|
|
0
|
0
|
|
sub input {shift->{'input'};} |
59
|
0
|
|
|
0
|
0
|
|
sub valid {shift->{'valid'};} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# Preloaded methods go here. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=pod |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 NAME |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
WWW::WolframAlpha::AssumptionValue |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 VERSION |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
version 1.10 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SYNOPSIS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
foreach my $value (@{$assumption->value}) { |
79
|
|
|
|
|
|
|
print ' ', $value->name, ', ', $value->desc, ' (', $value->input, ') ', "\n"; |
80
|
|
|
|
|
|
|
print ' valid: ', $value->valid, "\n" if defined $value->valid; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 DESCRIPTION |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 ATTRIBUTES |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
$value->name |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
$value->desc |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
$value->input |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
$value->valid |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 EXPORT |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
None by default. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 NAME |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
WWW::WolframAlpha::AssumptionValue - Perl objects returned via $assumption->value |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 SEE ALSO |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
L |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 AUTHOR |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Gabriel Weinberg, Eyegg@alum.mit.eduE |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Copyright (C) 2009 by Gabriel Weinberg |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
116
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.8 or, |
117
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 AUTHOR |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Gabriel Weinberg |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
This software is copyright (c) 2009 by Gabriel Weinberg. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
128
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=cut |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
__END__ |