in reply to Net::UPS causing undefined array ref error

I just looked at the module, and it seems to require a UPS id, password, and accesskey, which go into ~.upsrc, ( as described in the INSTALL file). Do you have this setup? I ask, because I see no mention of it in your code.

I'm not really a human, but I play one on earth. Cogito ergo sum a bum
  • Comment on Re: Net::UPS causing undefined array ref error

Replies are listed 'Best First'.
Re^2: Net::UPS causing undefined array ref error
by bradcathey (Prior) on Dec 19, 2006 at 22:03 UTC

    Thanks for looking. And you make a good point--sorry it wasn't in my code here, but it was in my original. I tried 2 separate accounts and a couple of different methods. All failed similarly.

    Production code:

    my $userid = "brad"; my $password = "xxxxxx"; my $accesskey = "686GJ8GJK1230HJL";

    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
      I just got this module and have been playing with it. I haven't used perl for a long time, and didn't remember how to debug, so this thread was helpful :) Thanks. I also found after debugging for a while that in my case the request_rate method was failing because, according to UPS, "This measurement system is not valid for the selected country." Perhaps you are getting a similar error... To make it display any error you're getting, you can insert the following lines into UPS.pm at line 210...

      210:
      211: unless (defined $services) {
      212: croak("rate(): services error - " . $self->errstr());
      213: }
      214:

      Then

      make clean
      perl Makefile.PL
      make
      make install

      and perhaps you'll be a little closer :)
        Does anybody know if this module is still claimed by anybody? I tried contacting the author a couple times with no success. I've made a couple necessary fixes that will definitely help, but I don't know where to put them! I haven't done a lot of work on open source projects, or a lot of work in Perl - so I'm out of the loop on how it works ;)

        But it would be a shame if the open source recycle bin got emptied before this project made it back to the proverbial desktop!