Bump required Module::Install version in everything. janus++
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 02f1216..a75f43b 100644 (file)
@@ -49,7 +49,6 @@ our $COUNT     = 1;
 our $START     = time;
 our $RECURSION = 1000;
 our $DETACH    = "catalyst_detach\n";
-our $GO        = "catalyst_go\n";
 
 __PACKAGE__->mk_classdata($_)
   for qw/components arguments dispatcher engine log dispatcher_class
@@ -64,7 +63,7 @@ __PACKAGE__->stats_class('Catalyst::Stats');
 
 # Remember to update this in Catalyst::Runtime as well!
 
-our $VERSION = '5.7099_03';
+our $VERSION = '5.7014';
 
 sub import {
     my ( $class, @arguments ) = @_;
@@ -328,20 +327,6 @@ When called with no arguments it escapes the processing chain entirely.
 
 sub detach { my $c = shift; $c->dispatcher->detach( $c, @_ ) }
 
-=head2 $c->go( $action [, \@arguments ] )
-
-=head2 $c->go( $class, $method, [, \@arguments ] )
-
-Almost the same as C<detach>, but does a full dispatch, instead of just
-calling the new C<$action> / C<$class-E<gt>$method>. This means that C<begin>,
-C<auto> and the method you go to is called, just like a new request.
-
-C<$c-E<gt>stash> is kept unchanged.
-
-=cut
-
-sub go { my $c = shift; $c->dispatcher->go( $c, @_ ) }
-
 =head2 $c->response
 
 =head2 $c->res
@@ -452,16 +437,10 @@ sub _comp_search_prefixes {
 
     # regexp fallback
     $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;
-    }
+    @result = grep { $eligible{ $_ } =~ m{$query} } keys %eligible;
 
     # don't warn if we didn't find any results, it just might not exist
     if( @result ) {
-        $c->log->warn( qq(Found results for "${name}" using regexp fallback.) );
         $c->log->warn( 'Relying on the regexp fallback behavior for component resolution is unreliable and unsafe.' );
         $c->log->warn( 'If you really want to search, pass in a regexp as the argument.' );
     }
@@ -531,7 +510,7 @@ Gets a L<Catalyst::Model> instance by name.
 Any extra arguments are directly passed to ACCEPT_CONTEXT.
 
 If the name is omitted, it will look for 
- - a model object in $c->stash->{current_model_instance}, then
+ - a model object in $c->stash{current_model_instance}, then
  - a model name in $c->stash->{current_model}, then
  - a config setting 'default_model', or
  - check if there is only one model, and return it if that's the case.
@@ -584,7 +563,7 @@ Gets a L<Catalyst::View> instance by name.
 Any extra arguments are directly passed to ACCEPT_CONTEXT.
 
 If the name is omitted, it will look for 
- - a view object in $c->stash->{current_view_instance}, then
+ - a view object in $c->stash{current_view_instance}, then
  - a view name in $c->stash->{current_view}, then
  - a config setting 'default_view', or
  - check if there is only one view, and return it if that's the case.
@@ -683,13 +662,11 @@ sub component {
 
         if( !ref $name ) {
             # is it the exact name?
-            return $c->_filter_component( $comps->{ $name }, @args )
-                       if exists $comps->{ $name };
+            return $comps->{ $name } if exists $comps->{ $name };
 
             # perhaps we just omitted "MyApp"?
             my $composed = ( ref $c || $c ) . "::${name}";
-            return $c->_filter_component( $comps->{ $composed }, @args )
-                       if exists $comps->{ $composed };
+            return $comps->{ $composed } if exists $comps->{ $composed };
 
             # search all of the models, views and controllers
             my( $comp ) = $c->_comp_search_prefixes( $name, qw/Model M Controller C View V/ );
@@ -700,13 +677,12 @@ sub component {
         my $query = ref $name ? $name : qr{$name}i;
 
         my @result = grep { m{$query} } keys %{ $c->components };
-        return map { $c->_filter_component( $_, @args ) } @result if ref $name;
+        return @result if ref $name;
 
         if( $result[ 0 ] ) {
-            $c->log->warn( qq(Found results for "${name}" using regexp fallback.) );
             $c->log->warn( 'Relying on the regexp fallback behavior for component resolution' );
             $c->log->warn( 'is unreliable and unsafe. You have been warned' );
-            return $c->_filter_component( $result[ 0 ], @args );
+            return $result[ 0 ];
         }
 
         # I would expect to return an empty list here, but that breaks back-compat
@@ -1284,12 +1260,7 @@ sub execute {
     my $last = pop( @{ $c->stack } );
 
     if ( my $error = $@ ) {
-        if ( !ref($error) and $error eq $DETACH ) {
-            die $DETACH if($c->depth > 1);
-        }
-        elsif ( !ref($error) and $error eq $GO ) {
-            die $GO if($c->depth > 0);
-        }
+        if ( !ref($error) and $error eq $DETACH ) { die $DETACH if $c->depth > 1 }
         else {
             unless ( ref $error ) {
                 no warnings 'uninitialized';
@@ -1915,11 +1886,6 @@ search paths, specify a key named C<search_extra> as an array
 reference. Items in the array beginning with C<::> will have the
 application class name prepended to them.
 
-All components found will also have any 
-L<Devel::InnerPackage|inner packages> loaded and set up as components.
-Note, that modules which are B<not> an I<inner package> of the main
-file namespace loaded will not be instantiated as components.
-
 =cut
 
 sub setup_components {
@@ -2425,15 +2391,13 @@ Wiki:
 
 =head2 L<Catalyst::Test> - The test suite.
 
-=head1 PROJECT FOUNDER
-
-sri: Sebastian Riedel <sri@cpan.org>
+=head1 CREDITS
 
-=head1 CONTRIBUTORS
+Andy Grundman
 
-abw: Andy Wardley
+Andy Wardley
 
-acme: Leon Brocard <leon@astray.com>
+Andreas Marienborg
 
 Andrew Bramble
 
@@ -2441,67 +2405,65 @@ Andrew Ford
 
 Andrew Ruthven
 
-andyg: Andy Grundman <andy@hybridized.org>
+Arthur Bergman
 
-audreyt: Audrey Tang
+Autrijus Tang
 
-bricas: Brian Cassidy <bricas@cpan.org>
+Brian Cassidy
 
-chansen: Christian Hansen
+Carl Franks
 
-chicks: Christopher Hicks
+Christian Hansen
 
-dkubb: Dan Kubb <dan.kubb-cpan@onautopilot.com>
+Christopher Hicks
 
-Drew Taylor
+Dan Sully
 
-esskar: Sascha Kiefer
+Danijel Milicevic
 
-fireartist: Carl Franks <cfranks@cpan.org>
+David Kamholz
 
-gabb: Danijel Milicevic
+David Naughton
+
+Drew Taylor
 
 Gary Ashton Jones
 
 Geoff Richards
 
-jcamacho: Juan Camacho
+Jesse Sheidlower
+
+Jesse Vincent
 
 Jody Belka
 
 Johan Lindstrom
 
-jon: Jon Schutz <jjschutz@cpan.org>
+Juan Camacho
 
-marcus: Marcus Ramberg <mramberg@cpan.org>
+Leon Brocard
 
-miyagawa: Tatsuhiko Miyagawa <miyagawa@bulknews.net>
+Marcus Ramberg
 
-mst: Matt S. Trout <mst@shadowcatsystems.co.uk>
+Matt S Trout
 
-mugwump: Sam Vilain
+Robert Sedlacek
 
-naughton: David Naughton
+Sam Vilain
 
-ningu: David Kamholz <dkamholz@cpan.org>
+Sascha Kiefer
 
-nothingmuch: Yuval Kogman <nothingmuch@woobling.org>
+Sebastian Willert
 
-numa: Dan Sully <daniel@cpan.org>
+Tatsuhiko Miyagawa
 
-obra: Jesse Vincent
-
-omega: Andreas Marienborg
-
-phaylon: Robert Sedlacek <phaylon@dunkelheit.at>
-
-sky: Arthur Bergman
+Ulf Edvinsson
 
-the_jester: Jesse Sheidlower
+Yuval Kogman
 
-Ulf Edvinsson
+=head1 AUTHOR
 
-willert: Sebastian Willert <willert@cpan.org>
+Sebastian Riedel, C<sri@oook.de>
 
 =head1 LICENSE