File Coverage

blib/lib/Rex/JobControl/Mojolicious/Plugin/Project.pm
Criterion Covered Total %
statement 17 20 85.0
branch n/a
condition n/a
subroutine 6 7 85.7
pod 1 1 100.0
total 24 28 85.7


line stmt bran cond sub pod time code
1             #
2             # (c) Jan Gehring
3             #
4             # vim: set ts=3 sw=3 tw=0:
5             # vim: set expandtab:
6              
7             package Rex::JobControl::Mojolicious::Plugin::Project;
8             $Rex::JobControl::Mojolicious::Plugin::Project::VERSION = '0.7.0';
9 1     1   1929 use strict;
  1         3  
  1         45  
10 1     1   7 use warnings;
  1         2  
  1         31  
11              
12 1     1   6 use Mojolicious::Plugin;
  1         1  
  1         13  
13 1     1   903 use Rex::JobControl::Helper::Project;
  1         4  
  1         52  
14              
15 1     1   10 use base 'Mojolicious::Plugin';
  1         2  
  1         275  
16              
17             sub register {
18 1     1 1 62 my ( $plugin, $app ) = @_;
19              
20             $app->helper(
21             project => sub {
22 0     0     my ( $self, $name ) = @_;
23 0           my $u =
24             Rex::JobControl::Helper::Project->new( name => $name, app => $app );
25 0           return $u;
26             }
27 1         17 );
28             }
29              
30             1;