[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&#39;t locate object method &quot;new&quot; via package \
&quot;HTML::Mason::Parser&quot; (perhaps you forgot to load \
&quot;HTML::Mason::Parser&quot;?) 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{&#39;PATH_TRANSLATED&#39;}; # PATH_TRANSLATED is \
an env variable.</span></div> <div><span lang="EN">$comp =~ s/\\/\//g; # Replace \
&#39;\&#39; with &#39;/&#39;</span></div> <div><span lang="EN">my $root = \
$interp-&gt;comp_root;</span></div> <div><span lang="EN">$comp =~ s/^$root// or die \
&quot;Component outside comp_root $root&quot;; # 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&#39;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">&lt;<a \
href="mailto:kaa@zvuki.ru">kaa@zvuki.ru</a>&gt;</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> &lt;<a href="http://cpan.pm/" \
target="_blank">http://cpan.pm</a>&gt; module to automate the process to get the \
required perl modules.<br>

I copied a program from the book named it &quot;<a href="http://handshake.pl/" \
target="_blank">handshake.pl</a> &lt;<a href="http://handshake.pl/" \
target="_blank">http://handshake.pl</a>&gt;&quot;. Its from the Mason book (O&#39; \
Reilly publications). But I am getting the following errors, please help:<br>

šC:\Perl\bin\perl&gt;<a href="http://handshake.pl/" target="_blank">handshake.pl</a> \
&lt;<a href="http://handshake.pl/" \
target="_blank">http://handshake.pl</a>&gt;<br>Backslash found where operator \
expected at C:\Perl\bin\perl\<a href="http://handshake.pl/" \
target="_blank">handshake.pl</a> &lt;<a href="http://handshake.pl/" \
target="_blank">http://handshake.pl</a>&gt; line 1, near &quot;rtf1\&quot;<br>

Backslash found where operator expected at C:\Perl\bin\perl\<a \
href="http://handshake.pl/" target="_blank">handshake.pl</a> &lt;<a \
href="http://handshake.pl/" target="_blank">http://handshake.pl</a>&gt; line 1near \
&quot;ansi\&quot;<br>

Backslash found where operator expected at C:\Perl\bin\perl\<a \
href="http://handshake.pl/" target="_blank">handshake.pl</a> &lt;<a \
href="http://handshake.pl/" target="_blank">http://handshake.pl</a>&gt; line 1, near \
&quot;ansicpg1252\&quot;<br>

</blockquote><br>Seems &quot;<a href="http://handshake.pl/" \
target="_blank">handshake.pl</a>&quot; 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 &quot;ANSI text&quot;.<br><font \
color="#888888"><br>-- <br>Best regards,<br>Andrew A. Kopeyko &lt;<a \
href="mailto:kaa@zvuki.ru" target="_blank">kaa@zvuki.ru</a>&gt;<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