John Napiorkowski wrote: > One thing that I've done a lot with these kinds of > adapters is use AUTOLOAD or use Moose's built in > attribute delegation to make calling the adapted > classes methods easier. Would you take a patch for > something like this and how might you envision it > working. As a plugin, for example? >
If your model is:
package MyApp::Model::Foo;
use base 'Catalyst::Model::Adaptor';
__PACKAGE__->config( class => 'YourClass' );
Then, in
my $yourclass = $c->model('Foo')
ref $yourclass is YourClass, not MyApp::Model::Foo. Whatever
YourClass->new returns is what $c->model returns.
So, adding anything to Model::Adaptor or a subclass of it would be
pointless, since there's no way you can get at those methods. (You
could get them at COMPONENT time, but not after that.)
Let me know if this is what you were talking about.
Regards,
Jonathan Rockway
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
