On Jan 3, 2005, at 6:48 PM, Terrence Brannon wrote:
Matthew Simon Cavalletto <[EMAIL PROTECTED]> writes:
On Dec 31, 2004, at 2:24 PM, Terrence Brannon wrote:In fact, it is nice to know that all tree processing actions will be handled like this:
$tree->$id_name->$library_method(@method_args);
It seems more natural to me to treat the ID as data, along these lines:
$tree->$library_method($id_name => @method_args);
You have a better design but I am subclassing from HTML::Tree.
Ah, that makes sense. (I wonder how things would have turned out if you'd chosen to use a delegating wrapper instead of a subclass?)
(And what happens when my HTML designer gives me a template with IDs named 'new' or 'delete'?)
Razor-sharp assessment, Simon. Thanks a lot for the input. I never thought of that pitfall. But maybe that's why there should be no methods which are not prefaced with get_$id.
I guess it's still not clear to me why you're generating get_foo() methods instead of calling a pre-written method with an argument, like get('foo').
-Simon
_______________________________________________ sw-design mailing list [email protected] http://metaperl.com/cgi-bin/mailman/listinfo/sw-design
