File Coverage

blib/lib/Device/LPS331AP.pm
Criterion Covered Total %
statement 17 20 85.0
branch n/a
condition n/a
subroutine 6 7 85.7
pod n/a
total 23 27 85.1


line stmt bran cond sub pod time code
1 1     1   14724 use strict;
  1         2  
  1         24  
2 1     1   4 use warnings;
  1         1  
  1         46  
3              
4             package Device::LPS331AP;
5              
6             # PODNAME: Device::LPS331AP
7             # ABSTRACT: I2C interface to LPS331AP Thermometer and Barometer using Device::SMBus
8             #
9             # This file is part of Device-LPS331AP
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             our $VERSION = '0.006'; # VERSION
17              
18             # Dependencies
19 1     1   14 use 5.010;
  1         3  
20 1     1   450 use Moose;
  1         327792  
  1         6  
21 1     1   5305 use POSIX;
  1         4514  
  1         5  
22              
23 1     1   2262 use Device::Altimeter::LPS331AP;
  1         2  
  1         102  
24              
25              
26             has 'I2CBusDevicePath' => ( is => 'ro', );
27              
28              
29             has Altimeter => (
30             is => 'ro',
31             isa => 'Device::Altimeter::LPS331AP',
32             lazy_build => 1,
33             );
34              
35             sub _build_Altimeter {
36 0     0     my ($self) = @_;
37 0           my $obj =
38             Device::Altimeter::LPS331AP->new(
39             I2CBusDevicePath => $self->I2CBusDevicePath );
40 0           return $obj;
41             }
42              
43             1;
44              
45             __END__
46              
47             =pod
48              
49             =head1 NAME
50              
51             Device::LPS331AP - I2C interface to LPS331AP Thermometer and Barometer using Device::SMBus
52              
53              
54              
55             =begin html
56              
57             <p>
58             <img src="https://img.shields.io/badge/perl-5.10+-brightgreen.svg" alt="Requires Perl 5.10+" />
59             <a href="https://travis-ci.org/shantanubhadoria/perl-Device-LPS331AP"><img src="https://api.travis-ci.org/shantanubhadoria/perl-Device-LPS331AP.svg?branch=build/master" alt="Travis status" /></a>
60             <a href="http://matrix.cpantesters.org/?dist=Device-LPS331AP%200.006"><img src="https://badgedepot.code301.com/badge/cpantesters/Device-LPS331AP/0.006" alt="CPAN Testers result" /></a>
61             <a href="http://cpants.cpanauthors.org/dist/Device-LPS331AP-0.006"><img src="https://badgedepot.code301.com/badge/kwalitee/Device-LPS331AP/0.006" alt="Distribution kwalitee" /></a>
62             <a href="https://gratipay.com/shantanubhadoria"><img src="https://img.shields.io/gratipay/shantanubhadoria.svg" alt="Gratipay" /></a>
63             </p>
64              
65             =end html
66              
67             =head1 VERSION
68              
69             version 0.006
70              
71             =head1 ATTRIBUTES
72              
73             =head2 I2CBusDevicePath
74              
75             this is the device file path for your I2CBus that the LPS331AP is connected on e.g. /dev/i2c-1
76             This must be provided during object creation.
77              
78             =head2 Altimeter
79              
80             $self->Altimeter->enable();
81             $self->Altimeter->getReading();
82              
83             This is a object of L<Device::Altimeter::LPS331AP>
84              
85             =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
86              
87             =head1 SUPPORT
88              
89             =head2 Bugs / Feature Requests
90              
91             Please report any bugs or feature requests through github at
92             L<https://github.com/shantanubhadoria/perl-device-lps331ap/issues>.
93             You will be notified automatically of any progress on your issue.
94              
95             =head2 Source Code
96              
97             This is open source software. The code repository is available for
98             public review and contribution under the terms of the license.
99              
100             L<https://github.com/shantanubhadoria/perl-device-lps331ap>
101              
102             git clone git://github.com/shantanubhadoria/perl-device-lps331ap.git
103              
104             =head1 AUTHOR
105              
106             Shantanu Bhadoria <shantanu at cpan dott org>
107              
108             =head1 CONTRIBUTOR
109              
110             =for stopwords Shantanu
111              
112             Shantanu <shantanu@cpan.org>
113              
114             =head1 COPYRIGHT AND LICENSE
115              
116             This software is copyright (c) 2016 by Shantanu Bhadoria.
117              
118             This is free software; you can redistribute it and/or modify it under
119             the same terms as the Perl 5 programming language system itself.
120              
121             =cut