I wrote:
> I'd like to see Maypole->config->model_options, just like
> Maypole->config->view_options.

One reason that I'd like to see this is because we can use it as a way to extend standard interfaces. For example, there are lots of places in lots of code in plugins and individual applications where authors inject new methods into the model. And as many different methods of doing it are used as people can dream up. So I'd propose that both view_options and model_options support a standard key, say 'inject' that adds or overrides methods in the model or view. You would write something like this:

  BeerDB->config->model_options({
      inject => { do_pager => sub {
                                   # override pager to extend function
                                  },
                  drink => sub : Exported {
                                   # add a new action!
                                  },
                },
      other_options => as_required,
  });

There would be standard code in the model and view (perhaps inherited from Maypole::Config?) that manipulated the symbol tables appropriately.

Cheers, Dave



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Maypole-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-devel

Reply via email to