Subject: | get_console_output fails when there is no output |
Date: | Mon, 25 Apr 2011 13:25:51 -0700 |
To: | bug-Net-Amazon-EC2 [...] rt.cpan.org |
From: | Andrew Pimlott <andrew [...] pimlott.net> |
When EC2 returns no output for get_console_output (which is often, since
the console output seems to be refreshed very infrequently),
Net::Amazon::EC2 throws a "Premature end of base64 data" warning and
returns garbage. If I dump $xml at line 2508, I see:
0 HASH(0xb36a648)
'Errors' => undef
'instanceId' => 'i-7a207815'
'output' => HASH(0xb36d8f8)
empty hash
'requestId' => '4b2745e9-fdd1-4bee-87d8-878b4d2af374'
'timestamp' => '2011-04-25T20:13:40.000Z'
'xmlns' => 'http://ec2.amazonaws.com/doc/2009-11-30/'
So obviously $xml->{output} is not text. Probably, the empty hashref
comes from a heuristic in the XML de-serializer, but it is wrong.
Andrew