Skip to content

Instantly share code, notes, and snippets.

@mjdominus
Created November 13, 2011 20:05
Show Gist options
  • Save mjdominus/1362601 to your computer and use it in GitHub Desktop.
Save mjdominus/1362601 to your computer and use it in GitHub Desktop.
Bug fix
diff --git a/lib/Moonpig/Role/Storage.pm b/lib/Moonpig/Role/Storage.pm
index dd86f9c..4ecfca9 100644
--- a/lib/Moonpig/Role/Storage.pm
+++ b/lib/Moonpig/Role/Storage.pm
@@ -26,7 +26,7 @@ sub do_with_ledger_array {
my ($self, $guids, $code, $opts) = @_;
$Carp::Internal{ (__PACKAGE__) }++;
my %guids = map { $_ => $_ } @$guids;
- $self->do_with_ledgers(\%guids, sub { $code->(values %{$_[0]}) }, $opts);
+ $self->do_with_ledgers(\%guids, sub { $code->(@{$_[0]}{@$guids}) }, $opts);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment