lib/Riji/Models.pm

filter: Statementstmt 92.0% 23 / 25 Branchbran 33.3% 2 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 1 totaltotal 82.5% 33 / 40 CC 4 SCAR 9.9
CC
4
Cov
81%
__ANON__
6.3
__ANON__
2.4
register_blog
1.1
CRAP 2.7
« blib/lib/Riji/CLI/Setup.pm ↑ Summary blib/lib/Riji/CLI/Help.pm »
1 package Riji::Models;
2 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 15 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 15 ▶use URI;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 15 ▶use Object::Container -base;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 15 ▶sub register_blog {
Subroutine register_blog: called CC=1 SCAR=0.8
Pod undocumented
10 9 ▶ register Blog => sub {
Subroutine __ANON__: called CC=2 SCAR=8.7
11 9 my $self = shift;
12 9 my $conf = $self->get('config');
13 9 ▶ my $site_url = sub {
Subroutine __ANON__: called CC=3 SCAR=18.4
14 9 ▶ return URI->new($conf->{site_url}) if $conf->{site_url};
Branch: 1 branch
BranchTrueFalseTotal
if $conf->{"site_url"} 9 0 9
15  
16 0 require Riji;
17 0 ▶ Riji->context ? Riji->context->req->base : URI->new('http://unknown.example.com/');
Branch: 1 branch
BranchTrueFalseTotal
'Riji'->context ? : 0 0 0
18 9 }->();
19  
20 $self->ensure_class_loaded('Riji::Model::Blog')->new(
21 base_dir => $self->get('base_dir'),
22 site_url => $site_url,
23 author => $conf->{author},
24 title => $conf->{title},
25 9 ▶ ($conf->{branch} ? (branch => $conf->{branch}) : ()),
Branch: 1 branch
BranchTrueFalseTotal
$conf->{'branch'} ? : 0 9 9
26 );
27 15 };
28 }
29 15 register_blog;
30  
31 15 ▶no Object::Container;
Subroutine BEGIN: called CC=1 SCAR=0.0
32 15 1;
« blib/lib/Riji/CLI/Setup.pm ↑ Summary blib/lib/Riji/CLI/Help.pm »