blib/lib/Acme/Songmu.pm

filter: Statementstmt 96.6% 29 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 91.6% 11 / 12 Podpod 100% 3 / 3 totaltotal 95.5% 43 / 45 CC 1 SCAR 0.8
CC
1
Cov
97%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
↑ Summary
1 package Acme::Songmu;
2 3 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use Encode;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 ▶use version 0.77; our $VERSION = version->declare("v0.1.3");
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 ▶use Time::Piece ();
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 ▶use Class::Accessor::Lite::Lazy 0.03 (
Subroutine BEGIN: called CC=1 SCAR=0.2
12 ro => [qw/birthday first_name last_name/],
13 ro_lazy => {
14 0 ▶ age => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
15 int(
16 0 (Time::Piece->localtime->strftime('%Y%m%d') -
17 shift->birthday->strftime('%Y%m%d')
18 ) / 10000)
19 },
20 },
21 3 );
22  
23 4 ▶sub instance {
Subroutine instance: called CC=1 SCAR=0.0
Pod documented
24 4 state $_instance = bless {
25 birthday => Time::Piece->strptime('1980-06-05', '%Y-%m-%d'),
26 first_name => 'Masayuki',
27 last_name => 'Matsuki',
28 }, __PACKAGE__;
29 }
30  
31 1 ▶sub name {
Subroutine name: called CC=1 SCAR=0.0
Pod documented
32 1 my $self = shift;
33 1 sprintf '%s %s', $self->first_name, $self->last_name;
34 }
35  
36 1 ▶sub gmu {
Subroutine gmu: called CC=1 SCAR=0.0
Pod documented
37 1 say encode_utf8 'ぐむー';
38 }
39  
40 3 1;
41 __END__
↑ Summary