Re: Syntax error in mod_perl but not in shell command

2008-05-29 Thread william
On 5/30/08, Heiko Jansen <[EMAIL PROTECTED]> wrote: > As far as I understand it, mod_perl will eval{} the code it's going to > run and in the paragraph "Limitations" on > http://search.cpan.org/~rgarcia/Switch-2.13/Switch.pm > we're told that "Due to the way source filters work in Perl, you can'

Re: Syntax error in mod_perl but not in shell command

2008-05-29 Thread Heiko Jansen
As far as I understand it, mod_perl will eval{} the code it's going to run and in the paragraph "Limitations" on http://search.cpan.org/~rgarcia/Switch-2.13/Switch.pm we're told that "Due to the way source filters work in Perl, you can't use Switch inside an string eval.". heiko

Re: Syntax error in mod_perl but not in shell command

2008-05-29 Thread Michael Peters
Michael A. Capone wrote: > I can reproduce this, exactly as he says below. Some kind of > incompatibility between mod_perl and the Switch module? Switch is a source filter. source filters == evil. I've heard all kinds of horror stories about using them under mod_perl. If you really need that kin

Re: Syntax error in mod_perl but not in shell command

2008-05-29 Thread Michael A. Capone
I can reproduce this, exactly as he says below. Some kind of incompatibility between mod_perl and the Switch module? william wrote: Hello, I am running this code print "Content-type: text/html\n\n"; use Switch; $t =1; switch ($t) { case 1 { print "number 1\n"; } }

Syntax error in mod_perl but not in shell command

2008-05-28 Thread william
Hello, I am running this code print "Content-type: text/html\n\n"; use Switch; $t =1; switch ($t) { case 1 { print "number 1\n"; } } I have not problem running in shell command [EMAIL PROTECTED]:/var/www/modperl$ perl test.pl Content-type: text/html number 1 But when