App-Goto-Amazon
view release on metacpan or search on metacpan
lib/App/Goto/Amazon.pm view on Meta::CPAN
foreach my $instance ($reservation->instances_set) {
# Ensure only running instances
next unless $instance->instance_state->name eq 'running';
push @{ $self->instances }, $instance->name;
}
}
# Exit with a list of hosts if no name specified
my $name = $self->name;
unless ($name) {
say join "\n", sort @{$self->instances};
exit;
}
# We have all we need. Let's goto!
my $goto = App::Goto->new({ args => [qr/$name/], config => $self->config });
my $cmd = $goto->cmd;
$cmd =~ s/\s+$//;
exec ( $cmd . $self->domain ) if $goto->cmd;
print "No valid host found for given arguments\n";
}
( run in 1.020 second using v1.01-cache-2.11-cpan-96521ef73a4 )