[ic] UPS Tracking Module... can it be integrated with Interchange?
Jason J. Hung
interchange-users@icdevgroup.org
Thu Jun 27 03:08:01 2002
While on CPAN, I stumbled upon the Business::UPS package. In the package, I
found some sample scripts that could be potentially integrated into
Interchange. There's also a Fedex package ... imagine the possibilities.
Anyone have any ideas how to hack Interchange to put in the tracking number,
etc?
--Jason
*** Contents of TRACK.PL ***
#!/usr/local/bin/perl
use lib '.';
use Business::UPS;
# Track a package with a bad tracking number (Will produce error)
#
%t = UPStrack("q211");
if (! $t{error}) {
foreach $key (keys %t) {
print "KEY: $key = $t{$key}\n";
}
}
else {
print "ERROR: $t{error}\n";
}
# A good tracking number
#
print "\n\n";
%t = UPStrack("1ZX29W290250802756"); # or put one that REALLY works
foreach (keys %t) {
next if /^Scanning/;
print "$_ = $t{$_}\n";
}
foreach (split "\n",$t{Scanning}) {
print "SCANNED: $_\n\n";
}
***