File Coverage

blib/lib/BusyBird.pm
Criterion Covered Total %
statement 19 19 100.0
branch 2 2 100.0
condition n/a
subroutine 8 8 100.0
pod 3 3 100.0
total 32 32 100.0


line stmt bran cond sub pod time code
1             package BusyBird;
2 1     1   511 use strict;
  1         2  
  1         46  
3 1     1   6 use warnings;
  1         2  
  1         37  
4 1     1   470 use BusyBird::Main;
  1         3  
  1         30  
5 1     1   524 use BusyBird::Main::PSGI qw(create_psgi_app);
  1         89  
  1         71  
6 1     1   5 use Exporter qw(import);
  1         1  
  1         123  
7              
8             our $VERSION = '0.11';
9              
10             our @EXPORT = our @EXPORT_OK = qw(busybird timeline end);
11              
12             my $singleton_main;
13              
14             sub busybird {
15 10 100   10 1 337 return defined($singleton_main)
16             ? $singleton_main : ($singleton_main = BusyBird::Main->new);
17             }
18              
19             sub timeline {
20 1     1 1 1 my ($timeline_name) = @_;
21 1         3 return busybird()->timeline($timeline_name);
22             }
23              
24             sub end {
25 1     1 1 340 return create_psgi_app(busybird());
26             }
27              
28             1;
29              
30             __END__