[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 03:55:41 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;
>


Even more bizarre, the following

         my $response = template $template, \%template_opts;
	debug "response $response";
	return $response;

dumps the correctly formatted and filled template in the 
development.log, but the browser still gets the error trace with the 
"status code... " error.

Puneet.


More information about the Dancer-users mailing list