From: Matt S Trout Date: Fri, 5 Feb 2010 21:01:57 +0000 (+0000) Subject: move into arg into options too X-Git-Tag: release_0.009004~91 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FHTML-Zoom.git;a=commitdiff_plain;h=cac9d0a57eb15ed103010151543d25cf27f3b157 move into arg into options too --- diff --git a/lib/HTML/Zoom/FilterBuilder.pm b/lib/HTML/Zoom/FilterBuilder.pm index 9645143..b82a85c 100644 --- a/lib/HTML/Zoom/FilterBuilder.pm +++ b/lib/HTML/Zoom/FilterBuilder.pm @@ -90,7 +90,7 @@ sub add_after { sub { my ($evt, $stream) = @_; my $emit = $self->_stream_from_array(@$events); - my $coll = $self->collect(undef, { passthrough => 1 })->(@_); + my $coll = $self->collect({ passthrough => 1 })->(@_); return ref($coll) eq 'HASH' # single event, no collect ? [ $coll, $emit ] : [ $coll->[0], $self->_stream_concat($coll->[1], $emit) ]; @@ -122,8 +122,8 @@ sub replace { } sub collect { - my ($self, $into, $attrs) = @_; - my ($passthrough) = @{$attrs}{qw(passthrough)}; + my ($self, $attrs) = @_; + my ($into, $passthrough) = @{$attrs}{qw(into passthrough)}; sub { my ($evt, $stream) = @_; push(@$into, $evt) if $into;