[Catalyst] Model go boom in 5.66

Christopher H. Laco claco at chrislaco.com
Tue Mar 14 17:15:19 CET 2006


Matt S Trout wrote:
> Christopher H. Laco wrote:
>> I'd say it's only a bug because it returned a Model instead of a View.
>> But all in all, if I'm too silly to actually ask for a View, I should
>> get nothing...well, at least deserve to get nothing.  :-)
> 
> Right. now $c->view($name) where there's no MyApp::V::$name or
> View::$name will do a regex search, so you'll get the first view that
> matches that prefix.
> 
> We could I guess make it an error instead - or make $c->view return the
> only view if there's just the one and error if there's more than one.
> What do people think? (and do we want views, models and controllers as
> methods to get the list to choose from?)
> 

I'm torn between JMIW (Just Make It Work), and the silly user slap
intrinsic (Exception! You forgot to ask for anything you silly sod!).
View is the odd sub out compared to model/controller...


For the JMIW camp:

	$c->view('') / $c->view(undef)

	return the first view if there is only 1 view
	return the TT view if there are 2+ views, and one is TT



	$c->model('') / $c->model(undef)
	return nothing/undef/throw exception


	$c->controller('') / $c->controller(undef)
	return nothing/undef/throw exception

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060314/57459169/attachment.pgp 


More information about the Catalyst mailing list