Diabetes::Glucose - A simple utility package for storing and manipulating glucose values
This document describes version 1.0
my $glucose = Diabetes::Glucose->new( mgdl => '103', # could also use mmol => 5.9 stamp => DateTime->now, comment => 'Used a OneTouch meter', source => 'Manual Entry' ); say $glucose->mgdl; # 103 say $glucose->mmol; # 5.674931129476585... say $glucose->source; # Manual Entry
Creates a new object. Nothing much to see here.
A commment for this particular reading, if anything of note happened. Some systems may make use of it, for whatever purposes they want.
The source of the reading. This is ued by Parse::Dexcom::Tab and Parse::Medtronic::Tab to note the souce of the reading. Diabetes::Graph::Glucose also makes use of this to note the source of data.
A timestamp. Should be a DateTime object. Will try hard to convert time-like strings into DateTime objects, but no guarantees. Give it what it wants and no one gets hurt. Defaults to <DateTime-now>>.
<DateTime-
Display the currently-stored value in the unit system specified. Using the same data from the SYNOPSIS:
say $glucose->mgdl # 103 say $glucose->mmol # 5.67... etc, etc.
The conversion is done at object construction, don't try to change it later, it won't work like you think.
None known, so probably lots.
Dave Houston dhouston@cpan.org
This software is copyright (c) 2015 by Dave Houston. This is free software; you can redistribute and/or modify it under teh same terms as the Perl 5 programming language.
To install Diabetes::Glucose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Diabetes::Glucose
CPAN shell
perl -MCPAN -e shell install Diabetes::Glucose
For more information on module installation, please visit the detailed CPAN module installation guide.