Subject: | WebService::Shippo v. 0.0.21 bug |
Date: | Thu, 14 Jan 2016 12:36:49 -0500 |
To: | "bug-WebService-Shippo [...] rt.cpan.org" <bug-WebService-Shippo [...] rt.cpan.org> |
From: | Charles Stuart Lemmen <CLemmen [...] excelsiorintegrated.com> |
Hi,
First, thanks for taking the time to write WebService::Shippo! It's sure to save us buckets of time.
I am setting up and starting to use your module and ran into an issue. The main issue appears to be due to using the module via a web script (using WAMP). Here are the details.
Name and ver: WebService-Shippo-0.0.21
Perl ver: This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread
O/S: Windows 8.1 64-bit
Error message:
[Thu Jan 14 12:31:25.583697 2016] [cgi:error] [pid 5432:tid 1680] [client 127.0.0.1:64943] AH01215: Can't call method "file" on an undefined value at c:/perl64/site/lib/WebService/Shippo/Config.pm line 15.\r
What's happening within "Config.pm" in my case is it's attempting to call "File::HomeDir->my_home" but getting undef which in turn causes "Path::Class::Dir->new()" to return undef hence the error in the Apache log. Note, this issue does not occur on our Linux server; "File::HomeDir->my_home" returns "/var/www" on that machine.
I was able to fix this by changing that call to EG:
Path::Class::Dir->new((defined File::HomeDir->my_home ? File::HomeDir->my_home : ''))->file( '.shipporc' )->stringify,
But I suspect you will have a better method.
Thanks again.
Stuart Lemmen
IT Development & Support
Excelsior Integrated LLC
413-394-4340
clemmen@excelsiorintegrated.com<mailto:clemmen@excelsiorintegrated.com>
www.excelsiorintegrated.com<http://www.excelsiorintegrated.com>
[cid:image001.png@01D14EC7.3C9B1570]