L3GD20.pm

filter: Statementstmt 87.5% 21 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 87.1% 27 / 31 CC 1 SCAR 1.3
CC
1
Cov
88%
_build_Gyroscope
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Gyroscope/L3GD20.pm ↑ Summary
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Device::L3GD20;
5  
6 # PODNAME: Device::L3GD20
7 # ABSTRACT: I2C interface to L3GD20 3 axis GyroScope using Device::SMBus
8 #
9 # This file is part of Device-L3GD20
10 #
11 # This software is copyright (c) 2016 by Shantanu Bhadoria.
12 #
13 # This is free software; you can redistribute it and/or modify it under
14 # the same terms as the Perl 5 programming language system itself.
15 #
16 2 our $VERSION = '0.010'; # VERSION
17  
18 # Dependencies
19 2 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 ▶use POSIX;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 2 ▶use Device::Gyroscope::L3GD20;
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25  
26 2 has 'I2CBusDevicePath' => ( is => 'ro', );
27  
28  
29 2 has Gyroscope => (
30 is => 'ro',
31 isa => 'Device::Gyroscope::L3GD20',
32 lazy_build => 1,
33 );
34  
35 0 ▶sub _build_Gyroscope {
Subroutine _build_Gyroscope: not called CC=1 SCAR=6.9
36 0 my ($self) = @_;
37 0 my $obj =
38 Device::Gyroscope::L3GD20->new(
39 I2CBusDevicePath => $self->I2CBusDevicePath, );
40 0 return $obj;
41 }
42  
43 2 1;
44  
45 __END__
« Gyroscope/L3GD20.pm ↑ Summary