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

Hi, I am trying to use this module to interact with Amazon's EC2. I downloaded this module (v 0.09) on v5.8.8 release 824 (ActiveState), but it just doesn't work. I've emailed the author, but have had no response. The code use Net::Amazon::EC2; statement in a script, by itself, generates the following:
Can't use an undefined value as a HASH reference at C:/Perl/site/lib/C +lass/MOP/Class.pm line 640. BEGIN failed--compilation aborted at C:/Perl/site/lib/Moose/Object.pm +line 8. Compilation failed in require at C:/Perl/site/lib/Moose.pm line 25. BEGIN failed--compilation aborted at C:/Perl/site/lib/Moose.pm line 25 +. Compilation failed in require at C:/Perl/site/lib/Net/Amazon/EC2.pm li +ne 2. BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/Amazon/EC2.p +m line 2. Compilation failed in require at C:\MVM\tools\ec2.pl line 1. BEGIN failed--compilation aborted at C:\MVM\tools\ec2.pl line 1.
Can anybody help me troubleshoot this? It appears to have a problem with Moose, but that's where my knowledge ends... tia, matt

Replies are listed 'Best First'.
Re: Net::Amazon::EC2 - Breaks out of the box
by almut (Canon) on Oct 22, 2008 at 22:04 UTC

    Line 2 of Net/Amazon/EC2.pm just says use Moose;, so I suppose you'd get a similar error if you just put the use Moose; statement in a script, by itself. In other words, you might have been trying to contact the wrong module author :)   However, before contacting the author of Moose, I'd try to reinstall Moose first...  Just a thought.

Re: Net::Amazon::EC2 - Breaks out of the box
by Anonymous Monk on Oct 23, 2008 at 01:16 UTC
    Can anybody help me troubleshoot this? It appears to have a problem with Moose, but that's where my knowledge ends... tia, matt
    How did you install Moose? What you do to troubleshoot is download a version of Moose, and run the test suite. Here's one way
    cpanp>z Moose ...build\Moose-0.59>perl Makefile.PL ...build\Moose-0.59>nmake ...build\Moose-0.59>nmake test
    if some test fails, you have your answer. You're kind of alone in getting that error message http://www.cpantesters.org/show/Net-Amazon-EC2.html#Net-Amazon-EC2-0.09
      I installed via ppm. I've tried trouchelle and theoryx5. I'm going to try a CPAN install now...

      ------------

      UPDATE: I have perl 5.8.8. build 822, and I used CPAN, issuing 'install Moose'. I got a lot of the prerequisites tested and ok, but I kept getting a popup dialog box with the following message: 'The procedure entry point Perl_hv_common could not be located in the dynamic link library perl58.dll'.

      Any ideas with this?

      ------------

      UPDATE 2: OK, I upgraded to perl5.8.8 build 824. I re-ran the CPAN install I detailed above, and this time it worked.