I had spaces before my "%".  Removed them and it works.

----- Original Message ----- From: "RJ Herrick" <[EMAIL PROTECTED]>
To: "Adam" <[EMAIL PROTECTED]>
Sent: Wednesday, May 03, 2006 10:39 AM
Subject: Re: [Mason] Mason Test Script Compilation Problem


It looks correct. Mason is picking it up, syntax looks right to me...
Try switching

% my $noun = 'World';

to

<%perl>
my $noun = 'World';
</%perl>

and see if it still says the same thing.

RJ

Adam wrote:

I'm trying to run the test script from the setup manual at MasonHQ. I just modified my server for Mason using Apache 1.3.34 and Mod_Perl. Why would this be erroring out? There isn't any thing about an error in the httpd error log.
 *Script:*
    % my $noun = ' World';
    Hello <% $noun %>!
    How are ya?
 error:  Error during compilation of /www/htdocs/mason/test.html:
Global symbol "$noun" requires explicit package name at /www/htdocs/mason/test.html line 2.

context:  1:  % my $noun = 'World';
2:  Hello <% $noun %>!
3:  How are ya?
4:
code stack:  /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Interp.pm:445
/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm:238
/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm:204
/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm:97
/usr/lib/perl5/site_perl/5.8.8/Class/Container.pm:275
/usr/lib/perl5/site_perl/5.8.8/Class/Container.pm:353
/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Interp.pm:348
/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm:869
/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm:823
(eval 33):8
/dev/null:0

 *httpd.conf setup:*
PerlSetVar  MasonDataDir   /www/mason
PerlModule HTML::Mason::ApacheHandler   <Location />
  SetHandler perl-script
  PerlHandler HTML::Mason::ApacheHandler
</Location>
 *Raw Error:*

Error during compilation of /www/htdocs/mason/test.html:
Global symbol "$noun" requires explicit package name at /www/htdocs/mason/test.html line 2.



Trace begun at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Interp.pm line 845
HTML::Mason::Interp::_compilation_error('HTML::Mason::Interp=HASH(0x9871004)', '/www/htdocs/mason/test.html', 'Error during compilation of :^JGlobal symbol "$noun" requires explicit package name at /www/htdocs/mason/test.html line 2.^J^J^JStack:^J [/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Interp.pm:441]^J [/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm:238]^J [/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm:204]^J [/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm:97]^J [/usr/lib/perl5/site_perl/5.8.8/Class/Container.pm:275]^J [/usr/lib/perl5/site_perl/5.8.8/Class/Container.pm:353]^J [/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Interp.pm:348]^J [/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm:869]^J [/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm:823]^J [(eval 33):8]^J [/dev/null:0]^J') called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Interp.pm line 445 HTML::Mason::Interp::load('HTML::Mason::Interp=HASH(0x9871004)', '/mason/test.html') called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 238
eval {...} at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 223
HTML::Mason::Request::_initialize('HTML::Mason::Request::ApacheHandler=HASH(0x9871274)') called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm line 204 HTML::Mason::Request::new('HTML::Mason::Request::ApacheHandler', 'error_mode', 'output', 'error_format', 'html', 'interp', 'HTML::Mason::Interp=HASH(0x9871004)', 'comp', '/mason/test.html', 'args', 'ARRAY(0x95ab520)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x95a4e3c)', 'apache_req', 'Apache::Request=SCALAR(0x95aadc4)', 'container', 'HASH(0x95ab4c0)') called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm line 97 HTML::Mason::Request::ApacheHandler::new('HTML::Mason::Request::ApacheHandler', 'error_mode', 'output', 'error_format', 'html', 'interp', 'HTML::Mason::Interp=HASH(0x9871004)', 'comp', '/mason/test.html', 'args', 'ARRAY(0x95ab520)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x95a4e3c)', 'apache_req', 'Apache::Request=SCALAR(0x95aadc4)', 'container', 'HASH(0x95ab4c0)') called at /usr/lib/perl5/site_perl/5.8.8/Class/Container.pm line 275 Class::Container::call_method('HTML::Mason::Interp=HASH(0x9871004)', 'request', 'new', 'interp', 'HTML::Mason::Interp=HASH(0x9871004)', 'comp', '/mason/test.html', 'args', 'ARRAY(0x95ab520)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x95a4e3c)', 'apache_req', 'Apache::Request=SCALAR(0x95aadc4)', 'container', 'HASH(0x95ab4c0)') called at /usr/lib/perl5/site_perl/5.8.8/Class/Container.pm line 353 Class::Container::create_delayed_object('interp', 'HTML::Mason::Interp=HASH(0x9871004)', 'comp', '/mason/test.html', 'args', 'ARRAY(0x95ab520)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x95a4e3c)', 'apache_req', 'Apache::Request=SCALAR(0x95aadc4)', 'container', 'HASH(0x95ab4c0)') called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Interp.pm line 348 HTML::Mason::Interp::make_request('HTML::Mason::Interp=HASH(0x9871004)', 'comp', '/mason/test.html', 'args', 'ARRAY(0x95ab520)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x95a4e3c)', 'apache_req', 'Apache::Request=SCALAR(0x95aadc4)') called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm line 869 eval {...} at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm line 868 HTML::Mason::ApacheHandler::prepare_request('HTML::Mason::ApacheHandler=HASH(0x95a4e3c)', 'Apache=SCALAR(0x95aae0c)') called at /usr/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm line 823 HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x95a4e3c)', 'Apache=SCALAR(0x95aae0c)') called at (eval 33) line 8 HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache=SCALAR(0x95aae0c)') called at /dev/null line 0
eval {...} at /dev/null line 0









-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to