| Business-Shipping documentation | view source | Contained in the Business-Shipping distribution. |
Business::Shipping::USPS_Online::Package
Default 'None'.
Default 'Regular'.
Default 'False'.
Default 'Package'.
Overrides the standard weight definition so that it can correctly set pounds & ounces.
Set pounds and ounces. Converts from fractional pounds.
Converts pounds + ounces to fractional weight. Returns weight. , =cut
sub lbs_oz_to_weight { my ($self) = @_;
trace '()';
my $pounds = $self->pounds || 0;
my $ounces = $self->ounces || 0;
my $fractional_pounds = $ounces ? ($ounces / 16) : 0;
my $weight = ($pounds + $fractional_pounds);
return $weight;
}
1;
__END__
Daniel Browning, db@kavod.com, http://www.kavod.com/
Copyright 2003-2011 Daniel Browning <db@kavod.com>. All rights reserved. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. See LICENSE for more info.
| Business-Shipping documentation | view source | Contained in the Business-Shipping distribution. |