File Coverage

blib/lib/WWW/WolframAlpha/State.pm
Criterion Covered Total %
statement 12 21 57.1
branch 0 4 0.0
condition 0 2 0.0
subroutine 4 6 66.6
pod 0 2 0.0
total 16 35 45.7


line stmt bran cond sub pod time code
1             package WWW::WolframAlpha::State;
2              
3 1     1   18 use 5.008008;
  1         3  
  1         42  
4 1     1   6 use strict;
  1         2  
  1         29  
5 1     1   6 use warnings;
  1         1  
  1         46  
6              
7             require Exporter;
8              
9 1     1   5 use WWW::WolframAlpha::AssumptionValue;
  1         2  
  1         291  
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              
31             sub new {
32 0     0 0   my $class = shift;
33 0           my $xmlo = shift;
34              
35 0           my $self = {};
36              
37 0           my ($name);
38              
39 0 0         if ($xmlo) {
40 0   0       $name = $xmlo->{'name'} || undef;
41              
42 0 0         $self->{'name'} = $name if defined $name;
43             }
44              
45 0           return(bless($self, $class));
46             }
47              
48 0     0 0   sub name {shift->{'name'};}
49              
50              
51             # Preloaded methods go here.
52              
53             1;
54              
55              
56             =pod
57              
58             =head1 NAME
59              
60             WWW::WolframAlpha::State
61              
62             =head1 VERSION
63              
64             version 1.10
65              
66             =head1 SYNOPSIS
67              
68             foreach my $state (@{$pod->states->state}) {
69             print " name: ", $state->name, "\n";
70             }
71              
72             =head1 DESCRIPTION
73              
74             =head2 ATTRIBUTES
75              
76             $state->name
77              
78             =head1 NAME
79              
80             WWW::WolframAlpha::State - Perl objects accessed via $pod->(?:states|statelist)->state
81              
82             =head1 SEE ALSO
83              
84             WWW::WolframAlpha
85              
86             =head1 AUTHOR
87              
88             Gabriel Weinberg, Eyegg@alum.mit.eduE
89              
90             =head1 COPYRIGHT AND LICENSE
91              
92             Copyright (C) 2009 by Gabriel Weinberg
93              
94             This library is free software; you can redistribute it and/or modify
95             it under the same terms as Perl itself, either Perl version 5.8.8 or,
96             at your option, any later version of Perl 5 you may have available.
97              
98             =head1 AUTHOR
99              
100             Gabriel Weinberg
101              
102             =head1 COPYRIGHT AND LICENSE
103              
104             This software is copyright (c) 2009 by Gabriel Weinberg.
105              
106             This is free software; you can redistribute it and/or modify it under
107             the same terms as the Perl 5 programming language system itself.
108              
109             =cut
110              
111              
112             __END__