blib/lib/Acme/Songmu.pm

filter: Statementstmt 87.5% 21 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod n/a totaltotal 87.8% 29 / 33 CC 1 SCAR 1.5
CC
1
Cov
88%
__ANON__
2.0
BEGIN
1.4
BEGIN
1.0
CRAP 1.2
↑ 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.5");
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=3.5
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 0 );
22  
23 sub instance {
24 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 sub name {
32 my $self = shift;
33 sprintf '%s %s', $self->first_name, $self->last_name;
34 }
35  
36 sub gmu {
37 say encode_utf8 'ぐむー';
38 }
39  
40 1;
41 __END__
↑ Summary