From: Florian Ragwitz Date: Thu, 14 Apr 2011 11:35:39 +0000 (+0200) Subject: Make this error message more readable X-Git-Tag: 5.80033~27 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=6904879203b100d3cf3e8f5bf78e2d164476e654;hp=e87273a4374fb0d8da5479a826f9c847a50546cf Make this error message more readable --- diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index 47ec9f0..ca94a3b 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -182,11 +182,10 @@ around path_prefix => sub { sub get_action_methods { my $self = shift; my $meta = find_meta($self) || confess("No metaclass setup for $self"); - confess("Metaclass " - . ref($meta) . " for " - . $meta->name - . " cannot support register_actions." ) - unless $meta->can('get_nearest_methods_with_attributes'); + confess( + sprintf "Metaclass %s for %s cannot support register_actions.", + ref $meta, $meta->name, + ) unless $meta->can('get_nearest_methods_with_attributes'); my @methods = $meta->get_nearest_methods_with_attributes; # actions specified via config are also action_methods