The 'syshandler' isn't a special mason component, but has become a
conventional term in the mason community due to the mason book examples.
I believe the name was chosen because it works similar to an
autohandler, but does system type work instead of generating output. It
is just another component- you could call a component that does
'syshandler' type work anything, and you could call any components you
want 'syshandler'. The importance is how you set it up and use it.
First off, it has no inheritance. This is done by putting
<%flags>
inherit => undef
</%flags>
in it. This avoids potential circular inheritances and makes a nice
"root" component.
The next step is to have your base autohandler (generally the one in the
comp root) to inherit from it. This is done by putting
<%flags>
inherit => 'syshandler.mas'
</%flags>
in your autohandler.
Put a $m->call_next in your syshandler and it will connect up with your
autohandler, which will continue to work as usual.
RJ
Jim Babcock wrote:
So you're saying that syshandler is not a mason component? You seem to have
skipped the questionis and gone straight to a lecture on inheritance...
:)
JimB
----- Original Message -----
From: "Marius Feraru" <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: [Mason] syshandler
Date: Tue, 14 Mar 2006 16:33:00 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jim Babcock wrote:
The book alleges that a file called 'syshandler' will get called
first, even before autohandler and even when autohandler is not
called.
I've tried mimicking what the book does and it doesn't seem to
recognize it. Digging into the example from the book, it seems to
hook it into the autohandler with an inherit. Researching it on
google either points to copies of the book on line or errors that its
web crawlers has found, but no longer exist. There is also no
reference to it on masonhq.com's search engine or documents.
In order to change inheritance, indeed, you'll have to use “inherit”,
but use it inside a %flags section :)
For instance, in order to make your 'foo' component to inherit from
'sys', you'll have to add this block to 'foo':
<%flags>
inherit => 'sys'
</%flags>
Reference:
http://www.masonhq.com/docs/manual/Devel.html#__flags_
- --
Marius Feraru
-----BEGIN PGP SIGNATURE-----
iD8DBQFEFtQctZHp/AYZiNkRAkDpAKCuDVYYZXz32Z7yGkydhx2LmGQ1JACfUzuc
VQ+oLowB5J9dBHtMnRWp+Hs=
=9g5W
-----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&kid0944&bid$1720&dat1642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users
-------------------------------------------------------
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