DBIC/Resource/HAL/Role/Set.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 95.8% 23 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.0
« DBIC/Resource/HAL/Role/Item.pm ↑ Summary DBIC/Resource/ActiveModel/Role/Set.pm »
1 package WebAPI::DBIC::Resource::HAL::Role::Set;
2 25 $WebAPI::DBIC::Resource::HAL::Role::Set::VERSION = '0.004002';
3  
4 25 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 25 ▶use Carp qw(confess);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 25 requires '_build_content_types_provided';
9 25 requires 'encode_json';
10 25 requires 'render_set_as_hal';
11 25 requires 'set';
12  
13  
14 69 ▶around '_build_content_types_provided' => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
15 69 my $orig = shift;
16 69 my $self = shift;
17 69 my $types = $self->$orig();
18 69 unshift @$types, { 'application/hal+json' => 'to_json_as_hal' };
19 69 return $types;
20 25 };
21  
22  
23 24 ▶sub to_json_as_hal { return $_[0]->encode_json($_[0]->render_set_as_hal( $_[0]->set)) }
Subroutine to_json_as_hal: called CC=1 SCAR=0.0
Pod undocumented
24  
25  
26 25 1;
27  
28 __END__
« DBIC/Resource/HAL/Role/Item.pm ↑ Summary DBIC/Resource/ActiveModel/Role/Set.pm »