X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;fp=lib%2FCatalyst.pm;h=bed30ee274fab24510b0b8999c32e3a712632c38;hb=75aff34de50f286204ccee4b293e761c90243b4e;hp=c84253d6602172eb112a059c4c855e72e845f7c1;hpb=fb5f42422b1ef1a4cc64ddfd83836c8c1d89bb2c;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index c84253d..bed30ee 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -454,6 +454,11 @@ sub _comp_search_prefixes { $query = qr/$name/i; @result = map { $c->components->{ $_ } } grep { $eligible{ $_ } =~ m{$query} } keys %eligible; + # no results? try against full names + if( !@result ) { + @result = map { $c->components->{ $_ } } grep { m{$query} } keys %eligible; + } + # don't warn if we didn't find any results, it just might not exist if( @result ) { $c->log->warn( 'Relying on the regexp fallback behavior for component resolution is unreliable and unsafe.' );