File Coverage

blib/lib/SLOOPS/Tut/Vehicule.pm
Criterion Covered Total %
statement 3 6 50.0
branch n/a
condition n/a
subroutine 1 2 50.0
pod 0 1 0.0
total 4 9 44.4


line stmt bran cond sub pod time code
1             package SLOOPS::Tut::Vehicule ;
2              
3 1     1   948 use base qw/Class::AutoAccess/ ;
  1         3  
  1         149  
4              
5             our $PERSIST = {
6             'fields' => {
7             'nbDoors' => [ 'INT' , 0 ], # Here we use the possibility to control how the attribut will be
8             # stored and what is its default value
9             'nbWheels' => [ 'INT' , 1 ]
10             },
11             'references' => {
12             'owner' => 'SLOOPS::Tut::Person' # Owner will be a reference on a person !!
13             }
14             };
15              
16             sub new{
17 0     0 0   my ($class) = @_ ;
18 0           my $self = {
19             'nbDoors' => undef ,
20             'nbWheels' => undef,
21             'owner' => undef
22             };
23 0           return bless $self, $class ;
24             }
25              
26             1;