Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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:

Hi.

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?

Thanks!

water

Comment on Mason: Getting autoload behavior with CGI script
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (14)
As of 2014-09-18 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (119 votes), past polls