File Coverage

blib/lib/BusyBird.pm
Criterion Covered Total %
statement 22 22 100.0
branch 2 2 100.0
condition n/a
subroutine 9 9 100.0
pod 3 3 100.0
total 36 36 100.0


line stmt bran cond sub pod time code
1             package BusyBird;
2 1     1   817 use v5.8.0;
  1         3  
  1         39  
3 1     1   4 use strict;
  1         1  
  1         32  
4 1     1   3 use warnings;
  1         2  
  1         22  
5 1     1   1099 use BusyBird::Main;
  1         2  
  1         46  
6 1     1   428 use BusyBird::Main::PSGI qw(create_psgi_app);
  1         3  
  1         73  
7 1     1   7 use Exporter 5.57 qw(import);
  1         19  
  1         137  
8              
9             our $VERSION = '0.12';
10              
11             our @EXPORT = our @EXPORT_OK = qw(busybird timeline end);
12              
13             my $singleton_main;
14              
15             sub busybird {
16 10 100   10 1 882 return defined($singleton_main)
17             ? $singleton_main : ($singleton_main = BusyBird::Main->new);
18             }
19              
20             sub timeline {
21 1     1 1 3 my ($timeline_name) = @_;
22 1         4 return busybird()->timeline($timeline_name);
23             }
24              
25             sub end {
26 1     1 1 653 return create_psgi_app(busybird());
27             }
28              
29             1;
30              
31             __END__