Archive for the ‘UPS’ tag
Track UPS Packages with Perl – WebService::UPS
The Module:
I have made a Perl object oriented module for tracking UPS shipments. To use this module you will need to get a developer key for the UPS online tools here. This module makes a XML request to the online tools, and then parses the response using XML::Simple. The module has methods to get specific information such as recent activity. You can read the full module documentation as well as download the module at CPAN’s site here.
Example:
my $Package = WebService::UPS::TrackRequest->new;
$Package->Username('kbrandt');
$Package->Password('topsecrent');
$Package->License('8C3D7EE8FZZZZZ4');
$Package->TrackingNumber('1ZA45Y5111111111');
print $Package->Username();
my $trackedPackage = $Package->requestTrack();
print $trackedPackage->getActivityList();
Installation:
You can install this module with cpan. In Linux the command is ‘cpan -i WebService::UPS::TrackRequest’ . The required prerequisite modules are: Mouse, LWP::UserAgent , HTTP::Request::Common , XML::Simple , and Data::Dumper .