From: Tomas Doran Date: Thu, 1 Dec 2011 09:35:29 +0000 (+0000) Subject: Mention setting default_view option as this is also sane X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=refs%2Fheads%2Fempty_mvc_calls Mention setting default_view option as this is also sane --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index faf1da5..6849c4e 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -679,11 +679,12 @@ sub model { if( !$rest ) { ( my $name = ref $comp ) =~ s{$appclass\::M(odel)?::}{}; $c->log->warn( Carp::shortmess('Calling $c->model() with no arguments has been deprecated and will be removed.') ); - $c->log->warn( "You could change the method call to \$c->model('$name') to retrieve this component." ); + $c->log->warn( "You could change the method call to \$c->model('$name') to retrieve this component" ); + $c->log->warn( "or you should set \$c->config(default_model => '$name')." ); return $c->_filter_component( $comp ); } - croak( join( "\n", + croak( join( "\n", 'Calling $c->model() will fail unless you specify one of:', '* $c->config(default_model => "the name of the default model to use")', '* $c->stash->{current_model} # the name of the model to use for this request', @@ -747,11 +748,12 @@ sub view { if( !$rest ) { ( my $name = ref $comp ) =~ s{$appclass\::V(iew)?\::}{}; $c->log->warn( Carp::shortmess('Calling $c->view() with no arguments has been deprecated and will be removed.') ); - $c->log->warn( "You could change the method call to \$c->view('$name') to retrieve this component." ); + $c->log->warn( "You could change the method call to \$c->view('$name') to retrieve this component," ); + $c->log->warn( "or you should set \$c->config(default_view => '$name')." ); return $c->_filter_component( $comp ); } - croak( join( "\n", + croak( join( "\n", 'Calling $c->view() will fail unless you specify one of:', '* $c->config(default_view => "the name of the default view to use")', '* $c->stash->{current_view} # the name of the view to use for this request',