| 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__ | ||