| 1 | package Data::Vitals; | ||
| 2 | |||
| 3 | =pod | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | Data::Vitals - The Perl "Vital Statistics" Library | ||
| 8 | |||
| 9 | =head1 DESCRIPTION | ||
| 10 | |||
| 11 | The world of clothing and fashion works to an annoyingly anacronistic and | ||
| 12 | complicated set of measurements. The Perl "Vital Statistics" Library is an | ||
| 13 | attempt to create a comprehensive set of classes, object and algorithms for | ||
| 14 | working with human-describing data such as height, body measurements, shoe, | ||
| 15 | bra and other clothing sizes. | ||
| 16 | |||
| 17 | It is not intended to be the end to a means, or the solution to a specific | ||
| 18 | problem, but rather a general package that can be used to build more specific | ||
| 19 | packages. It is intended that the library should be extremely flexible, | ||
| 20 | highly extendible, support locales in some form, and be heavily unit tested | ||
| 21 | to ensure that packages built on top of Data::Vitals have a reliable base. | ||
| 22 | |||
| 23 | Data::Vitals measurement objects are useful for both male and female | ||
| 24 | measurements. | ||
| 25 | |||
| 26 | =head2 Implementation Style | ||
| 27 | |||
| 28 | As is generally the case with complex and twisty subjects (such as | ||
| 29 | L<DateTime>) this library is implemented in a highly object-orientated | ||
| 30 | form. | ||
| 31 | |||
| 32 | For the sake of completeness we take this to rather extreme levels. For | ||
| 33 | example, a Data::Vitals::Waist object specifically refers for a | ||
| 34 | measurement of the circumference of the torso taken at a waist. | ||
| 35 | |||
| 36 | =head2 Metric and Imperial | ||
| 37 | |||
| 38 | Please note that all measurements are stored and stringified into metric | ||
| 39 | values (although they can be input in various forms). This is for forward | ||
| 40 | compability with the long term worldwide trend towards metrification. For | ||
| 41 | now, locales that use imperial values should explicitly call the various | ||
| 42 | C<< ->as_imperial >> methods. | ||
| 43 | |||
| 44 | =head2 Class List | ||
| 45 | |||
| 46 | L<Data::Vitals::Height> - Height measurement | ||
| 47 | |||
| 48 | L<Data::Vitals::Circumference> - General circumference measurement | ||
| 49 | |||
| 50 | L<Data::Vitals::Hips> - Measurement of the circumference around the hips | ||
| 51 | |||
| 52 | L<Data::Vitals::Waist> - Measurement of the circumference around the waist | ||
| 53 | |||
| 54 | L<Data::Vitals::Frame> - The "Frame" measurement. Circumference around the | ||
| 55 | chest, just below the breasts. | ||
| 56 | |||
| 57 | L<Data::Vitals::Chest> - Measurement of the circumference around the chest | ||
| 58 | |||
| 59 | L<Data::Vitals::Underarm> - Measurement of the circumference around the | ||
| 60 | torso at a position under the arms. | ||
| 61 | |||
| 62 | =head1 STATUS | ||
| 63 | |||
| 64 | This contains an implementation of Height measurements, plus a number of | ||
| 65 | measurements of the circumference of the torso at various points. i.e. | ||
| 66 | Hips/Waist/Chest/etc | ||
| 67 | |||
| 68 | Unit testing and documentation is up to date. | ||
| 69 | |||
| 70 | Please note that nothing that produces an error (by returning C<undef>) sets | ||
| 71 | an error message in any form. This will be resolved in a later version. | ||
| 72 | |||
| 73 | Please note that the measurement ranges are very large by default. The | ||
| 74 | maximum allowable values exceed by a small percentage the world records for | ||
| 75 | the various measurements (at the time of writing). | ||
| 76 | |||
| 77 | However, the minimums of the range may be unsuitable for newborn or premature | ||
| 78 | babies. The ability to customise these ranges will be added in a later | ||
| 79 | version. | ||
| 80 | |||
| 81 | =head1 METHODS | ||
| 82 | |||
| 83 | =cut | ||
| 84 | |||
| 85 | 3 | ▶ | use 5.005; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 86 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 87 | |||
| 88 | # Load the entire distribution | ||
| 89 | 3 | ▶ | use Data::Vitals::Util (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 90 | 3 | ▶ | use Data::Vitals::Height (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 91 | 3 | ▶ | use Data::Vitals::Circumference (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 92 | 3 | ▶ | use Data::Vitals::Hips (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 93 | 3 | ▶ | use Data::Vitals::Waist (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 94 | 3 | ▶ | use Data::Vitals::Frame (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 95 | 3 | ▶ | use Data::Vitals::Chest (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 96 | 3 | ▶ | use Data::Vitals::Underarm (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 97 | |||
| 98 | 3 | ▶ | use vars qw{$VERSION}; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 99 | 3 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 100 | 3 | $VERSION = '1.06'; | |
| 101 | } | ||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | |||
| 106 | |||
| 107 | ##################################################################### | ||
| 108 | # Constructor Shortcuts | ||
| 109 | |||
| 110 | =pod | ||
| 111 | |||
| 112 | =head2 height $height | ||
| 113 | |||
| 114 | The C<height> method creates and returns a height object. It takes as | ||
| 115 | argument a "height string". | ||
| 116 | |||
| 117 | Returns a new L<Data::Vitals::Height> object on success, or C<undef> on | ||
| 118 | error. | ||
| 119 | |||
| 120 | =cut | ||
| 121 | |||
| 122 | 1 | ▶ | sub height { |
|
Subroutine
height: called CC=1 SCAR=0.0
Pod
documented
| |||
| 123 | 1 | Data::Vitals::Height->new($_[1]); | |
| 124 | } | ||
| 125 | |||
| 126 | ###------------------------------------------------------------------ | ||
| 127 | |||
| 128 | =pod | ||
| 129 | |||
| 130 | =head2 hips $circumference | ||
| 131 | |||
| 132 | The C<hips> method creates and returns a hip measurement object. | ||
| 133 | |||
| 134 | It takes as argument a "circumference string" | ||
| 135 | (see L<Data::Vitals::Circumference> for details) | ||
| 136 | |||
| 137 | Returns a new L<Data::Vitals::Hips> object, or C<undef> on error. | ||
| 138 | |||
| 139 | =cut | ||
| 140 | |||
| 141 | 1 | ▶ | sub hips { |
|
Subroutine
hips: called CC=1 SCAR=0.0
Pod
documented
| |||
| 142 | 1 | Data::Vitals::Hips->new($_[1]); | |
| 143 | } | ||
| 144 | |||
| 145 | ###------------------------------------------------------------------ | ||
| 146 | |||
| 147 | =pod | ||
| 148 | |||
| 149 | =head2 waist $circumference | ||
| 150 | |||
| 151 | The C<waist> method creates and returns a waist measurement object. | ||
| 152 | |||
| 153 | It takes as argument a "circumference string" | ||
| 154 | (see L<Data::Vitals::Circumference> for details) | ||
| 155 | |||
| 156 | Returns a new L<Data::Vitals::Waist> object, or C<undef> on error. | ||
| 157 | |||
| 158 | =cut | ||
| 159 | |||
| 160 | 1 | ▶ | sub waist { |
|
Subroutine
waist: called CC=1 SCAR=0.0
Pod
documented
| |||
| 161 | 1 | Data::Vitals::Waist->new($_[1]); | |
| 162 | } | ||
| 163 | |||
| 164 | ###------------------------------------------------------------------ | ||
| 165 | |||
| 166 | =pod | ||
| 167 | |||
| 168 | =head2 frame $circumference | ||
| 169 | |||
| 170 | The C<frame> method creates and returns a "frame" measurement object. | ||
| 171 | Mainly used for women, the frame is the circumference of the torso over the | ||
| 172 | rib cage, immediately below the breasts and specifically not included any | ||
| 173 | breast material. | ||
| 174 | |||
| 175 | It takes as argument a "circumference string" | ||
| 176 | (see L<Data::Vitals::Circumference> for details) | ||
| 177 | |||
| 178 | Returns a new L<Data::Vitals::Frame> object, or C<undef> on error. | ||
| 179 | |||
| 180 | =cut | ||
| 181 | |||
| 182 | 1 | ▶ | sub frame { |
|
Subroutine
frame: called CC=1 SCAR=0.0
Pod
documented
| |||
| 183 | 1 | Data::Vitals::Frame->new($_[1]); | |
| 184 | } | ||
| 185 | |||
| 186 | ###------------------------------------------------------------------ | ||
| 187 | |||
| 188 | =pod | ||
| 189 | |||
| 190 | =head2 chest $circumference | ||
| 191 | |||
| 192 | The C<chest> method creates and returns a chest measurement object. For | ||
| 193 | women, this is also known as a "bust" measurement. | ||
| 194 | |||
| 195 | It takes as argument a "circumference string" | ||
| 196 | (see L<Data::Vitals::Circumference> for details) | ||
| 197 | |||
| 198 | Returns a new L<Data::Vitals::Chest> object on success, or C<undef> on | ||
| 199 | error. | ||
| 200 | |||
| 201 | =cut | ||
| 202 | |||
| 203 | 1 | ▶ | sub chest { |
|
Subroutine
chest: called CC=1 SCAR=0.0
Pod
documented
| |||
| 204 | 1 | Data::Vitals::Chest->new($_[1]); | |
| 205 | } | ||
| 206 | |||
| 207 | ###------------------------------------------------------------------ | ||
| 208 | |||
| 209 | =pod | ||
| 210 | |||
| 211 | =head2 bust $circumference | ||
| 212 | |||
| 213 | The C<bust> method is an alias for the L<chest|Data::Vitals/chest> method. | ||
| 214 | |||
| 215 | =cut | ||
| 216 | |||
| 217 | 1 | ▶ | sub bust { |
|
Subroutine
bust: called CC=1 SCAR=0.0
Pod
documented
| |||
| 218 | 1 | Data::Vitals::Chest->new($_[1]); | |
| 219 | } | ||
| 220 | |||
| 221 | ###------------------------------------------------------------------ | ||
| 222 | |||
| 223 | =pod | ||
| 224 | |||
| 225 | =head2 underarm $circumference | ||
| 226 | |||
| 227 | The C<underarm> method creates and returns an underarm measurement object, | ||
| 228 | which is the circumference of the torso under the arms and above (for | ||
| 229 | women) the breasts. | ||
| 230 | |||
| 231 | It takes as argument a "circumference string" | ||
| 232 | (see L<Data::Vitals::Circumference> for details) | ||
| 233 | |||
| 234 | Returns a new L<Data::Vitals::Underarm> object, or C<undef> on error. | ||
| 235 | |||
| 236 | =cut | ||
| 237 | |||
| 238 | 1 | ▶ | sub underarm { |
|
Subroutine
underarm: called CC=1 SCAR=0.0
Pod
documented
| |||
| 239 | 1 | Data::Vitals::Underarm->new($_[1]); | |
| 240 | } | ||
| 241 | |||
| 242 | ###------------------------------------------------------------------ | ||
| 243 | |||
| 244 | 3 | 1; | |
| 245 | |||
| 246 | =pod | ||
| 247 | |||
| 248 | =head1 TO DO | ||
| 249 | |||
| 250 | - Allow for per-measurement ranges, that can be tweaked if needed in | ||
| 251 | special cases. | ||
| 252 | |||
| 253 | - Add Data::Vitals::Weight | ||
| 254 | |||
| 255 | - Add Data::Vitals::Bra | ||
| 256 | |||
| 257 | - Add Data::Vitals::Dress (in the various country standards) | ||
| 258 | |||
| 259 | - Add Data::Vitals::Shoe (in the various country standards) | ||
| 260 | |||
| 261 | =head1 SUPPORT | ||
| 262 | |||
| 263 | Bugs should always be reported via the CPAN bug tracker | ||
| 264 | |||
| 265 | L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-Vitals> | ||
| 266 | |||
| 267 | For other issues, contact the maintainer. | ||
| 268 | |||
| 269 | As the author is no longer working in the fashion/modelling industry, | ||
| 270 | volunteers for taking over maintenance would be gratefully accepted. | ||
| 271 | |||
| 272 | =head1 AUTHORS | ||
| 273 | |||
| 274 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||
| 275 | |||
| 276 | =head1 ACKNOWLEGEMENTS | ||
| 277 | |||
| 278 | Thank you to Phase N (L<http://phase-n.com/>) for permitting | ||
| 279 | the open sourcing and release of this distribution. | ||
| 280 | |||
| 281 | =head1 COPYRIGHT | ||
| 282 | |||
| 283 | Copyright 2004 - 2008 Adam Kennedy. | ||
| 284 | |||
| 285 | This program is free software; you can redistribute | ||
| 286 | it and/or modify it under the same terms as Perl itself. | ||
| 287 | |||
| 288 | The full text of the license can be found in the | ||
| 289 | LICENSE file included with this module. | ||
| 290 | |||
| 291 | =cut | ||