From: Tomas Doran Date: Thu, 7 May 2009 13:19:53 +0000 (+0000) Subject: Bump required Module::Install version in everything. janus++ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=attic%2Fcontext_go Bump required Module::Install version in everything. janus++ --- diff --git a/Changes b/Changes index 4b38787..c5425e4 100644 --- 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 diff --git a/Makefile.PL b/Makefile.PL index e646ca1..34e2a5a 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,4 @@ -use inc::Module::Install 0.64; +use inc::Module::Install 0.87; perl_version '5.008001'; diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 02f1216..22deaf1 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -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 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 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 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 loaded and set up as components. -Note, that modules which are B an I of the main -file namespace loaded will not be instantiated as components. - =cut sub setup_components { @@ -2425,15 +2411,13 @@ Wiki: =head2 L - The test suite. -=head1 PROJECT FOUNDER +=head1 CREDITS -sri: Sebastian Riedel +Andy Grundman -=head1 CONTRIBUTORS +Andy Wardley -abw: Andy Wardley - -acme: Leon Brocard +Andreas Marienborg Andrew Bramble @@ -2441,67 +2425,65 @@ Andrew Ford Andrew Ruthven -andyg: Andy Grundman +Arthur Bergman -audreyt: Audrey Tang +Autrijus Tang -bricas: Brian Cassidy +Brian Cassidy -chansen: Christian Hansen +Carl Franks -chicks: Christopher Hicks +Christian Hansen -dkubb: Dan Kubb +Christopher Hicks -Drew Taylor +Dan Sully + +Danijel Milicevic -esskar: Sascha Kiefer +David Kamholz -fireartist: Carl Franks +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 - -marcus: Marcus Ramberg - -miyagawa: Tatsuhiko Miyagawa +Juan Camacho -mst: Matt S. Trout +Leon Brocard -mugwump: Sam Vilain +Marcus Ramberg -naughton: David Naughton +Matt S Trout -ningu: David Kamholz +Robert Sedlacek -nothingmuch: Yuval Kogman +Sam Vilain -numa: Dan Sully +Sascha Kiefer -obra: Jesse Vincent +Sebastian Willert -omega: Andreas Marienborg +Tatsuhiko Miyagawa -phaylon: Robert Sedlacek - -sky: Arthur Bergman +Ulf Edvinsson -the_jester: Jesse Sheidlower +Yuval Kogman -Ulf Edvinsson +=head1 AUTHOR -willert: Sebastian Willert +Sebastian Riedel, C =head1 LICENSE diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index 6c9e9a1..7e828f0 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -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 diff --git a/lib/Catalyst/ActionChain.pm b/lib/Catalyst/ActionChain.pm index 9ef1513..2fd63d9 100644 --- a/lib/Catalyst/ActionChain.pm +++ b/lib/Catalyst/ActionChain.pm @@ -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 diff --git a/lib/Catalyst/ActionContainer.pm b/lib/Catalyst/ActionContainer.pm index 9adab59..63b8fc9 100644 --- a/lib/Catalyst/ActionContainer.pm +++ b/lib/Catalyst/ActionContainer.pm @@ -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 diff --git a/lib/Catalyst/AttrContainer.pm b/lib/Catalyst/AttrContainer.pm index f699d9f..a33d822 100644 --- a/lib/Catalyst/AttrContainer.pm +++ b/lib/Catalyst/AttrContainer.pm @@ -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 L. -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C +Marcus Ramberg, C =head1 COPYRIGHT diff --git a/lib/Catalyst/Base.pm b/lib/Catalyst/Base.pm index e6bd821..5d8a4e6 100644 --- a/lib/Catalyst/Base.pm +++ b/lib/Catalyst/Base.pm @@ -20,13 +20,15 @@ remains here for compability reasons. L, L. -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C +Marcus Ramberg, C +Matt S Trout, C =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 index 0000000..944d9e8 --- /dev/null +++ b/lib/Catalyst/Build.pm @@ -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 + +=head1 DESCRIPTION + +L extension for Catalyst. + +=head1 DEPRECATION NOTICE + +This module is deprecated in favor of L. 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 + +=head1 LICENSE + +This library is free software, you can redistribute it and/or modify it under +the same terms as Perl itself. + +=cut + +1; diff --git a/lib/Catalyst/Component.pm b/lib/Catalyst/Component.pm index 0b48725..116aa9a 100644 --- a/lib/Catalyst/Component.pm +++ b/lib/Catalyst/Component.pm @@ -187,9 +187,11 @@ calling code in the application rather than the component itself. L, L, L, L. -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C +Marcus Ramberg, C +Matt S Trout, C =head1 COPYRIGHT diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index b235774..3ccfc35 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -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 -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C +Marcus Ramberg C =head1 COPYRIGHT diff --git a/lib/Catalyst/DispatchType.pm b/lib/Catalyst/DispatchType.pm index a3f271e..f8476eb 100644 --- a/lib/Catalyst/DispatchType.pm +++ b/lib/Catalyst/DispatchType.pm @@ -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 =head1 COPYRIGHT diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index 0a2a038..d436983 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -555,9 +555,9 @@ The Cing to other actions does just what you would expect. But if you C out of a chain, the rest of the chain will not get called after the C. -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Matt S Trout =head1 COPYRIGHT diff --git a/lib/Catalyst/DispatchType/Default.pm b/lib/Catalyst/DispatchType/Default.pm index e1d0050..fc734dd 100644 --- a/lib/Catalyst/DispatchType/Default.pm +++ b/lib/Catalyst/DispatchType/Default.pm @@ -45,9 +45,10 @@ sub match { return 0; } -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Matt S Trout +Sebastian Riedel, C =head1 COPYRIGHT diff --git a/lib/Catalyst/DispatchType/Index.pm b/lib/Catalyst/DispatchType/Index.pm index 8a85c50..f99e41c 100644 --- a/lib/Catalyst/DispatchType/Index.pm +++ b/lib/Catalyst/DispatchType/Index.pm @@ -55,9 +55,9 @@ sub uri_for_action { return "/".$action->namespace; } -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C =head1 COPYRIGHT diff --git a/lib/Catalyst/DispatchType/Path.pm b/lib/Catalyst/DispatchType/Path.pm index 0b4e843..16a2314 100644 --- a/lib/Catalyst/DispatchType/Path.pm +++ b/lib/Catalyst/DispatchType/Path.pm @@ -118,9 +118,10 @@ sub uri_for_action { } } -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Matt S Trout +Sebastian Riedel, C =head1 COPYRIGHT diff --git a/lib/Catalyst/DispatchType/Regex.pm b/lib/Catalyst/DispatchType/Regex.pm index a2dd81b..80b9f2f 100644 --- a/lib/Catalyst/DispatchType/Regex.pm +++ b/lib/Catalyst/DispatchType/Regex.pm @@ -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 =head1 COPYRIGHT diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 96364e6..8afe7fe 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -567,9 +567,10 @@ sub _load_dispatch_types { return @loaded; } -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C +Matt S Trout, C =head1 COPYRIGHT diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 6cff10e..b7b8be0 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -670,7 +670,9 @@ sub unescape_uri { =head1 AUTHORS -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, + +Andy Grundman, =head1 COPYRIGHT diff --git a/lib/Catalyst/Engine/CGI.pm b/lib/Catalyst/Engine/CGI.pm index ca86d79..4b699d3 100644 --- a/lib/Catalyst/Engine/CGI.pm +++ b/lib/Catalyst/Engine/CGI.pm @@ -239,11 +239,15 @@ sub run { shift; shift->handle_request(@_) } =head1 SEE ALSO -L, L +L L. =head1 AUTHORS -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, + +Christian Hansen, + +Andy Grundman, =head1 COPYRIGHT diff --git a/lib/Catalyst/Engine/FastCGI.pm b/lib/Catalyst/Engine/FastCGI.pm index 7d54beb..f8f6776 100644 --- a/lib/Catalyst/Engine/FastCGI.pm +++ b/lib/Catalyst/Engine/FastCGI.pm @@ -399,7 +399,11 @@ L, L. =head1 AUTHORS -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, + +Christian Hansen, + +Andy Grundman, =head1 THANKS diff --git a/lib/Catalyst/Engine/HTTP.pm b/lib/Catalyst/Engine/HTTP.pm index d3d1c6d..85ab25f 100644 --- a/lib/Catalyst/Engine/HTTP.pm +++ b/lib/Catalyst/Engine/HTTP.pm @@ -533,11 +533,17 @@ sub _inet_addr { unpack "N*", inet_aton( $_[0] ) } =head1 SEE ALSO -L, L +L, L. =head1 AUTHORS -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, + +Dan Kubb, + +Sascha Kiefer, + +Andy Grundman, =head1 THANKS diff --git a/lib/Catalyst/Engine/HTTP/Restarter.pm b/lib/Catalyst/Engine/HTTP/Restarter.pm index c23390b..02c58ba 100644 --- a/lib/Catalyst/Engine/HTTP/Restarter.pm +++ b/lib/Catalyst/Engine/HTTP/Restarter.pm @@ -97,7 +97,11 @@ L. =head1 AUTHORS -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, + +Dan Kubb, + +Andy Grundman, =head1 THANKS diff --git a/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm b/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm index 0ff3916..672ec08 100644 --- a/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm +++ b/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm @@ -188,7 +188,9 @@ L, L, L =head1 AUTHORS -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, + +Andy Grundman, =head1 THANKS diff --git a/lib/Catalyst/Exception.pm b/lib/Catalyst/Exception.pm index 14cf555..ee85e1e 100644 --- a/lib/Catalyst/Exception.pm +++ b/lib/Catalyst/Exception.pm @@ -49,9 +49,10 @@ sub throw { Carp::croak($message); } -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C +Christian Hansen, C =head1 COPYRIGHT diff --git a/lib/Catalyst/Log.pm b/lib/Catalyst/Log.pm index de89a06..822ea32 100644 --- a/lib/Catalyst/Log.pm +++ b/lib/Catalyst/Log.pm @@ -221,9 +221,11 @@ over the log output. L. -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C +Marcus Ramberg, C +Christian Hansen, C =head1 COPYRIGHT diff --git a/lib/Catalyst/Manual.pm b/lib/Catalyst/Manual.pm index 592685e..8170e5e 100644 --- a/lib/Catalyst/Manual.pm +++ b/lib/Catalyst/Manual.pm @@ -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 +Jesse Sheidlower, C =head1 COPYRIGHT This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. - -=cut diff --git a/lib/Catalyst/Model.pm b/lib/Catalyst/Model.pm index e52fe46..356745e 100644 --- a/lib/Catalyst/Model.pm +++ b/lib/Catalyst/Model.pm @@ -20,9 +20,9 @@ Catalyst Model base class. Implements the same methods as other Catalyst components, see L -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C =head1 COPYRIGHT diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index 7210360..9625636 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -566,7 +566,9 @@ version string. =head1 AUTHORS -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C + +Marcus Ramberg, C =head1 COPYRIGHT diff --git a/lib/Catalyst/Request/Upload.pm b/lib/Catalyst/Request/Upload.pm index 224b29c..34dccb4 100644 --- a/lib/Catalyst/Request/Upload.pm +++ b/lib/Catalyst/Request/Upload.pm @@ -160,7 +160,9 @@ Returns the client-supplied Content-Type. =head1 AUTHORS -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C + +Christian Hansen, C =head1 COPYRIGHT diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index 53d8ad8..6b4c7c5 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -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 + +Marcus Ramberg, C =head1 COPYRIGHT diff --git a/lib/Catalyst/Runtime.pm b/lib/Catalyst/Runtime.pm index c74a474..1de1ba3 100644 --- a/lib/Catalyst/Runtime.pm +++ b/lib/Catalyst/Runtime.pm @@ -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. 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 diff --git a/lib/Catalyst/Stats.pm b/lib/Catalyst/Stats.pm index 95300e7..7a6c64e 100644 --- a/lib/Catalyst/Stats.pm +++ b/lib/Catalyst/Stats.pm @@ -354,11 +354,11 @@ We've added some compatability methods to handle this scenario: =head1 SEE ALSO -L +L. -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Jon Schutz =head1 COPYRIGHT diff --git a/lib/Catalyst/Test.pm b/lib/Catalyst/Test.pm index 9e0db01..82a43c1 100644 --- a/lib/Catalyst/Test.pm +++ b/lib/Catalyst/Test.pm @@ -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 or remotely if you define the CATALYST_SERVER -environment variable. - -The and functions take either a URI or an L -object. +Test Catalyst Applications. =head2 METHODS @@ -116,8 +104,6 @@ sub import { =head2 local_request -Simulate a request using L. - =cut sub local_request { @@ -197,12 +183,11 @@ sub remote_request { =head1 SEE ALSO -L, L, -L, L, L +L. -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C =head1 COPYRIGHT diff --git a/lib/Catalyst/Utils.pm b/lib/Catalyst/Utils.pm index d27fa9c..2c57244 100644 --- a/lib/Catalyst/Utils.pm +++ b/lib/Catalyst/Utils.pm @@ -331,9 +331,10 @@ sub env_value { return; } -=head1 AUTHORS +=head1 AUTHOR -Catalyst Contributors, see Catalyst.pm +Sebastian Riedel, C +Yuval Kogman, C =head1 COPYRIGHT diff --git a/lib/Catalyst/View.pm b/lib/Catalyst/View.pm index 6c41dd6..40ed724 100644 --- a/lib/Catalyst/View.pm +++ b/lib/Catalyst/View.pm @@ -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 +Marcus Ramberg, C =head1 COPYRIGHT diff --git a/script/catalyst.pl b/script/catalyst.pl index 287c12e..188c708 100755 --- a/script/catalyst.pl +++ b/script/catalyst.pl @@ -154,9 +154,11 @@ test directory =back + The application module generated by the C script is functional, although it reacts to all requests by outputting a friendly welcome screen. + =head1 NOTE Neither C 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, L -=head1 AUTHORS +=head1 AUTHOR + +Sebastian Riedel, C, +Andrew Ford, C -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 index 0d3b859..0000000 --- a/t/lib/TestApp/Controller/Action/Chained/PathPrefix.pm +++ /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; diff --git a/t/lib/TestApp/Controller/Args.pm b/t/lib/TestApp/Controller/Args.pm index 6ec7539..6a448cd 100644 --- a/t/lib/TestApp/Controller/Args.pm +++ b/t/lib/TestApp/Controller/Args.pm @@ -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 diff --git a/t/live_component_controller_action_chained.t b/t/live_component_controller_action_chained.t index 9cb6bf4..708fc67 100644 --- a/t/live_component_controller_action_chained.t +++ b/t/live_component_controller_action_chained.t @@ -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' ); - } - } diff --git a/t/live_priorities.t b/t/live_priorities.t index e726027..785ae5d 100644 --- a/t/live_priorities.t +++ b/t/live_priorities.t @@ -8,6 +8,7 @@ use lib "$FindBin::Bin/lib"; use Test::More tests => 28; use Catalyst::Test 'TestApp'; +use Data::Dumper; local $^W = 0; diff --git a/t/unit_core_component.t b/t/unit_core_component.t index 250960a..151763b 100644 --- a/t/unit_core_component.t +++ b/t/unit_core_component.t @@ -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'); -} - diff --git a/t/unit_core_mvc.t b/t/unit_core_mvc.t index 549d758..dc080f9 100644 --- a/t/unit_core_mvc.t +++ b/t/unit_core_mvc.t @@ -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'); -}