DBIC/Resource/HAL/Role/Item.pm

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