<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-09-17 9:06 GMT-05:00 Andrew Solomon <span dir="ltr"><<a href="mailto:andrew@geekuni.com" target="_blank">andrew@geekuni.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_extra">That looks reasonably sane to me apart from:<span class=""><div><br></div><div><span style="font-size:12.8px">  my $input_hash {</span><br style="font-size:12.8px"><span style="font-size:12.8px">        </span><br style="font-size:12.8px"><span style="font-size:12.8px">    token => params->{token}</span><br style="font-size:12.8px"><span style="font-size:12.8px">  </span><br style="font-size:12.8px"><span style="font-size:12.8px">    }</span><br></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">which should be</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">  my $input_hash =  {</span><br style="font-size:12.8px"><span style="font-size:12.8px">        </span><br style="font-size:12.8px"><span style="font-size:12.8px">    token => params->{token}</span><br style="font-size:12.8px"><span style="font-size:12.8px">  </span><br style="font-size:12.8px"><span style="font-size:12.8px">    };</span><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><span class=""></span><br></div></blockquote><div>Hi Andrew,<br><br></div><div>That piece of code is the part that is giving me trouble.<br><br></div><div>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.<br><br></div><div>Here is where I am:<br><br> get '/reset/:token' => sub {<br><br>    my $incoming_token;<br><br>    return template 'passreset' => {<br><br>          $incoming_token = params->{token},          # LINE 554<br> <br>    };<br>    <br>    # get stored tokens to match against $incoming_token<br>    my ($matched_user_id) = User->lookup_tokens($input_hash->{token});<br> <br></div><div>But the it fails and the input at the console says:<br><br>[MyApp:25074] core @2015-09-17 10:21:52> Entering hook core.app.before_request in (eval 77) l. 1<br>Odd number of elements in anonymous hash at /home/richard/Dancer2/MyApp/bin/../lib/MyApp.pm line 554.<br><br></div><div>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.<br><br></div><div>Thanks<br></div></div></div></div>