Hi,

I'm new to mason, apache and mod_perl and normally develop in a windows
environment.

I have used the bundled file "Perl-5.8-win32-bin.exe" in a windows
environment and have got the following mason example to work, so i know
Mason is running and working.

% my $noun = 'World';
    Hello <% $noun %>!
    How are ya?

However, i cannot seem to get my autohandler.mh file to work. I followed
another example from mason books but it seems that the autohandler is not
being called despite being in the same directory.

The autohandler.mh file contains the following:

<html>
<head>
<title>Example.com</title>
</head>
<body>
<% $m->call_next%>
<br><a href="/">Home</a>
</body>
</html>


The html file being requested is welcome.html and contains the following: -

<p>Welcome to a very wonderful site.  We hope you enjoy your stay.</p>


The entry in my httpd.conf is: - (again, i got this from an example  i saw)


PerlModule HTML::Mason::ApacheHandler

<LocationMatch "(\.html|\.txt|\.pl)$">

SetHandler perl-script

PerlHandler HTML::Mason::ApacheHandler

</LocationMatch>

<LocationMatch "(\.m(html|txt|pl)|dhandler)$">

SetHandler perl-script

PerlInitHandler Apache::Constants::NOT_FOUND

</LocationMatch>

To summarise, my understanding is that Mason looks for the autohandler in
the same directory as the file being called and will automagically wrap the
content of the requested file (html) with the html content in the
autohandler. This doesn't happen. It's as if the autohandler isn't there.

I'm wondering if i'm missing something from my httpd.conf file.

If anyone could shed any light as to why this isn't working i'd be most
grateful.

Thanks,

Nick.
*nwnickwo...@googlemail.com*
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to