From: Matt S Trout Date: Fri, 14 Feb 2014 19:53:55 +0000 (+0000) Subject: add ->all method to SetOver X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa9537474db903f2f3516eafe7b0f7b03348685c;p=scpubgit%2FDKit.git add ->all method to SetOver --- diff --git a/lib/DX/SetOver.pm b/lib/DX/SetOver.pm index c72accc..30d7516 100644 --- a/lib/DX/SetOver.pm +++ b/lib/DX/SetOver.pm @@ -16,8 +16,14 @@ sub get { sub to_stream { my ($self) = @_; + return DX::ArrayStream->from_array($self->all); +} + +sub all { + my ($self) = @_; my $values = $self->values; - return DX::ArrayStream->from_array(@{$values}{sort keys %$values}); + my @ret = @{$values}{sort keys %$values}; + return @ret; } sub with_value {