Skip to content

Commit

Permalink
Merge pull request jadeallenx#5 from clkao/timestamp
Browse files Browse the repository at this point in the history
Do not cache timestamp.  This avoids long-running processes causing aws ...
  • Loading branch information
jadeallenx committed Feb 20, 2012
2 parents 8ec4c22 + 1c9fea1 commit 292ac3f
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions lib/Net/Amazon/EC2.pm
Expand Up @@ -155,20 +155,6 @@ has 'signature_version' => ( is => 'ro', isa => 'Int', required => 1, default =>
has 'version' => ( is => 'ro', isa => 'Str', required => 1, default => '2011-01-01' );
has 'region' => ( is => 'ro', isa => 'Str', required => 1, default => 'us-east-1' );
has 'ssl' => ( is => 'ro', isa => 'Bool', required => 1, default => 0 );
has 'timestamp' => (
is => 'ro',
isa => 'Str',
required => 1,
lazy => 1,
clearer => '_clear_timestamp',
default => sub {
my $ts = time2isoz();
chop($ts);
$ts .= '.000Z';
$ts =~ s/\s+/T/g;
return $ts;
}
);
has 'base_url' => (
is => 'ro',
isa => 'Str',
Expand All @@ -179,6 +165,14 @@ has 'base_url' => (
}
);

sub timestamp {
my $ts = time2isoz();
chop($ts);
$ts .= '.000Z';
$ts =~ s/\s+/T/g;
return $ts;
};

sub _sign {
my $self = shift;
my %args = @_;
Expand Down

0 comments on commit 292ac3f

Please sign in to comment.