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