line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Metaweb::Result; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
72
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
177
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Metaweb::Result - Result set from a Metaweb query |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 SYNOPSIS |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $mw = Metaweb->new($args); |
13
|
|
|
|
|
|
|
$mw->login(); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $result = $mw->query($name, $query_hash); |
16
|
|
|
|
|
|
|
# $result isa Metaweb::Result |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use Data::Dumper; |
19
|
|
|
|
|
|
|
print Dumper $result; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 DESCRIPTION |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
This class doesn't do much of anything yet. It just gives you an object |
24
|
|
|
|
|
|
|
you can treat as a hashref. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head2 new() |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Simple constructor. Takes a result as a perl data structure and |
29
|
|
|
|
|
|
|
basically just turns it into a Metaweb::Result object. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub new { |
34
|
0
|
|
|
0
|
1
|
|
my ($class, $result) = @_; |
35
|
0
|
|
|
|
|
|
my $self = { content => $result }; |
36
|
0
|
|
|
|
|
|
bless $self, $class; |
37
|
0
|
|
|
|
|
|
return $self; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 SEE ALSO |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
L |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |