NAME
Health::BFI - Interface to Body Fat Index.
VERSION
Version 0.02
DESCRIPTION
A person's body fat percentage is the total mass of the person's fat divided by the person's mass and consists of essential body fat and storage body fat.Essential body fat is necessary to maintain life and reproductive functions. Storage body fat consists of fat accumulation in adipose tissue, part of which protects internal organs in the chest and abdomen.
Some regard the body fat percentage as the better measure of an individual's fitness level, as it is the only body measurement which directly calculates the particular individual's body composition without regard to the individual's height or mass.
CONSTRUCTOR
It expects optionally reference to an anonymous hash with the following keys:
+-------------+----------+---------+
| Key | Value | Default |
+-------------+----------+---------+
| mass_unit | kg/lb/st | lb |
| length_unit | m /in/ft | in |
+-------------+----------+---------+
use strict; use warnings;
use Health::BFI;
my $bfi_1 = Health::BFI->new({ mass_unit => 'st', length_unit => 'ft' });
# or simply
my $bfi_2 = Health::BFI->new();
METHODS
get_bfi()
Return Body Fat Index for the given input. Parameters should be passed in as reference to hash with the following key,value pairs:
+---------+-------------------------------------------+
| Key | Value |
+---------+-------------------------------------------+
| sex | m | f |
| mass | mass (kg | lb | st) |
| waist | measurement (m | in | ft) |
| wrist | measurement (m | in | ft) ONLY for female |
| hips | measurement (m | in | ft) ONLY for female |
| forearm | measurement (m | in | ft) ONLY for female |
+---------+-------------------------------------------+
use strict; use warnings;
use Health::BFI;
my $bfi = Health::BFI->new();
print $bfi->get_bfi({sex => 'f', mass => 60, waist => 38, wrist => 3, hips => 30, forearm => 3}) . "\n";
print $bfi->get_bfi({sex => 'm', mass => 60, waist => 40}) . "\n";
get_category()
Different cultures value different body compositions differently at different times, and some are related to health/athletic performance. Levels of body fat are epidemiologically dependent on gender and age. Different authorities have developed different recommendations for ideal body fat percentages.The table below describes different percentages but isn't recommendation.
+---------------+--------+--------+
| Category | Women | Men |
+---------------+--------+--------+
| Essential Fat | 10-13% | 2-5% |
| Athletes | 14-20% | 6-13% |
| Fitness | 21-24% | 14-17% |
| Average | 25-31% | 18-24% |
| Obese | 32%+ | 25%+ |
+---------------+--------+--------+
use strict; use warnings;
use Health::BFI;
my $bfi = Health::BFI->new();
print $bfi->get_bfi({sex => 'm', mass => 60, waist => 40}) . "\n";
print $bfi->get_category() . "\n";
AUTHOR
Mohammad S Anwar, <mohammad.anwar at yahoo.com>
BUGS
Please report any bug/feature requests to bug-health-bfi at rt.cpan.org
/ through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Health-BFI. I will be notified & then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Health::BFI
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
Copyright 2011 Mohammad S Anwar.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
DISCLAIMER
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.