line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::WolframAlpha::Sounds; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
25
|
use 5.008008; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
36
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
526
|
use WWW::WolframAlpha::Sound; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
330
|
|
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->{'sound'}} = (); |
|
0
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my ($count,$sound); |
40
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
|
if ($xmlo) { |
42
|
0
|
|
0
|
|
|
|
$count = $xmlo->{'count'} || undef; |
43
|
0
|
|
0
|
|
|
|
$sound = $xmlo->{'sound'} || undef; |
44
|
|
|
|
|
|
|
|
45
|
0
|
0
|
|
|
|
|
$self->{'count'} = $count if defined $count; |
46
|
|
|
|
|
|
|
|
47
|
0
|
0
|
|
|
|
|
if (defined $sound) { |
48
|
0
|
|
|
|
|
|
foreach my $value (@{$sound}) { |
|
0
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
push(@{$self->{'sound'}}, WWW::WolframAlpha::Sound->new($value)); |
|
0
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
return(bless($self, $class)); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
0
|
0
|
|
sub count {shift->{'count'};} |
59
|
0
|
|
|
0
|
0
|
|
sub sound {shift->{'sound'};} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
# Preloaded methods go here. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=pod |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 NAME |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
WWW::WolframAlpha::Sounds |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 VERSION |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
version 1.10 |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 SYNOPSIS |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
if ($pod->sounds->count) { |
80
|
|
|
|
|
|
|
foreach my $sound (@{$pod->sounds->sound}) { |
81
|
|
|
|
|
|
|
... |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 DESCRIPTION |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 ATTRIBUTES |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
$sounds->count |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 SECTOINS |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
$sounds->sound - array of L elements |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 EXPORT |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
None by default. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 NAME |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
WWW::WolframAlpha::Sounds - Perl object returned via $pod->sounds |
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__ |