Construction/Role/Object.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Construction/Role/Buffering.pm ↑ Summary
1 package Math::Geometry::Construction::Role::Object;
2 15 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 15 ▶use 5.008008;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 15 ▶use Math::Geometry::Construction::Types qw(Construction);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 15 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 =head1 NAME
10  
11 C<Math::Geometry::Construction::Role::Object> - shared administrative issues
12  
13 =head1 VERSION
14  
15 Version 0.024
16  
17 =cut
18  
19 15 our $VERSION = '0.024';
20  
21  
22 ###########################################################################
23 # #
24 # Accessors #
25 # #
26 ###########################################################################
27  
28 15 requires 'id_template';
29  
30 15 has 'id' => (isa => 'Str',
31 is => 'ro',
32 required => 1,
33 lazy => 1,
34 builder => '_generate_id');
35  
36 15 has 'order_index' => (isa => 'Int',
37 is => 'ro',
38 required => 1);
39  
40 15 has 'construction' => (isa => Construction,
41 is => 'ro',
42 required => 1,
43 weak_ref => 1);
44  
45 ###########################################################################
46 # #
47 # Retrieve Data #
48 # #
49 ###########################################################################
50  
51 564 ▶sub _generate_id {
Subroutine _generate_id: called CC=1 SCAR=0.0
52 564 my ($self) = @_;
53
54 564 return sprintf($self->id_template, $self->order_index);
55 }
56  
57 ###########################################################################
58 # #
59 # Change Data #
60 # #
61 ###########################################################################
62  
63 15 1;
64  
65  
66 __END__
« Construction/Role/Buffering.pm ↑ Summary