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

2006-07-19 Thread apv
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@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


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

2006-07-19 Thread John Napiorkowski
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 [EMAIL PROTECTED]
To: The framework catalyst@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@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/




Word.pm
Description: Binary data
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/