Bump required Module::Install version in everything. janus++ attic/context_go
Tomas Doran [Thu, 7 May 2009 13:19:53 +0000 (13:19 +0000)]
43 files changed:
Changes
Makefile.PL
lib/Catalyst.pm
lib/Catalyst/Action.pm
lib/Catalyst/ActionChain.pm
lib/Catalyst/ActionContainer.pm
lib/Catalyst/AttrContainer.pm
lib/Catalyst/Base.pm
lib/Catalyst/Build.pm [new file with mode: 0644]
lib/Catalyst/Component.pm
lib/Catalyst/Controller.pm
lib/Catalyst/DispatchType.pm
lib/Catalyst/DispatchType/Chained.pm
lib/Catalyst/DispatchType/Default.pm
lib/Catalyst/DispatchType/Index.pm
lib/Catalyst/DispatchType/Path.pm
lib/Catalyst/DispatchType/Regex.pm
lib/Catalyst/Dispatcher.pm
lib/Catalyst/Engine.pm
lib/Catalyst/Engine/CGI.pm
lib/Catalyst/Engine/FastCGI.pm
lib/Catalyst/Engine/HTTP.pm
lib/Catalyst/Engine/HTTP/Restarter.pm
lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm
lib/Catalyst/Exception.pm
lib/Catalyst/Log.pm
lib/Catalyst/Manual.pm
lib/Catalyst/Model.pm
lib/Catalyst/Request.pm
lib/Catalyst/Request/Upload.pm
lib/Catalyst/Response.pm
lib/Catalyst/Runtime.pm
lib/Catalyst/Stats.pm
lib/Catalyst/Test.pm
lib/Catalyst/Utils.pm
lib/Catalyst/View.pm
script/catalyst.pl
t/lib/TestApp/Controller/Action/Chained/PathPrefix.pm [deleted file]
t/lib/TestApp/Controller/Args.pm
t/live_component_controller_action_chained.t
t/live_priorities.t
t/unit_core_component.t
t/unit_core_mvc.t

diff --git a/Changes b/Changes
index 4b38787..c5425e4 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,18 +1,6 @@
 # This file documents the revision history for Perl extension Catalyst.
 
-5.7099_03 2008-07-20 10:10:00
-        - Fix regressions for regexp fallback in model(), view() and controller()
-        - Added the supplied argument to the regexp fallback warning for easier
-          debugging
-        - Ensure ACCEPT_CONTEXT is called for results from component()
-
-5.7099_02 2008-07-16 19:10:00
-        - Added PathPrefix attribute
-        - Removed Catalyst::Build; we've long since moved to Module::Install
-        - Updated Catalyst::Test docs to mention the use of HTTP::Request
-          objects (Rafael Kitover)
-
-5.7099_01 2008-06-25 22:36:00
+5.7xxx  xxx
         - Refactored component resolution (component(), models(), model(), et al). We now
           throw warnings for two reasons:
           1) model() or view() was called with no arguments, and two results are returned
@@ -28,8 +16,6 @@
         - Fix Catalyst::Utils::home() when application .pm is in the current dir (RT #34437)
         - Added the ability to remove parameters in req->uri_with() by passing in
           an undef value (RT #34782)
-        - Added $c->go, to do an internal redispatch to another action, while retaining the
-          contents of the stash
 
 5.7014  2008-05-25 15:26:00
         - Addition of .conf in restart regex in Catalyst::Engine::HTTP::Restarter::Watcher
index e646ca1..34e2a5a 100644 (file)
@@ -1,4 +1,4 @@
-use inc::Module::Install 0.64;
+use inc::Module::Install 0.87;
 
 perl_version '5.008001';
 
index 02f1216..22deaf1 100644 (file)
@@ -64,7 +64,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 ) = @_;
@@ -452,16 +452,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 +525,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 +578,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 +677,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 +692,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
@@ -1915,11 +1906,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 +2411,13 @@ Wiki:
 
 =head2 L<Catalyst::Test> - The test suite.
 
-=head1 PROJECT FOUNDER
+=head1 CREDITS
 
-sri: Sebastian Riedel <sri@cpan.org>
+Andy Grundman
 
-=head1 CONTRIBUTORS
+Andy Wardley
 
-abw: Andy Wardley
-
-acme: Leon Brocard <leon@astray.com>
+Andreas Marienborg
 
 Andrew Bramble
 
@@ -2441,67 +2425,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
+
+Danijel Milicevic
 
-esskar: Sascha Kiefer
+David Kamholz
 
-fireartist: Carl Franks <cfranks@cpan.org>
+David Naughton
 
-gabb: Danijel Milicevic
+Drew Taylor
 
 Gary Ashton Jones
 
 Geoff Richards
 
-jcamacho: Juan Camacho
+Jesse Sheidlower
+
+Jesse Vincent
 
 Jody Belka
 
 Johan Lindstrom
 
-jon: Jon Schutz <jjschutz@cpan.org>
-
-marcus: Marcus Ramberg <mramberg@cpan.org>
-
-miyagawa: Tatsuhiko Miyagawa <miyagawa@bulknews.net>
+Juan Camacho
 
-mst: Matt S. Trout <mst@shadowcatsystems.co.uk>
+Leon Brocard
 
-mugwump: Sam Vilain
+Marcus Ramberg
 
-naughton: David Naughton
+Matt S Trout
 
-ningu: David Kamholz <dkamholz@cpan.org>
+Robert Sedlacek
 
-nothingmuch: Yuval Kogman <nothingmuch@woobling.org>
+Sam Vilain
 
-numa: Dan Sully <daniel@cpan.org>
+Sascha Kiefer
 
-obra: Jesse Vincent
+Sebastian Willert
 
-omega: Andreas Marienborg
+Tatsuhiko Miyagawa
 
-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
 
index 6c9e9a1..7e828f0 100644 (file)
@@ -99,9 +99,9 @@ Returns the private path for this action.
 
 returns the sub name of this action.
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Matt S. Trout
 
 =head1 COPYRIGHT
 
index 9ef1513..2fd63d9 100644 (file)
@@ -79,9 +79,11 @@ actions in order.
 Takes a list of Catalyst::Action objects and constructs and returns a
 Catalyst::ActionChain object representing a chain of these actions
 
-=head1 AUTHORS
+=cut
+
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Matt S. Trout
 
 =head1 COPYRIGHT
 
index 9adab59..63b8fc9 100644 (file)
@@ -78,9 +78,9 @@ Accessor to the actions hashref, containing all actions in this container.
 Accessor to the path part this container resolves to. Also what the container
 stringifies to.
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Matt S. Trout 
 
 =head1 COPYRIGHT
 
index f699d9f..a33d822 100644 (file)
@@ -23,7 +23,7 @@ sub FETCH_CODE_ATTRIBUTES { $_[0]->_attr_cache->{ $_[1] } || () }
 
 =head1 NAME
 
-Catalyst::AttrContainer - Handles code attribute storage and caching
+Catalyst::AttrContainer
 
 =head1 SYNOPSIS
 
@@ -47,9 +47,10 @@ Attribute function. See attributes(3pm)
 L<Catalyst::Dispatcher>
 L<Catalyst>.
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
+Marcus Ramberg, C<mramberg@cpan.org>
 
 =head1 COPYRIGHT
 
index e6bd821..5d8a4e6 100644 (file)
@@ -20,13 +20,15 @@ remains here for compability reasons.
 
 L<Catalyst>, L<Catalyst::Controller>.
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
+Marcus Ramberg, C<mramberg@cpan.org>
+Matt S Trout, C<mst@shadowcatsystems.co.uk>
 
 =head1 COPYRIGHT
 
 This program is free software, you can redistribute it and/or modify it under
 the same terms as Perl itself.
 
-=cut
+=cut
\ No newline at end of file
diff --git a/lib/Catalyst/Build.pm b/lib/Catalyst/Build.pm
new file mode 100644 (file)
index 0000000..944d9e8
--- /dev/null
@@ -0,0 +1,141 @@
+package Catalyst::Build;
+
+use strict;
+use Module::Build;
+use Path::Class;
+use File::Find 'find';
+
+our @ISA;
+eval "require Module::Build";
+die "Please install Module::Build\n" if $@;
+push @ISA, 'Module::Build';
+
+our @ignore =
+  qw/Build Build.PL Changes MANIFEST META.yml Makefile.PL Makefile README
+  _build blib lib script t/;
+
+our $FAKE;
+our $ignore = '^(' . join( '|', @ignore ) . ')$';
+
+=head1 NAME
+
+Catalyst::Build - Module::Build extension for Catalyst
+
+=head1 SYNOPSIS
+
+See L<Catalyst>
+
+=head1 DESCRIPTION
+
+L<Module::Build> extension for Catalyst.
+
+=head1 DEPRECATION NOTICE
+
+This module is deprecated in favor of L<Module::Install::Catalyst>. It's
+only left here for compability with older applications.
+
+=head1 METHODS
+
+=over 4
+
+=item new
+
+=cut
+
+sub new {
+    my $class = shift;
+    my $self  = $class->SUPER::new(@_);
+
+    my $app_name = $self->{properties}{module_name};
+    warn <<"EOF";
+
+ Note:
+
+    The use of Build.PL for building and distributing Catalyst
+    applications is deprecated in Catalyst 5.58.
+
+    We recommend using the new Module::Install-based Makefile
+    system.  You can generate a new Makefile.PL for your application
+    by running:
+
+        catalyst.pl -force -makefile $app_name
+
+EOF
+
+    return $self;
+}
+
+=item ACTION_install
+
+=cut
+
+sub ACTION_install {
+    my $self = shift;
+    $self->SUPER::ACTION_install;
+    $self->ACTION_install_extras;
+}
+
+=item ACTION_fakeinstall
+
+=cut
+
+sub ACTION_fakeinstall {
+    my $self = shift;
+    $self->SUPER::ACTION_fakeinstall;
+    local $FAKE = 1;
+    $self->ACTION_install_extras;
+}
+
+=item ACTION_install_extras
+
+=cut
+
+sub ACTION_install_extras {
+    my $self    = shift;
+    my $prefix  = $self->{properties}{destdir} || undef;
+    my $sitelib = $self->install_destination('lib');
+    my @path    = defined $prefix ? ( $prefix, $sitelib ) : ($sitelib);
+    my $path    = dir( @path, split( '::', $self->{properties}{module_name} ) );
+    my @files   = $self->_find_extras;
+    print "Installing extras to $path\n";
+    for (@files) {
+        $FAKE
+          ? print "$_ -> $path (FAKE)\n"
+          : $self->copy_if_modified( $_, $path );
+    }
+}
+
+sub _find_extras {
+    my $self = shift;
+    my @all  = glob '*';
+    my @files;
+    for my $file (@all) {
+        next if $file =~ /$ignore/;
+        if ( -d $file ) {
+            find(
+                sub {
+                    return if -d;
+                    push @files, $File::Find::name;
+                },
+                $file
+            );
+        }
+        else { push @files, $file }
+    }
+    return @files;
+}
+
+=back
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut
+
+1;
index 0b48725..116aa9a 100644 (file)
@@ -187,9 +187,11 @@ calling code in the application rather than the component itself.
 
 L<Catalyst>, L<Catalyst::Model>, L<Catalyst::View>, L<Catalyst::Controller>.
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
+Marcus Ramberg, C<mramberg@cpan.org>
+Matt S Trout, C<mst@shadowcatsystems.co.uk>
 
 =head1 COPYRIGHT
 
index b235774..3ccfc35 100644 (file)
@@ -279,11 +279,6 @@ sub _parse_LocalRegex_attr {
 
 sub _parse_LocalRegexp_attr { shift->_parse_LocalRegex_attr(@_); }
 
-sub _parse_PathPrefix_attr {
-    my $self = shift;
-    return PathPart => $self->path_prefix;
-}
-
 sub _parse_ActionClass_attr {
     my ( $self, $c, $name, $value ) = @_;
     unless ( $value =~ s/^\+// ) {
@@ -351,8 +346,8 @@ overridden from the "namespace" config key.
 
 =head2 $self->path_prefix($c)
 
-Returns the default path prefix for :PathPrefix, :Local, :LocalRegex and
-relative :Path actions in this component. Defaults to the action_namespace or
+Returns the default path prefix for :Local, :LocalRegex and relative
+:Path actions in this component. Defaults to the action_namespace or
 can be overridden from the "path" config key.
 
 =head2 $self->create_action(%args)
@@ -368,9 +363,10 @@ Primarily designed for the use of register_actions.
 
 Returns the application instance stored by C<new()>
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@oook.de>
+Marcus Ramberg C<mramberg@cpan.org>
 
 =head1 COPYRIGHT
 
index a3f271e..f8476eb 100644 (file)
@@ -58,9 +58,10 @@ arrayref, or undef if unable to do so.
 
 sub uri_for_action { }
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Matt S Trout
+Sebastian Riedel, C<sri@cpan.org>
 
 =head1 COPYRIGHT
 
index 0a2a038..d436983 100644 (file)
@@ -555,9 +555,9 @@ The C<forward>ing to other actions does just what you would expect. But if
 you C<detach> out of a chain, the rest of the chain will not get called
 after the C<detach>.
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Matt S Trout <mst@shadowcatsystems.co.uk>
 
 =head1 COPYRIGHT
 
index e1d0050..fc734dd 100644 (file)
@@ -45,9 +45,10 @@ sub match {
     return 0;
 }
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Matt S Trout
+Sebastian Riedel, C<sri@cpan.org>
 
 =head1 COPYRIGHT
 
index 8a85c50..f99e41c 100644 (file)
@@ -55,9 +55,9 @@ sub uri_for_action {
     return "/".$action->namespace;
 }
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
 
 =head1 COPYRIGHT
 
index 0b4e843..16a2314 100644 (file)
@@ -118,9 +118,10 @@ sub uri_for_action {
     }
 }
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Matt S Trout
+Sebastian Riedel, C<sri@cpan.org>
 
 =head1 COPYRIGHT
 
index a2dd81b..80b9f2f 100644 (file)
@@ -139,9 +139,10 @@ sub uri_for_action {
     return undef;
 }
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Matt S Trout
+Sebastian Riedel, C<sri@cpan.org>
 
 =head1 COPYRIGHT
 
index 96364e6..8afe7fe 100644 (file)
@@ -567,9 +567,10 @@ sub _load_dispatch_types {
     return @loaded;
 }
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
+Matt S Trout, C<mst@shadowcatsystems.co.uk>
 
 =head1 COPYRIGHT
 
index 6cff10e..b7b8be0 100644 (file)
@@ -670,7 +670,9 @@ sub unescape_uri {
 
 =head1 AUTHORS
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, <sri@cpan.org>
+
+Andy Grundman, <andy@hybridized.org>
 
 =head1 COPYRIGHT
 
index ca86d79..4b699d3 100644 (file)
@@ -239,11 +239,15 @@ sub run { shift; shift->handle_request(@_) }
 
 =head1 SEE ALSO
 
-L<Catalyst>, L<Catalyst::Engine>
+L<Catalyst> L<Catalyst::Engine>.
 
 =head1 AUTHORS
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, <sri@cpan.org>
+
+Christian Hansen, <ch@ngmedia.com>
+
+Andy Grundman, <andy@hybridized.org>
 
 =head1 COPYRIGHT
 
index 7d54beb..f8f6776 100644 (file)
@@ -399,7 +399,11 @@ L<Catalyst>, L<FCGI>.
 
 =head1 AUTHORS
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, <sri@cpan.org>
+
+Christian Hansen, <ch@ngmedia.com>
+
+Andy Grundman, <andy@hybridized.org>
 
 =head1 THANKS
 
index d3d1c6d..85ab25f 100644 (file)
@@ -533,11 +533,17 @@ sub _inet_addr { unpack "N*", inet_aton( $_[0] ) }
 
 =head1 SEE ALSO
 
-L<Catalyst>, L<Catalyst::Engine>
+L<Catalyst>, L<Catalyst::Engine>.
 
 =head1 AUTHORS
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, <sri@cpan.org>
+
+Dan Kubb, <dan.kubb-cpan@onautopilot.com>
+
+Sascha Kiefer, <esskar@cpan.org>
+
+Andy Grundman, <andy@hybridized.org>
 
 =head1 THANKS
 
index c23390b..02c58ba 100644 (file)
@@ -97,7 +97,11 @@ L<Catalyst::Engine>.
 
 =head1 AUTHORS
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, <sri@cpan.org>
+
+Dan Kubb, <dan.kubb-cpan@onautopilot.com>
+
+Andy Grundman, <andy@hybridized.org>
 
 =head1 THANKS
 
index 0ff3916..672ec08 100644 (file)
@@ -188,7 +188,9 @@ L<Catalyst>, L<Catalyst::Engine::HTTP::Restarter>, L<File::Modified>
 
 =head1 AUTHORS
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, <sri@cpan.org>
+
+Andy Grundman, <andy@hybridized.org>
 
 =head1 THANKS
 
index 14cf555..ee85e1e 100644 (file)
@@ -49,9 +49,10 @@ sub throw {
     Carp::croak($message);
 }
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
+Christian Hansen, C<ch@ngmedia.com>
 
 =head1 COPYRIGHT
 
index de89a06..822ea32 100644 (file)
@@ -221,9 +221,11 @@ over the log output.
 
 L<Catalyst>.
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
+Marcus Ramberg, C<mramberg@cpan.org>
+Christian Hansen, C<ch@ngmedia.com>
 
 =head1 COPYRIGHT
 
index 592685e..8170e5e 100644 (file)
@@ -91,13 +91,12 @@ Mailing-Lists:
     http://lists.rawmode.org/mailman/listinfo/catalyst
     http://lists.rawmode.org/mailman/listinfo/catalyst-dev
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@oook.de>
+Jesse Sheidlower, C<jester@panix.com>
 
 =head1 COPYRIGHT
 
 This program is free software, you can redistribute it and/or modify it
 under the same terms as Perl itself.
-
-=cut
index e52fe46..356745e 100644 (file)
@@ -20,9 +20,9 @@ Catalyst Model base class.
 Implements the same methods as other Catalyst components, see
 L<Catalyst::Component>
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@oook.de>
 
 =head1 COPYRIGHT
 
index 7210360..9625636 100644 (file)
@@ -566,7 +566,9 @@ version string.
 
 =head1 AUTHORS
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
+
+Marcus Ramberg, C<mramberg@cpan.org>
 
 =head1 COPYRIGHT
 
index 224b29c..34dccb4 100644 (file)
@@ -160,7 +160,9 @@ Returns the client-supplied Content-Type.
 
 =head1 AUTHORS
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
+
+Christian Hansen, C<ch@ngmedia.com>
 
 =head1 COPYRIGHT
 
index 53d8ad8..6b4c7c5 100644 (file)
@@ -106,8 +106,7 @@ Alias for $res->body.
 
 =head2 $res->redirect( $url, $status )
 
-Causes the response to redirect to the specified URL. The default status is
-C<302>.
+Causes the response to redirect to the specified URL.
 
     $c->response->redirect( 'http://slashdot.org' );
     $c->response->redirect( 'http://slashdot.org', 307 );
@@ -144,7 +143,9 @@ sub write { shift->{_context}->write(@_); }
 
 =head1 AUTHORS
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
+
+Marcus Ramberg, C<mramberg@cpan.org>
 
 =head1 COPYRIGHT
 
index c74a474..1de1ba3 100644 (file)
@@ -7,9 +7,7 @@ BEGIN { require 5.008001; }
 
 # Remember to update this in Catalyst as well!
 
-our $VERSION='5.7099_03';
-
-$VERSION= eval $VERSION; 
+our $VERSION='5.7014';
 
 =head1 NAME
 
@@ -23,9 +21,9 @@ See L<Catalyst>.
 
 This is the primary class for the Catalyst-Runtime distribution, version 5.70.
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+The Catalyst Core Team - see http://catalyst.perl.org/
 
 =head1 COPYRIGHT
 
index 95300e7..7a6c64e 100644 (file)
@@ -354,11 +354,11 @@ We've added some compatability methods to handle this scenario:
 
 =head1 SEE ALSO
 
-L<Catalyst>
+L<Catalyst>.
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Jon Schutz
 
 =head1 COPYRIGHT
 
index 9e0db01..82a43c1 100644 (file)
@@ -21,12 +21,6 @@ Catalyst::Test - Test Catalyst Applications
     request('index.html');
     get('index.html');
 
-    use HTTP::Request::Common;
-    my $response = request POST '/foo', [
-        bar => 'baz',
-        something => 'else'
-    ];
-
     # Run tests against a remote server
     CATALYST_SERVER='http://localhost:3000/' prove -r -l lib/ t/
 
@@ -51,13 +45,7 @@ Catalyst::Test - Test Catalyst Applications
 
 =head1 DESCRIPTION
 
-This module allows you to make requests to a Catalyst application either without
-a server, by simulating the environment of an HTTP request using
-L<HTTP::Request::AsCGI> or remotely if you define the CATALYST_SERVER
-environment variable.
-
-The </get> and </request> functions take either a URI or an L<HTTP::Request>
-object.
+Test Catalyst Applications.
 
 =head2 METHODS
 
@@ -116,8 +104,6 @@ sub import {
 
 =head2 local_request
 
-Simulate a request using L<HTTP::Request::AsCGI>.
-
 =cut
 
 sub local_request {
@@ -197,12 +183,11 @@ sub remote_request {
 
 =head1 SEE ALSO
 
-L<Catalyst>, L<Test::WWW::Mechanize::Catalyst>,
-L<Test::WWW::Selenium::Catalyst>, L<Test::More>, L<HTTP::Request::Common>
+L<Catalyst>.
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
 
 =head1 COPYRIGHT
 
index d27fa9c..2c57244 100644 (file)
@@ -331,9 +331,10 @@ sub env_value {
     return;
 }
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@cpan.org>
+Yuval Kogman, C<nothingmuch@woobling.org>
 
 =head1 COPYRIGHT
 
index 6c41dd6..40ed724 100644 (file)
@@ -52,9 +52,10 @@ Merges two hashes together recursively, giving right-hand precedence.
 
 =cut
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Catalyst Contributors, see Catalyst.pm
+Sebastian Riedel, C<sri@oook.de>
+Marcus Ramberg, C<mramberg@cpan.org>
 
 =head1 COPYRIGHT
 
index 287c12e..188c708 100755 (executable)
@@ -154,9 +154,11 @@ test directory
 
 =back
 
+
 The application module generated by the C<catalyst.pl> script is functional,
 although it reacts to all requests by outputting a friendly welcome screen.
 
+
 =head1 NOTE
 
 Neither C<catalyst.pl> nor the generated helper script will overwrite existing
@@ -169,16 +171,22 @@ Catalyst or its plugins generate different code, or to see how you may have
 changed the generated code (although you do of course have all your code in a
 version control system anyway, don't you ...).
 
+
+
 =head1 SEE ALSO
 
 L<Catalyst::Manual>, L<Catalyst::Manual::Intro>
 
-=head1 AUTHORS
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>,
+Andrew Ford, C<A.Ford@ford-mason.co.uk>
 
-Catalyst Contributors, see Catalyst.pm
 
 =head1 COPYRIGHT
 
+Copyright 2004-2005 Sebastian Riedel. All rights reserved.
+
 This library is free software, you can redistribute it and/or modify it under
 the same terms as Perl itself.
 
diff --git a/t/lib/TestApp/Controller/Action/Chained/PathPrefix.pm b/t/lib/TestApp/Controller/Action/Chained/PathPrefix.pm
deleted file mode 100644 (file)
index 0d3b859..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-package TestApp::Controller::Action::Chained::PathPrefix;
-
-use strict;
-use warnings;
-
-use base qw/Catalyst::Controller/;
-
-# this is kinda the same thing as: sub instance : Path {}
-# it should respond to: /action/chained/pathprefix/*
-sub instance : Chained('/') PathPrefix Args(1) { }
-
-1;
index 6ec7539..6a448cd 100644 (file)
@@ -2,6 +2,7 @@ package TestApp::Controller::Args;
 
 use strict;
 use base 'Catalyst::Base';
+use Data::Dumper;
 
 sub args :Local  {
     my ( $self, $c ) = @_;
@@ -13,4 +14,4 @@ sub params :Local {
     $c->res->body( join('',@_) );
 }
 
-1;
+1;
\ No newline at end of file
index 9cb6bf4..708fc67 100644 (file)
@@ -10,7 +10,7 @@ our $iters;
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 127*$iters;
+use Test::More tests => 124*$iters;
 use Catalyst::Test 'TestApp';
 
 if ( $ENV{CAT_BENCHMARK} ) {
@@ -863,23 +863,4 @@ sub run_tests {
     
     }
 
-    #
-    #   PathPrefix
-    #
-    {
-        my @expected = qw[
-          TestApp::Controller::Action::Chained->begin
-          TestApp::Controller::Action::Chained::PathPrefix->instance
-          TestApp::Controller::Action::Chained->end
-        ];
-
-        my $expected = join( ", ", @expected );
-
-        ok( my $response = request('http://localhost/action/chained/pathprefix/1'),
-            "PathPrefix (as an endpoint)" );
-        is( $response->header('X-Catalyst-Executed'),
-            $expected, 'Executed actions' );
-        is( $response->content, '; 1', 'Content OK' );
-    }
-
 }
index e726027..785ae5d 100644 (file)
@@ -8,6 +8,7 @@ use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 28;
 use Catalyst::Test 'TestApp';
+use Data::Dumper;
 
 local $^W = 0;
 
index 250960a..151763b 100644 (file)
@@ -1,4 +1,4 @@
-use Test::More tests => 22;
+use Test::More tests => 11;
 use strict;
 use warnings;
 
@@ -23,6 +23,16 @@ is(MyApp->comp('C::Controller'), 'MyApp::C::Controller', 'Two-part return ok');
 
 is(MyApp->comp('Model'), 'MyApp::M::Model', 'Single part return ok');
 
+# regexp fallback
+{
+    my $warnings = 0;
+    no warnings 'redefine';
+    local *Catalyst::Log::warn = sub { $warnings++ };
+
+    is(MyApp->comp('::M::'), 'MyApp::M::Model', 'Regex return ok');
+    ok( $warnings, 'regexp fallback for comp() warns' );
+}
+
 is_deeply([ MyApp->comp() ], \@complist, 'Empty return ok');
 
 # Is this desired behaviour?
@@ -31,30 +41,6 @@ is_deeply([ MyApp->comp('Foo') ], \@complist, 'Fallthrough return ok');
 # regexp behavior
 {
     is_deeply( [ MyApp->comp( qr{Model} ) ], [ 'MyApp::M::Model'], 'regexp ok' );
-    is_deeply( [ MyApp->comp('MyApp::V::View$') ], [ 'MyApp::V::View' ], 'Explicit return ok');
-    is_deeply( [ MyApp->comp('MyApp::C::Controller$') ], [ 'MyApp::C::Controller' ], 'Explicit return ok');
-    is_deeply( [ MyApp->comp('MyApp::M::Model$') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
-
-    # a couple other varieties for regexp fallback
-    is_deeply( [ MyApp->comp('M::Model') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
-
-    {
-        my $warnings = 0;
-        no warnings 'redefine';
-        local *Catalyst::Log::warn = sub { $warnings++ };
-
-        is_deeply( [ MyApp->comp('::M::Model') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
-        ok( $warnings, 'regexp fallback warnings' );
-
-        $warnings = 0;
-        is_deeply( [ MyApp->comp('Mode') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
-        ok( $warnings, 'regexp fallback warnings' );
-
-        $warnings = 0;
-        is(MyApp->comp('::M::'), 'MyApp::M::Model', 'Regex return ok');
-        ok( $warnings, 'regexp fallback for comp() warns' );
-    }
-
 }
 
 # multiple returns
@@ -68,21 +54,3 @@ is_deeply([ MyApp->comp('Foo') ], \@complist, 'Fallthrough return ok');
     is_deeply( scalar MyApp->comp( qr{DNE} ), 0, 'no results for failed search' );
 }
 
-
-#checking @args passed to ACCEPT_CONTEXT
-{
-    my $args;
-
-    no warnings; 
-    *MyApp::M::Model::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
-
-    MyApp->component('MyApp::M::Model', qw/foo bar/);
-    is_deeply($args, [qw/foo bar/], 'args passed to ACCEPT_CONTEXT ok');
-
-    MyApp->component('M::Model', qw/foo2 bar2/);
-    is_deeply($args, [qw/foo2 bar2/], 'args passed to ACCEPT_CONTEXT ok');
-
-    MyApp->component('Mode', qw/foo3 bar3/);
-    is_deeply($args, [qw/foo3 bar3/], 'args passed to ACCEPT_CONTEXT ok');
-} 
-
index 549d758..dc080f9 100644 (file)
@@ -1,4 +1,4 @@
-use Test::More tests => 44;
+use Test::More tests => 37;
 use strict;
 use warnings;
 
@@ -107,23 +107,6 @@ is ( MyApp->model , 'MyApp::Model::M', 'default_model in class method ok');
     is_deeply( [ MyApp->view( qr{^V[ie]+w$} ) ], [ 'MyApp::V::View' ], 'regexp view ok' );
     is_deeply( [ MyApp->controller( qr{Dummy\::Model$} ) ], [ 'MyApp::Controller::Model::Dummy::Model' ], 'regexp controller ok' );
     is_deeply( [ MyApp->model( qr{Dum{2}y} ) ], [ 'MyApp::Model::Dummy::Model' ], 'regexp model ok' );
-    
-    # object w/ qr{}
-    is_deeply( [ MyApp->model( qr{Test} ) ], [ MyApp->components->{'MyApp::Model::Test::Object'} ], 'Object returned' );
-
-    {
-        my $warnings = 0;
-        no warnings 'redefine';
-        local *Catalyst::Log::warn = sub { $warnings++ };
-
-        # object w/ regexp fallback
-        is_deeply( [ MyApp->model( 'Test' ) ], [ MyApp->components->{'MyApp::Model::Test::Object'} ], 'Object returned' );
-        ok( $warnings, 'regexp fallback warnings' );
-    }
-
-    is_deeply( [ MyApp->view('MyApp::V::View$') ], [ 'MyApp::V::View' ], 'Explicit return ok');
-    is_deeply( [ MyApp->controller('MyApp::C::Controller$') ], [ 'MyApp::C::Controller' ], 'Explicit return ok');
-    is_deeply( [ MyApp->model('MyApp::M::Model$') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
 }
 
 {
@@ -147,20 +130,14 @@ is ( MyApp->model , 'MyApp::Model::M', 'default_model in class method ok');
 }
 
 #checking @args passed to ACCEPT_CONTEXT
+my $args;
 {
-    my $args;
-
     no warnings; 
     *MyApp::Model::M::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
     *MyApp::View::V::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
+} 
+MyApp->model('M', qw/foo bar/);
+is_deeply($args, [qw/foo bar/], '$c->model args passed to ACCEPT_CONTEXT ok');
+MyApp->view('V', qw/baz moo/);
+is_deeply($args, [qw/baz moo/], '$c->view args passed to ACCEPT_CONTEXT ok');
 
-    MyApp->model('M', qw/foo bar/);
-    is_deeply($args, [qw/foo bar/], '$c->model args passed to ACCEPT_CONTEXT ok');
-
-    my $x = MyApp->view('V', qw/foo2 bar2/);
-    is_deeply($args, [qw/foo2 bar2/], '$c->view args passed to ACCEPT_CONTEXT ok');
-
-    # regexp fallback
-    MyApp->view('::View::V', qw/foo3 bar3/);
-    is_deeply($args, [qw/foo3 bar3/], 'args passed to ACCEPT_CONTEXT ok');
-}