Device-USB-PCSensor-HidTEMPer

 view release on metacpan or  search on metacpan

lib/Device/USB/PCSensor/HidTEMPer/Sensor.pm  view on Meta::CPAN

package Device::USB::PCSensor::HidTEMPer::Sensor;

use strict;
use warnings;

use Scalar::Util qw/ weaken /;

=head1

Device::USB::PCSensor::HidTEMPer::Sensor - Generic sensor class

=head1 VERSION

Version 0.0301

=cut

lib/Device/USB/PCSensor/HidTEMPer/Sensor.pm  view on Meta::CPAN

sub new
{
    my $class       = shift;
    my ( $unit )    = @_;
    
    # All devices are required to spesify the temperature range
    my $self    = {
        unit    => $unit,
    };
    
    weaken $self->{unit};
    
    bless $self, $class;
    return $self;
}

=item * fahrenheit()

Reads the current temperature and returns the corresponding value in 
fahrenheit degrees.

lib/Device/USB/PCSensor/HidTEMPer/Sensor.pm  view on Meta::CPAN

sub celsius { 
    return undef; 
}

=back

=head1 DEPENDENCIES

This module internally includes and takes use of the following packages:

  use Scalar::Util qw/ weaken /;

This module uses the strict and warning pragmas. 

=head1 BUGS

Please report any bugs or missing features using the CPAN RT tool.

=head1 FOR MORE INFORMATION

None



( run in 0.780 second using v1.01-cache-2.11-cpan-65fba6d93b7 )