>Given this code: >>>>>>>>> > ><h1>OH HAI</h1> > ><p>1. <%text><& SELF:wants &></%text> <& SELF:wants &></p> > ><p>2. <%text><% $m->comp('SELF:wants') %></%text> <% >$m->comp('SELF:wants') %></p> > ><p>3. <%text><% my $dump = $m->comp('SELF:wants') %></%text> <% my >$dump = $m->comp('SELF:wants') %></p> > ><%method wants> ><% wantarray ? "WANT" : "DON'T WANT" %> ></%method> > ><<<<<<<<<< > >Why does No. 2 behave differently from 1 and 3? I thought that >wantarray was supposed to be undefined if the context is looking for >no value.
AFAIK components don't equal subs directly, so doing @q = $m->comp('foo') isn't the same as @q = foo(); I'd venture, without checking, that it's completely meaningless. However you could pass it foo => [EMAIL PROTECTED] or foo => \$test, and then test ref $foo. I've never had a need to do this, and I'd evaluate your structure if you feel you do. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users