I have a page which has default content and methods, which sometimes need overriding. So, I have an autohandler with the default methods and a dhandler (empty) to trigger the autohandler methods. This is all fine and clear, when I'm calling a given page directly with a URL.

The problem comes when another page wants to call one of these methods, and I still want the dhandler mechanism to work. $m->subexec isn't exactly like $m->comp, in the sense that $m->subexec ('component:method_name') seems to execute all of 'component', and not just the method.

What I've found to work is:

my $subreq = $m->make_subrequest(comp=>'component');
$subreq->comp('REQUEST:method_name'); # The REQUEST here is relative to the subrequest

But after seeing task #294 on the TODO list and some discussion about making $m->subexec('component:method_name') work, I now have some doubts as to how come my solution seems to work, while making subexec work on method calls seemed so problematic (being slated for release 1.4x, if at all). Am I doing something that works but may not in the future?

Any feedback welcome,

Mike
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to