Set/Storage.pm

filter: Statementstmt 55.5% 5 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 1 / 3 Podpod 100% 2 / 2 totaltotal 57.1% 8 / 14 CC 1 SCAR 5.1
CC
1
Cov
56%
populate_context
2.0
set_context_property
2.0
BEGIN
1.0
CRAP 1.7
« Set/Restriction.pm ↑ Summary Set/Holder.pm »
1 package Context::Set::Storage;
2 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 =head1 NAME
5  
6 Context::Set::Storage - A base class for context storages.
7  
8 =cut
9  
10  
11 =head2 populate_context
12  
13 Populates the context from the storage, setting all its stored properties in one go.
14  
15 Usage:
16  
17 $this->populate_context($context);
18  
19 =cut
20  
21 0 ▶sub populate_context{
Subroutine populate_context: not called CC=1 SCAR=6.9
Pod documented
22 0 my ($self, $context) = @_;
23 0 confess("Please implement that on $self");
24 }
25  
26 =head2 set_context_property
27  
28 Gets called at set_property time by the framework.
29  
30 Dont forget to return the result of the given $after code ref
31 if you want to propagate the change in the memory object (which is what you want I suppose).
32  
33 usage:
34  
35 $this->set_context_property($context, $prop_name, $values,
36 sub{
37 ... Something done after the storage is set ...
38 });
39  
40  
41  
42 =cut
43  
44 0 ▶sub set_context_property{
Subroutine set_context_property: not called CC=1 SCAR=6.9
Pod documented
45 0 my ($self,$context, $prop, $v, $after) = @_;
46 0 confess("Please implement that on $self");
47 }
48  
49  
50  
51 3 __PACKAGE__->meta->make_immutable();
52 3 1;
« Set/Restriction.pm ↑ Summary Set/Holder.pm »