The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

update-UPS-surcharge.pl

DESCRIPTION

Installed by Business::Shipping.

Updates the fuel surcharge (stored in config/fuel_surcharge.txt) from the UPS web site. It is recommended that this be run every first Monday of the month in the early AM. Here is an example line to add to your crontab:

 01 4 * * 1 Business-Shipping-UPS_Offline-update-fuel-surcharge.pl

That causes cron to run this update program at 4:01 AM every Monday. Another good cronjob to have is one that will update your Business::Shipping::DataFiles:

 01 4 * * 1 perl -MCPAN -e 'install Business::Shipping::DataFiles'

 
 http://www.ups.com/content/us/en/resources/find/cost/fuel_surcharge.html
    

REQUIRED MODULES

LWP::UserAgent

METHODS

check_for_updates()

Stores the "Good Through" rate in config/fuel_surcharge.txt, with the date it was updated.

* readfile( $file )

Note: this is not an object-oriented method.

* writefile( $filename, $filecontents )

Note: this is not an object-oriented method.

AUTHOR

Daniel Browning, db@kavod.com, http://www.kavod.com/

COPYRIGHT AND LICENCE

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.