2015-09-17 9:06 GMT-05:00 Andrew Solomon <[email protected]>:
> That looks reasonably sane to me apart from:
>
> my $input_hash {
>
> token => params->{token}
>
> }
>
> which should be
>
> my $input_hash = {
>
> token => params->{token}
>
> };
>
>
> Hi Andrew,
That piece of code is the part that is giving me trouble.
I have switched to using a scalar as since there is only one element that I
seek to capture (the usrl/token) and because using a hash wasn't working
either.
Here is where I am:
get '/reset/:token' => sub {
my $incoming_token;
return template 'passreset' => {
$incoming_token = params->{token}, # LINE 554
};
# get stored tokens to match against $incoming_token
my ($matched_user_id) = User->lookup_tokens($input_hash->{token});
But the it fails and the input at the console says:
[MyApp:25074] core @2015-09-17 10:21:52> Entering hook
core.app.before_request in (eval 77) l. 1
Odd number of elements in anonymous hash at
/home/richard/Dancer2/MyApp/bin/../lib/MyApp.pm line 554.
I am just trying to capture the value of the url so I can test if it
matches the stored token. Help would be greeeaaaaaaatly appreciated as
this s very frustrating.
Thanks
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users