Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Mason: Getting autoload behavior with CGI script

by water (Deacon)
on Oct 24, 2005 at 08:20 UTC ( #502411=perlquestion: print w/replies, xml ) Need Help??

water has asked for the wisdom of the Perl Monks concerning the following question:


I asked a related question earlier (wrapping bloxsom with mason) in the context of bloxsom;
I've been able to generalize the question a bit.

Say I am using Mason in the CGI context, as per the Mason book's example 9.1.

How could I have the standard autoload wrap the component created on the fly here?



  • Comment on Mason: Getting autoload behavior with CGI script

Replies are listed 'Best First'.
Re: Mason: Getting autoload behavior with CGI script
by johnnywang (Priest) on Oct 24, 2005 at 17:36 UTC
    With my limited Mason experience, I don't think you can without doing it yourself. My understanding is that Mason's wrapping chain mechanism (i.e., finding autoload, etc.) is implemented in its ApacheHandler, which acts as a controller to find the actual component. In CGI mode, Mason is pretty much a template engine.

    As to integrate bloxsom with Mason, bloxsom is a simple (yet flexible) cgi script. Once you introduce mod_perl and Mason, it's pretty easy to write the whole thing in Mason, seems to be too much trouble to wrap it. In other words, it's probably easier to write a Mason port of bloxsom than to wrap it.

      The wrapping chain bits are completely environment-neutral, and will work in any context. The ApacheHandler code is basically just controller code that ties Mason into mod_perl and dispatches to a component based on the URI of a given request.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://502411]
Approved by g0n
Front-paged by planetscape
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (1)
As of 2020-10-25 06:02 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (249 votes). Check out past polls.