SD/Model/Comment.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 31 CC 2 SCAR 11.5
CC
2
Cov
0%
canonicalize_props
6.0
_default_summary_format
2.0
declared_props
2.0
CRAP 3.1
1 package App::SD::Model::Comment;
2 use Any::Moose;
3 extends 'App::SD::Record';
4  
5 use constant collection_class => 'App::SD::Collection::Comment';
6 has '+type' => ( default => 'comment');
7  
8  
9 sub _default_summary_format { '%s,$uuid | %s,content'}
10  
11 sub declared_props { return ('content', shift->SUPER::declared_props(@_)) }
12  
13 sub canonicalize_props {
14 my $self = shift;
15 my $props = shift;
16 $self->SUPER::canonicalize_props($props);
17  
18 unless ($props->{content}) {
19 delete $props->{$_} for keys %$props;
20 }
21 }
22  
23  
24 #has SVK::Model::Ticket;
25  
26 __PACKAGE__->register_reference( ticket => 'App::SD::Model::Ticket');
27  
28 __PACKAGE__->meta->make_immutable;
29 no Any::Moose;
30 1;