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.
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
- 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.
None known, so probably lots.
Dave Houston firstname.lastname@example.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.