[prev in list] [next in list] [prev in thread] [next in thread]
List: mason
Subject: Re: [Mason] .pl file error help
From: charmie maniar <charmie.maniar () gmail ! com>
Date: 2010-07-19 17:04:04
Message-ID: AANLkTinbDyMALmQVhfNbNnPtDEwbXY5GR6wBTZiasQaT () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
Thanks a lot. It worked. :) Does that mean my mason is working perfectly?
I am actually trying to make Mason work on IIS in CGI mode. So I have
created a handler file. Now when I am trying to run it it gives me the
following error:
Can't locate object method "new" via package "HTML::Mason::Parser" (perhaps
you forgot to load "HTML::Mason::Parser"?) at mason.pl line 36.
Also , these are the lines that I have in my handler file. Could you please
tell me if I need to change the value of the path_translated variable? I am
not very sure what it should contain.
my $comp = $ENV{'PATH_TRANSLATED'}; # PATH_TRANSLATED is an env variable.
$comp =~ s/\\/\//g; # Replace '\' with '/'
my $root = $interp->comp_root;
$comp =~ s/^$root// or die "Component outside comp_root $root"; # Remove
root path from $comp
There is a workaround for the above lines for windows server 2003 and Mason
1.25. But mine is 1.42 and I haven't found any workaround for it. So does
that mean i should use the above? Here is a link to the entire handler file
code:
http://www.masonhq.com/?RunningMasonUnderIIS
Thanks a lot for your help.
Charmie
2010/7/19 Andrew Kopeyko <kaa@zvuki.ru>
> charmie maniar wrote:
>
>> Hi,
>> I installed Mason and used the cpan.pm <http://cpan.pm> module to
>> automate the process to get the required perl modules.
>> I copied a program from the book named it "handshake.pl <
>> http://handshake.pl>". Its from the Mason book (O' Reilly publications).
>> But I am getting the following errors, please help:
>> C:\Perl\bin\perl>handshake.pl <http://handshake.pl>
>> Backslash found where operator expected at C:\Perl\bin\perl\handshake.pl<
>> http://handshake.pl> line 1, near "rtf1\"
>> Backslash found where operator expected at C:\Perl\bin\perl\handshake.pl<
>> http://handshake.pl> line 1near "ansi\"
>> Backslash found where operator expected at C:\Perl\bin\perl\handshake.pl<
>> http://handshake.pl> line 1, near "ansicpg1252\"
>>
>
> Seems "handshake.pl" is a Rich Text Format file, not plain text.
>
> Try to open it using Notepad - probably you will not see a perl-text.
>
> Use Wordpad\Write\Word to save it as "ANSI text".
>
> --
> Best regards,
> Andrew A. Kopeyko <kaa@zvuki.ru>
> http://www.zvuki.ru/
>
[Attachment #5 (text/html)]
<div>Hi,</div>
<div>š</div>
<div>Thanks a lot. It worked. :) Does that mean my mason is working perfectly?</div>
<div>I am actually trying to make Mason work on IIS in CGI mode. So I have created a \
handler file. Now when I am trying to run it it gives me the following error: </div> \
<div>Can't locate object method "new" via package \
"HTML::Mason::Parser" (perhaps you forgot to load \
"HTML::Mason::Parser"?) at <a href="http://mason.pl">mason.pl</a> line \
36.<br></div> <div>Also , these are the lines that I have in my handler file. Could \
you please tell me if I need to change the value of the path_translated variable? I \
am not very sure what it should contain.</div> <div>š</div>
<div><span lang="EN">my $comp = $ENV{'PATH_TRANSLATED'}; # PATH_TRANSLATED is \
an env variable.</span></div> <div><span lang="EN">$comp =~ s/\\/\//g; # Replace \
'\' with '/'</span></div> <div><span lang="EN">my $root = \
$interp->comp_root;</span></div> <div><span lang="EN">$comp =~ s/^$root// or die \
"Component outside comp_root $root"; # Remove root path from \
$comp</span></div> <div>
<p>There is a workaround for the above lines for windows server 2003 and Mason 1.25. \
But mine is 1.42 and I haven't found any workaround for it. So does that mean i \
should use the above? Here is a link to the entire handler file code:</p>
<p><a href="http://www.masonhq.com/?RunningMasonUnderIIS">http://www.masonhq.com/?RunningMasonUnderIIS</a></p>
<p>Thanks a lot for your help.</p>
<p>Charmie<br></p></div>
<div class="gmail_quote">2010/7/19 Andrew Kopeyko <span dir="ltr"><<a \
href="mailto:kaa@zvuki.ru">kaa@zvuki.ru</a>></span><br> <blockquote \
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" \
class="gmail_quote">charmie maniar wrote:<br> <blockquote style="BORDER-LEFT: #ccc \
1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" \
class="gmail_quote">Hi,<br>šI installed Mason and used the <a href="http://cpan.pm/" \
target="_blank">cpan.pm</a> <<a href="http://cpan.pm/" \
target="_blank">http://cpan.pm</a>> module to automate the process to get the \
required perl modules.<br>
I copied a program from the book named it "<a href="http://handshake.pl/" \
target="_blank">handshake.pl</a> <<a href="http://handshake.pl/" \
target="_blank">http://handshake.pl</a>>". Its from the Mason book (O' \
Reilly publications). But I am getting the following errors, please help:<br>
šC:\Perl\bin\perl><a href="http://handshake.pl/" target="_blank">handshake.pl</a> \
<<a href="http://handshake.pl/" \
target="_blank">http://handshake.pl</a>><br>Backslash found where operator \
expected at C:\Perl\bin\perl\<a href="http://handshake.pl/" \
target="_blank">handshake.pl</a> <<a href="http://handshake.pl/" \
target="_blank">http://handshake.pl</a>> line 1, near "rtf1\"<br>
Backslash found where operator expected at C:\Perl\bin\perl\<a \
href="http://handshake.pl/" target="_blank">handshake.pl</a> <<a \
href="http://handshake.pl/" target="_blank">http://handshake.pl</a>> line 1near \
"ansi\"<br>
Backslash found where operator expected at C:\Perl\bin\perl\<a \
href="http://handshake.pl/" target="_blank">handshake.pl</a> <<a \
href="http://handshake.pl/" target="_blank">http://handshake.pl</a>> line 1, near \
"ansicpg1252\"<br>
</blockquote><br>Seems "<a href="http://handshake.pl/" \
target="_blank">handshake.pl</a>" is a Rich Text Format file, not plain \
text.<br><br>Try to open it using Notepad - probably you will not see a \
perl-text.<br>
<br>Use Wordpad\Write\Word to save it as "ANSI text".<br><font \
color="#888888"><br>-- <br>Best regards,<br>Andrew A. Kopeyko <<a \
href="mailto:kaa@zvuki.ru" target="_blank">kaa@zvuki.ru</a>><br><a \
href="http://www.zvuki.ru/" target="_blank">http://www.zvuki.ru/</a><br>
</font></blockquote></div><br>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic