[Catalyst] debug output parameter bug?
Chisel Wright
chisel at herlpacker.co.uk
Fri Jan 6 17:44:45 CET 2006
I noticed this while working on an application. I've created a tiny test
app to reproduce.
Basically:
catalyst.pl ParamBug
edit lib/ParamBug.pm
remove default()
add the following sub:
sub paramtest : Local {
my ( $self, $c ) = @_;
$c->response->content_type('text/plain');
$c->response->body( 'Result: ' . $c->request->param('mykey') );
}
Then edit t/01app.t:
---- cut here ----
use Test::More tests => 7;
BEGIN { use_ok( Catalyst::Test, 'ParamBug' ); }
my @test_values = qw{
0
000
1
a
chisel
foo
};
foreach my $value (@test_values) {
is( get("/paramtest?mykey=${value}"), "Result: ${value}" );
}
---- cut here ----
None of the tests fail, which I presume means that the core
functionality is fine, but in the output for the '0' test I'm seeing:
[Fri Jan 6 16:46:50 2006] [catalyst] [debug] Query Parameters are:
.---------------------------+--------------------------.
| Key | Value |
+---------------------------+--------------------------+
| mykey | |
'---------------------------+--------------------------'
At best it's misleading ...
Chisel
--
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/
No virus was found in this outgoing message as I didn't bother looking.
More information about the Catalyst
mailing list