mllott has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

First of all, I am definitely an amateur Perl programmer, although I am permanently sold on its capability.

I had written an application to get shipping rates from UPS and USPS (post office), and I'm ready to add FedEx to the mix. I thought it might be just as easy as UPS and USPS, but that has not been the case.

After trying to (unsuccessfully) write my own stuff using LWP, I found "Business::FedEx::DirectConnect" by searching on CPAN, and hoped that someone else had ironed out the finicky requirements of the FedEx servers.

Unfortunately, I think there may be a problem with the installation of the module at my provider (pair networks), since the error message is as follows (simply by having the line "use Business::FedEx::DirectConnect;"):

PS_Ship_Select.cgi: "$FE_RE" is not exported by the Business::FedEx::Constants module
PS_Ship_Select.cgi: "$FE_SE" is not exported by the Business::FedEx::Constants module
PS_Ship_Select.cgi: "$FE_TT" is not exported by the Business::FedEx::Constants module
PS_Ship_Select.cgi: "$FE_RQ" is not exported by the Business::FedEx::Constants module
PS_Ship_Select.cgi: Can't continue after import errors at /usr/local/lib/perl5/site_perl/5.8.0/Business/FedEx/DirectConnect.pm line 11
PS_Ship_Select.cgi: BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.0/Business/FedEx/DirectConnect.pm line 11.

Where should I look for the problem? Should I approach the IT staff at pair, or the author of the module? Has anyone else had this problem, whether on this or any other module?

Thanks in advance!

Mark

janitored by ybiC: Minor format tweaks, including balanced <tt> tags around error message for legibility

  • Comment on Perl Module Error(?): Business::FedEx::DirectConnect

Replies are listed 'Best First'.
Re: Perl Module Error(?): Business::FedEx::DirectConnect
by tlm (Prior) on Apr 25, 2005 at 00:06 UTC

    The source in Business/FedEx/DirectConnect.pm does not request those variables:

    use Business::FedEx::Constants qw( %FE_RE %FE_SE %FE_TT %FE_RQ field_name_to_tag field_tag_to_name );
    My guess is that the installed copy of DirectConnect.pm is older than (or at least out-of-synch with) the installed copy of Constants.pm (which is strange, since the installation should take care of both).

    Yeah, I'd run it by the IT folks. Alternatively, you could install Business::FedEx::DirectConnect from CPAN off your home directory, but this may be more than you're ready for.

    the lowliest monk

Re: Perl Module Error(?): Business::FedEx::DirectConnect
by mllott (Initiate) on Apr 25, 2005 at 01:08 UTC
    Hello again,

    Thanks for the input. I did in fact install the module in my home directory (another learning experience), and this seems to have fixed the problem. I shall notify pair networks that they should re-install the module.

    Your help has been much appreciated!

    Kindest regards,

    Mark
Re: Perl Module Error(?): Business::FedEx::DirectConnect
by sgifford (Prior) on Apr 25, 2005 at 00:02 UTC
    You'll need to figure out what's going on. It may be a bad install of the module, or dozens of other things. The easiest thing would be to install your own copy of the module in your home directory, then use that instead of the version on the system. That way you know exactly what version it is and how it was set up, and as long as you verify that your version is the one being loaded, any problems are problems with the module.