File Coverage

blib/lib/Ubigraph.pm
Criterion Covered Total %
statement 10 12 83.3
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 14 16 87.5


line stmt bran cond sub pod time code
1             package Ubigraph;
2              
3 1     1   25637 use 5.006;
  1         4  
  1         122  
4 1     1   6 use strict;
  1         2  
  1         35  
5 1     1   5 use warnings;
  1         6  
  1         39  
6 1     1   479 use Frontier::Client;
  0            
  0            
7              
8             use Ubigraph::Edge;
9             use Ubigraph::Vertex;
10              
11             our $VERSION = '0.05';
12              
13              
14             sub new {
15             my $pkg = shift;
16             my $url = shift || 'http://127.0.0.1:20738/RPC2';
17             my $this = {};
18             bless $this;
19              
20             $this->{'client'} = Frontier::Client->new(url=>$url);
21             $this->clear();
22              
23             return $this;
24             }
25              
26              
27             sub clear {
28             my $this = shift;
29             $this->{'client'}->call('ubigraph.clear', 0);
30             }
31              
32              
33             sub Vertex{
34             return new Ubigraph::Vertex(@_);
35             }
36              
37             sub newVertex{
38             return new Ubigraph::Vertex(@_);
39             }
40              
41             sub Edge{
42             return new Ubigraph::Edge(@_);
43             }
44              
45             sub newEdge{
46             return new Ubigraph::Edge(@_);
47             }
48              
49              
50              
51             1;
52             __END__