[Dancer-users] more "status code needs to be an integer greater than or equal to 100"

Puneet Kishor punk.kish at gmail.com
Tue Feb 8 02:37:42 CET 2011



Matthew Vickers wrote:
> ----- "Puneet Kishor"<punk.kish at gmail.com>  wrote:
>
>> Completely foxed here. I have code like
>>
>> get '/*?' =>  sub {
>> ..
>>       debug "foo";
>>       template $template, \%template_opts;
>>       debug "bar";
>> }
>>
>> My development log shows
>>
>> [10182] debug @0.051256>  [hit #1] foo in
>> /Users/punkish/Sites/punkish/lib/punkish.pm l. 255
>> [10182] debug @0.056021>  [hit #1] bar in
>> /Users/punkish/Sites/punkish/lib/punkish.pm l. 257
>>
>> However, in my browser I get the dreaded "status code needs to be an
>> integer greater than or equal to 100 at
>> /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/StackTrace.pm
>> line 27"
>>
>> Any suggestions?
>>
>
>
> Is the return value of your route the return value from the debug call ?
>
> Try:
>
> my $response= template($template, \%template_opts);
> debug("bar");
> return $response;
>

I should have said that my attempt to put debug statements before and 
after the `template` call were my attempt to try and illustrate that 
everything is working well before and after it. It is just the template 
call (or something outside of anything I know) that is borking. 
Normally, I have just `template ...` as the last call, but that is not 
working.

For what its worth, I tried your code above, and I get exactly the same 
outcome.

[12148] debug @0.183793> [hit #1] bar in 
/Users/punkish/Sites/punkish/lib/punkish.pm l. 256

and the "status should be... " in the browser.

Puneet.


More information about the Dancer-users mailing list