Skip to content
Browse files

Fixed request handling to making previously a clone scalar of the val…

…ue before using in for () { to fake $_, cause else its just an alias!!!!!... <holyshit>
  • Loading branch information...
1 parent efed4dc commit b025f87584fe06081e6b029c06aa2c1451cf2e45 @Getty Getty committed Mar 10, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/DDG/Meta/RequestHandler.pm
View
9 lib/DDG/Meta/RequestHandler.pm
@@ -133,7 +133,8 @@ or language at all you can use B<$has_loc> and B<$has_lang>.
my ( $self, $request ) = @_;
$class->request_symbols($stash,$request);
my @result;
- for ($request->$handler) {
+ my $default = $request->$handler;
+ for ($default) {
@result = $code->($_);
}
$class->reset_request_symbols($stash);
@@ -144,7 +145,8 @@ or language at all you can use B<$has_loc> and B<$has_lang>.
my ( $self, $request ) = @_;
$class->request_symbols($stash,$request);
my @result;
- for ($request->$default_handler) {
+ my $default = $request->$default_handler;
+ for ($default) {
@result = $code->(@{$request->$handler});
}
$class->reset_request_symbols($stash);
@@ -182,7 +184,8 @@ or language at all you can use B<$has_loc> and B<$has_lang>.
my ( $self, $request, @matches ) = @_;
$class->request_symbols($stash,$request);
my @result;
- for ($request->query_raw) {
+ my $default = $request->query_raw;
+ for ($default) {
@result = $code->(@matches);
}
$class->reset_request_symbols($stash);

0 comments on commit b025f87

Please sign in to comment.
Something went wrong with that request. Please try again.