Message/Tag/Qt.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 96.5% 28 / 29 CC 2 SCAR 2.9
CC
2
Cov
100%
as_string
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Message.pm ↑ Summary Message/Tag/Info.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package WebService::ChatWork::Message::Tag::Qt;
4 1 ▶use overload q{""} => \&as_string;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 extends "WebService::ChatWork::Message::Tag";
8  
9 1 has account_id => ( is => "ro", isa => "Int" );
10 1 has time => ( is => "ro", isa => "Int" );
11 1 has message => ( is => "ro", isa => "Str" );
12  
13 2 ▶sub as_string {
Subroutine as_string: called CC=2 SCAR=6.9
Pod undocumented
14 2 my $self = shift;
15 2 ▶ if ( $self->time ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->time) { } 1 1 2
16 1 return sprintf "[qt][qtmeta aid=%d time=%d]%s[/qt]", $self->account_id, $self->time, $self->message;
17 }
18 else {
19 1 return sprintf "[qt][qtmeta aid=%d]%s[/qt]", $self->account_id, $self->message;
20 }
21 }
22  
23 1 1;
« Message.pm ↑ Summary Message/Tag/Info.pm »