| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package WWW::WolframAlpha::Infos; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 16 | use 5.008008; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 35 |  | 
| 4 | 1 |  |  | 1 |  | 5 | use strict; | 
|  | 1 |  |  |  |  | 6 |  | 
|  | 1 |  |  |  |  | 32 |  | 
| 5 | 1 |  |  | 1 |  | 13 | use warnings; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 34 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | require Exporter; | 
| 8 |  |  |  |  |  |  |  | 
| 9 | 1 |  |  | 1 |  | 530 | use WWW::WolframAlpha::Info; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 393 |  | 
| 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 |  |  |  |  |  |  |  | 
| 38 | 0 |  |  |  |  |  | my ($count,$info); | 
| 39 |  |  |  |  |  |  |  | 
| 40 | 0 | 0 |  |  |  |  | if ($xmlo) { | 
| 41 | 0 |  | 0 |  |  |  | $count = $xmlo->{'count'} || undef; | 
| 42 | 0 |  | 0 |  |  |  | $info = $xmlo->{'info'} || undef; | 
| 43 |  |  |  |  |  |  |  | 
| 44 | 0 | 0 |  |  |  |  | $self->{'count'} = $count if defined $count; | 
| 45 |  |  |  |  |  |  |  | 
| 46 | 0 | 0 |  |  |  |  | if (defined $info) { | 
| 47 | 0 |  |  |  |  |  | @{$self->{'info'}} = (); | 
|  | 0 |  |  |  |  |  |  | 
| 48 | 0 |  |  |  |  |  | foreach my $value (@{$info}) { | 
|  | 0 |  |  |  |  |  |  | 
| 49 | 0 |  |  |  |  |  | push(@{$self->{'info'}}, WWW::WolframAlpha::Info->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 info {shift->{'info'};} | 
| 60 |  |  |  |  |  |  |  | 
| 61 |  |  |  |  |  |  | # Preloaded methods go here. | 
| 62 |  |  |  |  |  |  |  | 
| 63 |  |  |  |  |  |  | 1; | 
| 64 |  |  |  |  |  |  |  | 
| 65 |  |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | =pod | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | =head1 NAME | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  | WWW::WolframAlpha::Infos | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | =head1 VERSION | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | version 1.10 | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | if ($pod->infos->count) { | 
| 79 |  |  |  |  |  |  | foreach my $info (@{$pod->infos->info}) { | 
| 80 |  |  |  |  |  |  | ... | 
| 81 |  |  |  |  |  |  | } | 
| 82 |  |  |  |  |  |  | } | 
| 83 |  |  |  |  |  |  |  | 
| 84 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 85 |  |  |  |  |  |  |  | 
| 86 |  |  |  |  |  |  | =head2 ATTRIBUTES | 
| 87 |  |  |  |  |  |  |  | 
| 88 |  |  |  |  |  |  | $infos->count | 
| 89 |  |  |  |  |  |  |  | 
| 90 |  |  |  |  |  |  | =head2 SECTOINS | 
| 91 |  |  |  |  |  |  |  | 
| 92 |  |  |  |  |  |  | $infos->info - array of L elements | 
| 93 |  |  |  |  |  |  |  | 
| 94 |  |  |  |  |  |  | =head2 EXPORT | 
| 95 |  |  |  |  |  |  |  | 
| 96 |  |  |  |  |  |  | None by default. | 
| 97 |  |  |  |  |  |  |  | 
| 98 |  |  |  |  |  |  | =head1 NAME | 
| 99 |  |  |  |  |  |  |  | 
| 100 |  |  |  |  |  |  | WWW::WolframAlpha::Infos - Perl object returned via $pod->infos | 
| 101 |  |  |  |  |  |  |  | 
| 102 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 103 |  |  |  |  |  |  |  | 
| 104 |  |  |  |  |  |  | L | 
| 105 |  |  |  |  |  |  |  | 
| 106 |  |  |  |  |  |  | =head1 AUTHOR | 
| 107 |  |  |  |  |  |  |  | 
| 108 |  |  |  |  |  |  | Gabriel Weinberg, Eyegg@alum.mit.eduE | 
| 109 |  |  |  |  |  |  |  | 
| 110 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 111 |  |  |  |  |  |  |  | 
| 112 |  |  |  |  |  |  | Copyright (C) 2009 by Gabriel Weinberg | 
| 113 |  |  |  |  |  |  |  | 
| 114 |  |  |  |  |  |  | This library is free software; you can redistribute it and/or modify | 
| 115 |  |  |  |  |  |  | it under the same terms as Perl itself, either Perl version 5.8.8 or, | 
| 116 |  |  |  |  |  |  | at your option, any later version of Perl 5 you may have available. | 
| 117 |  |  |  |  |  |  |  | 
| 118 |  |  |  |  |  |  | =head1 AUTHOR | 
| 119 |  |  |  |  |  |  |  | 
| 120 |  |  |  |  |  |  | Gabriel Weinberg | 
| 121 |  |  |  |  |  |  |  | 
| 122 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 123 |  |  |  |  |  |  |  | 
| 124 |  |  |  |  |  |  | This software is copyright (c) 2009 by Gabriel Weinberg. | 
| 125 |  |  |  |  |  |  |  | 
| 126 |  |  |  |  |  |  | This is free software; you can redistribute it and/or modify it under | 
| 127 |  |  |  |  |  |  | the same terms as the Perl 5 programming language system itself. | 
| 128 |  |  |  |  |  |  |  | 
| 129 |  |  |  |  |  |  | =cut | 
| 130 |  |  |  |  |  |  |  | 
| 131 |  |  |  |  |  |  |  | 
| 132 |  |  |  |  |  |  | __END__ |