NAME

Business-Shipping-UPS_Offline-update-fuel-surcharge.pl

VERSION

$Rev: 189 $

DESCRIPTION

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'

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

Dan Browning <db@kavod.com>, Kavod Technologies, http://www.kavod.com.

COPYRIGHT AND LICENCE

Copyright (c) 2003-2004 Kavod Technologies, Dan Browning. 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.