I'm starting to experiment with Mason. I'll
try not to ask too many stupid questions.
When I use it for real I'll have Unix, Apache,
mod_perl. At the moment I'm away from home and I've got Active State perl on an
XP laptop and an old version of Sambar.
There is an example in the documentation of running
Mason from a simple script without the web-server. I thought I'd try
that.
The example code (taken from http://www.masonhq.com/docs/manual/Admin.html#using_mason_from_a_standalone_sc)
is:
#!/usr/bin/perl use HTML::Mason; use strict; my $interp = HTML::Mason::Interp->new (); $interp->exec(<relative path to file>, <args>...); so I put the following code in
masonscript.pl:
use HTML::Mason;
use strict; my $interp = HTML::Mason::Interp->new
();
$interp->exec("Z:\\mason1.mas"); where mason1.mas contains just 1 line:
Goodbye
I then tried to run the script from the command
line (the DOS prompt in old money):
perl masonscript.pl
I got:
Component path given to Interp->load must be
absolute (was given Z:\mason1.mas)
Stack: [C:\Perl\site\lib\HTML\Mason\Request.pm:198] [C:\Perl\site\lib\HTML\Mason\Request.pm:166] [C:\Perl\site\lib\Class\Container.pm:275] [C:\Perl\site\lib\Class\Container.pm:353] [C:\Perl\site\lib\HTML\Mason\Interp.pm:213] [C:\Perl\site\lib\HTML\Mason\Interp.pm:207] [masonscript.pl:5] Any ideas?
P.S. Many thanks to those who replied to my
previous post.
|
------------------------------------------------------------------------- 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 Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users