NAME
Diabetes::Glucose - A simple utility package for storing and manipulating glucose values
VERSION
This document describes version 1.0
SYNOPSIS
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
METHODS
- new
-
Creates a new object. Nothing much to see here.
- comment
-
A commment for this particular reading, if anything of note happened. Some systems may make use of it, for whatever purposes they want.
- source
-
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.
- stamp
-
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>>. - mgdl, mmol
-
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.
BUGS
None known, so probably lots.
AUTHOR
Dave Houston dhouston@cpan.org
LICENSE AND COPYRIGHT
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.