-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've got a question about how to make a variable in a sub component
visible to the parent (calling) component.  I'm thinking that I need to
use <%shared>, but I'm a little lost.  Where do I put the <%shared>?  I
think what I want to do can't be done due to the order that my
components are being called.

This was OK before, because I didn't need to dynamicly change the
<title>Hi!</title> of a page.  Now that I'm adding CGI::Wiki to a Mason
site, I need to :)

Can you tell I use MasonX::Profiler? 8-)

/index.html BEGINS {{{
  -- This the requested page, not really doing anything yet, but
  it INHERITS from /wrapper
  /autohandler {{{
    -- initilization
    /wrapper {{{
      -- Inherited header/footer stuff, this wrapper sets up the
      majority of the page like so:

      <& SELF:title &>
      % $m->call_next();
      <& SELF:footer &>

      /index.html:title {{{
        ** HERE **
        I need a shared variable, but it won't exist yet
        because (<%init>, <%once>, etc) parts of  index.html havn't
        been called yet
      /index.html:title }}}
      /index.html {{{
        -- now we're rendering content wrapped by /wrapper, and
        the variables I need exist now.
      /index.html }}}
      /index.html:footer {{{
        -- not sure, but I *think* variables created in /index.html
        one step above exist
      /index.html:footer }}}
    /warpper }}}
  /autohandler }}}
/index.html }}} ENDS


- -----------------------------------------------------------
"Looks like there'll be no money for you, Crazy Round Man."
                                             - Samurai Jack
Richard G Harman Jr           <[EMAIL PROTECTED]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFEKo2m3rKdb192Vz8RAiY/AJ9XrFINatIqTFnU5E15AUTfwzz+vACbBp3v
q8mYmdINLIztD/8ToaC/fOs=
=N1pq
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to