Skip to content

Instantly share code, notes, and snippets.

@toritori0318
Created July 19, 2011 12:28
Show Gist options
  • Select an option

  • Save toritori0318/1092137 to your computer and use it in GitHub Desktop.

Select an option

Save toritori0318/1092137 to your computer and use it in GitHub Desktop.
Net::Amazon::EC2 パッチ (Branch: instance_attr_fix)
diff --git lib/Net/Amazon/EC2.pm lib/Net/Amazon/EC2.pm
index a2062a7..2f9a318 100644
--- lib/Net/Amazon/EC2.pm
+++ lib/Net/Amazon/EC2.pm
@@ -1782,9 +1782,11 @@ sub describe_instances {
my $tag_sets;
foreach my $tag_arr (@{$instance_elem->{tagSet}{item}}) {
+ my $key = $tag_arr->{key};
+ my $value = (ref $tag_arr->{value} eq '') ? $tag_arr->{value} : '';
my $tag = Net::Amazon::EC2::TagSet->new(
- key => $tag_arr->{key},
- value => $tag_arr->{value},
+ key => $key,
+ value => $value,
);
push @$tag_sets, $tag;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment