I'm working through some problems with my Mason Compiler subclass, and I
*think* these qualify as bugs.

The default implementation of component_content_call() in
HTML::Mason::Compiler executes:

    $code .= $self->_set_buffer();

Unfortunately, _set_buffer() is not a method of HTML::Mason::Compiler (it is
declared in the ToObject subclass). As a result my compiler subclass, and I
assume any subclass that does not override component_content_call(), crashes
on component calls with content.

Similarly, Compiler::compile() finishes with a call to compiled_component(),
which is declared in the ToObject subclass.

Of course, one interpretation is that these are *not* bugs, and that all
subclasses *must* override 'compile()' and 'component_content_call()'.
That's a valid viewpoint, but it seems bad form to have a default
implementation that works only when an undocumented function is implemented
in the subclass. Better to have an empty implementation that just croaks and
yells "implement this!"

I think _set_buffer() might safely be moved to Compiler, but I have not
tested that. compiled_component() looks too complex for me to judge. I could
submit a patch if anyone thinks it's a good idea, but some pointers from
experts would be helpful.

-- 
-Vince Veselosky
http://www.webquills.net
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to