Permalink
Browse files

Fix the way that versions are returned

  • Loading branch information...
1 parent cace0fa commit 790599c662a70e571a9cfcc5cbd111b1ff2f250e @simonwistow simonwistow committed Feb 7, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/Net/Fastly/Service.pm
@@ -109,11 +109,10 @@ sub purge_by_key {
Get a sorted array of all the versions that this service has had.
=cut
-use Data::Dumper;
sub versions {
my $self = shift;
my $fetcher = $self->_fetcher;
- my @versions = map { Net::Fastly::Version->new($fetcher, %$_) } @{$self->{versions}||[]};
+ my @versions = map { Net::Fastly::Version->new($fetcher, %$_) } values %{$self->{versions}||{}};
return sort { $a->number <=> $b->number } @versions;
}

0 comments on commit 790599c

Please sign in to comment.