[Catalyst] Weird variable chop out of manually set response body

John Napiorkowski jjn1056 at yahoo.com
Thu Jul 20 04:39:47 CEST 2006


I tried this on my setup but didn't get the chop you've reported.  I've attached my controller for you to look at and see if there are any other differences.

I'm running this on a unix box that is fairly up to date, Cat 5.7 etc.  What's your underlying OS?

If you recently upgraded an application you might need to rebuild the stuff in scripts with 'catalyst.pl -force -scripts [your app]'

I'd try updating your local perl a bit with install Task::Catalyst and so forth to make sure you have all the newer versions.  Or you can run a script to force CPAN to update everything out of date on your local box, which has solved problems for me in the past (although could introduce other problems).

Try the attached controller and see if it still have the mentioned trouble.  If we can ID your exact setup maybe we can find someone on the list that matches it to try the controller as well.

let me know what you find out!  --john

----- Original Message ----
From: apv <apv at sedition.com>
To: The framework <catalyst at lists.rawmode.org>
Sent: Thursday, July 20, 2006 3:52:20 AM
Subject: [Catalyst] Weird variable chop out of manually set response body

I ran into a weird thing today (coming back to Catalyst after a long  
hiatus so I hope I'm not just being obtuse; I love all the changes  
I've found so far). Catalyst 5.7000, perl 5.8.6. Using test server.

This in MyApp::Controller::Word:

sub single : Path : Args(1) {
     my ( $self, $c, $word ) = @_;
     $c->response->body("Word: $word");
}

Called with http://host.local:3000/word/asdf

Gives: "Word:"

But modifying this line with a newline:
$c->response->body("Word: $word\n");

Gives the correct response: "Word: asdf"

So what gives? Expected behavior? If so, why? It didn't matter what  
the variable was either. Things like $c->response->body("Word: " .  
$c) would not make it to output either.


-Ashley


_______________________________________________
List: Catalyst at lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Word.pm
Type: application/octet-stream
Size: 714 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060719/648982cb/attachment.obj 


More information about the Catalyst mailing list