lib/Bb/Collaborate/Ultra/Session/Log/Attendee.pm

filter: Statementstmt 68.7% 22 / 32 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod n/a totaltotal 64.2% 27 / 42 CC 2 SCAR 8.1
CC
2
Cov
65%
_thaw
6.0
__ANON__
2.0
__ANON__
1.3
CRAP 2.3
« lib/Bb/Collaborate/Ultra/Session/Log.pm ↑ Summary script/bb-collab-session-log.pl »
1 package Bb::Collaborate::Ultra::Session::Log::Attendee;
2 1 ▶use warnings; use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 extends 'Bb::Collaborate::Ultra::DAO';
5 1 ▶use Mouse::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Bb::Collaborate::Ultra::Session::Log::Attendance;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 Bb::Collaborate::Ultra::Session::Attendee
11  
12 =head1 DESCRIPTION
13  
14 Logs Session attendances for an attendee.
15  
16 =head1 METHODS
17  
18 See L<https://xx-csa.bbcollab.com/documentation#Attendee-collection>
19  
20 =cut
21  
22 1 subtype 'ArrayOfAttendences',
23 as 'ArrayRef[Bb::Collaborate::Ultra::Session::Log::Attendance]';
24  
25 coerce 'ArrayOfAttendences',
26 from 'ArrayRef[HashRef]',
27 0 ▶ via { [ map {Bb::Collaborate::Ultra::Session::Log::Attendance->new($_)} (@$_) ] };
Subroutine __ANON__: not called CC=1 SCAR=2.6
28  
29 1 has 'attendance' => (isa => 'ArrayOfAttendences', is => 'rw', coerce => 1);
30  
31 sub _thaw {
32 0 ▶ my $self = shift;
Subroutine _thaw: not called CC=2 SCAR=17.9
33 0 my $data = shift;
34 0 my $thawed = $self->SUPER::_thaw($data, @_);
35 0 my $attendance = $data->{attendance};
36 0 ▶ $thawed->{attendance} = [ map { Bb::Collaborate::Ultra::Session::Log::Attendance->_thaw($_) } (@$attendance) ]
Branch: 1 branch
BranchTrueFalseTotal
if $attendance 0 0 0
37 if $attendance;
38 0 $thawed;
39 }
40  
41 coerce __PACKAGE__, from 'HashRef' => via {
42 0 ▶ __PACKAGE__->new( $_ )
Subroutine __ANON__: not called CC=1 SCAR=6.9
43 1 };
44
45 1 __PACKAGE__->load_schema(<DATA>);
46 # downloaded from https://xx-csa.bbcollab.com/documentation
47 1 1;
48 __DATA__
« lib/Bb/Collaborate/Ultra/Session/Log.pm ↑ Summary script/bb-collab-session-log.pl »