[Catalyst-commits] r13543 - in Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href: . lib lib/Catalyst lib/Catalyst/Script t t/aggregate t/author t/lib t/lib/ChainedActionsApp t/lib/ChainedActionsApp/Controller t/lib/TestAppShowInternalActions t/lib/TestAppShowInternalActions/Controller

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Thu Aug 26 00:18:07 GMT 2010


Author: t0m
Date: 2010-08-26 01:18:07 +0100 (Thu, 26 Aug 2010)
New Revision: 13543

Added:
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/live__component_controller_action_chained2.t
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/ChainedActionsApp.pm
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/ChainedActionsApp/
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/ChainedActionsApp/Controller/
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/ChainedActionsApp/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppShowInternalActions.pm
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppShowInternalActions/
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppShowInternalActions/Controller/
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppShowInternalActions/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/live_show_internal_actions_warnings.t
Modified:
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/Changes
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/Makefile.PL
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst.pm
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Script/CGI.pm
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Script/Server.pm
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/ScriptRole.pm
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Utils.pm
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/unit_core_script_help.t
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/unit_core_script_test.t
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/author/podcoverage.t
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/custom_exception_class_simple.t
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppClassExceptionSimpleTest.pm
   Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/unit_core_methodattributes_method_metaclass_on_subclasses.t
Log:
 r15777 at t0mlaptop (orig r13468):  lukes | 2010-08-04 15:25:18 +0100
 moved component name sort that happens in setup_components to locate_components to allow methods to wrap around locate_components
 r15779 at t0mlaptop (orig r13470):  rbuels | 2010-08-04 21:04:14 +0100
 don't load Catalyst::Exception in Utils.pm BEGIN, because some Scripts::* load Utils before MyApp.pm, meaning that ::Exception::CATALYST_EXCEPTION_CLASS in MyApp.pm will not be respected
 r15823 at t0mlaptop (orig r13513):  dduncan | 2010-08-22 04:25:42 +0100
 C-R-5-8 : Makefile.PL : remove bogus comment
 r15824 at t0mlaptop (orig r13514):  ferz | 2010-08-22 15:03:36 +0100
 Discovered some inconsistency in precedence behavior of chained actions.
 
 r15825 at t0mlaptop (orig r13515):  ferz | 2010-08-22 16:04:58 +0100
 Checks for any action now.
 
 r15826 at t0mlaptop (orig r13516):  bricas | 2010-08-23 18:55:43 +0100
 Fix two warnings:
  - Fix warning about "excludes" during role application
  - Fix warning from MooseX::Getopt regarding duplicate "help" aliases
 
 r15830 at t0mlaptop (orig r13520):  hobbs | 2010-08-25 02:31:50 +0100
 Add the app for ChainedActionsApp test. It's still failing, but differently now...
 
 r15838 at t0mlaptop (orig r13528):  t0m | 2010-08-25 14:46:22 +0100
 Fix bug with parse_on_demand
 r15839 at t0mlaptop (orig r13529):  t0m | 2010-08-25 14:47:01 +0100
 Back out 13528, cocked that up.
 r15840 at t0mlaptop (orig r13530):  t0m | 2010-08-25 14:47:23 +0100
 Fix bug with parse_on_demand (take 2)
 r15844 at t0mlaptop (orig r13534):  t0m | 2010-08-25 23:53:20 +0100
 Fix RT#59738, show_internal_actions produces warnings in debug mode
 r15845 at t0mlaptop (orig r13535):  t0m | 2010-08-26 00:07:21 +0100
 Fix test output, as per RT#56590
 r15846 at t0mlaptop (orig r13536):  t0m | 2010-08-26 00:14:42 +0100
 Update changelog
 r15847 at t0mlaptop (orig r13537):  t0m | 2010-08-26 00:17:50 +0100
 Test::Aggregate does not like __END__
 r15848 at t0mlaptop (orig r13538):  t0m | 2010-08-26 00:26:14 +0100
 No passing TODOs
 r15849 at t0mlaptop (orig r13539):  t0m | 2010-08-26 00:31:03 +0100
 Omit the run method for scripts which new Pod::Coverage finds
 r15850 at t0mlaptop (orig r13540):  t0m | 2010-08-26 00:39:56 +0100
 No idea why but lack of this causes a void context warning when run under the test harness
 r15851 at t0mlaptop (orig r13541):  t0m | 2010-08-26 01:01:20 +0100
 Unify options, get rid of -h which only worked on the CGI script anyway (-h is host in ::Server). This technically breaks back-compat slightly, but for the command line options for help in the script you never run from command line anyway, I don't care
 r15852 at t0mlaptop (orig r13542):  t0m | 2010-08-26 01:08:24 +0100
 Rename test, to merge



Property changes on: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href
___________________________________________________________________
Modified: svk:merge
   - 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/compres:7999
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/context_go:8001
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:8533
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/Catalyst-Test-Updates:8363
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/add_captures_to_visit:9546
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/aggregate_more:11803
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/better_scripts:12074
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/disable_regex_fallback:11456
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_iis_cgi:13450
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_path_info_decoding:12089
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_request_uri:13262
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/index_default_fuckage:10646
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7911
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/more_metaclass_compat:13280
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/namespace_handling_refactor:10655
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/param_filtering:13012
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/rt58057:13445
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/tweak_controller_action_creation:13440
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2:11811
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/uri_for_utf8:12834
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Runtime-better_scripts:11331
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Runtime-mech_tests:15583
8a9521aa-ff93-41d6-9f87-b05cafcdab40:/local/cat/Catalyst-Runtime/5.80/trunk:8157
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
   + 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/compres:7999
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/context_go:8001
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:8533
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/Catalyst-Test-Updates:8363
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/add_captures_to_visit:9546
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/aggregate_more:11803
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/better_scripts:12074
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/disable_regex_fallback:11456
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_iis_cgi:13450
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_path_info_decoding:12089
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_request_uri:13262
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/index_default_fuckage:10646
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7911
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/more_metaclass_compat:13280
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/namespace_handling_refactor:10655
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/param_filtering:13012
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/rt58057:13445
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/tweak_controller_action_creation:13440
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2:11811
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/uri_for_utf8:12834
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/trunk:13542
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Runtime-better_scripts:11331
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Runtime-mech_tests:15583
8a9521aa-ff93-41d6-9f87-b05cafcdab40:/local/cat/Catalyst-Runtime/5.80/trunk:8157
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/Changes
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/Changes	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/Changes	2010-08-26 00:18:07 UTC (rev 13543)
@@ -1,5 +1,34 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+ Bug fixes:
+  - Fix so that CATALYST_EXCEPTION_CLASS in MyApp is always respected by
+    not loading Catalyst::Exception in Utils.pm BEGIN, because some Scripts::*
+    load Utils before MyApp.pm
+
+  - Fix warnings with new Moose versions about "excludes" during role
+    application
+
+  - Fix warning from MooseX::Getopt regarding duplicate "help" aliases.
+
+  - parse_on_demand fixed when used in conjunction with debug mode.
+    A regression was introduced in 5.80022 which would cause the body
+    to always be parsed for logging at the end of the request when in
+    debug mode. This has been fixed so that if the body has not been parsed
+    by the time the request is logged, then the body is omitted.
+
+  - Fix show_internal_actions config setting producing warnings in debug
+    mode (RT#59738)
+
+ Refactoring:
+   - moved component name sort that happens in setup_components to
+     locate_components to allow methods to wrap around locate_components
+
+ Documentation:
+    - Fix some typos
+
+    - Advertise Catalyst::Plugin::SmartURI
+
+
 5.80025 2010-07-29 01:50:00
 
  New features:
@@ -14,6 +43,8 @@
   - Fix controllers with no method attributes (where the action definitions
     are entirely contained in config). RT#58057
   - Fix running as a CGI under IIS at non-root locations.
+  - Fix warning about "excludes" during role application
+  - Fix warning from MooseX::Getopt regarding duplicate "help" aliases
 
  Documentation:
   - Fix missing - in the docs when describing the --mechanize option at one

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/Makefile.PL	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/Makefile.PL	2010-08-26 00:18:07 UTC (rev 13543)
@@ -47,7 +47,7 @@
 requires 'Task::Weaken';
 requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
 requires 'MRO::Compat';
-requires 'MooseX::Getopt' => '0.25';
+requires 'MooseX::Getopt' => '0.30';
 requires 'MooseX::Types';
 requires 'MooseX::Types::Common::Numeric';
 requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
@@ -66,7 +66,7 @@
         grep { $_ ne 't/aggregate.t' }
         map  { glob } qw[t/*.t t/aggregate/*.t];
 }
-author_requires 'CatalystX::LeakChecker', '0.05'; # Skipped if this isn't installed
+author_requires 'CatalystX::LeakChecker', '0.05';
 author_requires 'File::Copy::Recursive'; # For http server test
 
 author_tests 't/author';

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Script/CGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Script/CGI.pm	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Script/CGI.pm	2010-08-26 00:18:07 UTC (rev 13543)
@@ -16,7 +16,7 @@
   myapp_cgi.pl [options]
 
   Options:
-  -h     --help           display this help and exits
+  -?     --help           display this help and exits
 
 =head1 DESCRIPTION
 

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Script/Server.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Script/Server.pm	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Script/Server.pm	2010-08-26 00:18:07 UTC (rev 13543)
@@ -13,8 +13,6 @@
 
 with 'Catalyst::ScriptRole';
 
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('?');
-
 has debug => (
     traits        => [qw(Getopt)],
     cmd_aliases   => 'd',

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/ScriptRole.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/ScriptRole.pm	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/ScriptRole.pm	2010-08-26 00:18:07 UTC (rev 13543)
@@ -6,7 +6,7 @@
 use namespace::autoclean;
 
 with 'MooseX::Getopt' => {
-    excludes => [qw/
+    -excludes => [qw/
         _getopt_spec_warnings
         _getopt_spec_exception
         _getopt_full_usage
@@ -20,14 +20,6 @@
     required => 1,
 );
 
-has help => (
-    traits        => ['Getopt'],
-    isa           => Bool,
-    is            => 'ro',
-    documentation => 'Display this help and exit',
-    cmd_aliases   => ['?', 'h'],
-);
-
 sub _getopt_spec_exception {}
 
 sub _getopt_spec_warnings {
@@ -41,11 +33,6 @@
     exit 0;
 }
 
-before run => sub {
-    my $self = shift;
-    $self->_getopt_full_usage if $self->help;
-};
-
 sub run {
     my $self = shift;
     $self->_run_application;

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Utils.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Utils.pm	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst/Utils.pm	2010-08-26 00:18:07 UTC (rev 13543)
@@ -1,7 +1,6 @@
 package Catalyst::Utils;
 
 use strict;
-use Catalyst::Exception;
 use File::Spec;
 use HTTP::Request;
 use Path::Class;
@@ -140,6 +139,13 @@
         eval { $tmpdir->mkpath };
 
         if ($@) {
+            # don't load Catalyst::Exception as a BEGIN in Utils,
+            # because Utils often gets loaded before MyApp.pm, and if
+            # Catalyst::Exception is loaded before MyApp.pm, it does
+            # not honor setting
+            # $Catalyst::Exception::CATALYST_EXCEPTION_CLASS in
+            # MyApp.pm
+            require Catalyst::Exception;
             Catalyst::Exception->throw(
                 message => qq/Couldn't create tmpdir '$tmpdir', "$@"/ );
         }

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst.pm	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/lib/Catalyst.pm	2010-08-26 00:18:07 UTC (rev 13543)
@@ -1701,7 +1701,7 @@
         my $parent = $c->stack->[-1];
 
         # forward, locate the caller
-        if ( exists $c->counter->{"$parent"} ) {
+        if ( defined $parent && exists $c->counter->{"$parent"} ) {
             $c->stats->profile(
                 begin  => $action,
                 parent => "$parent" . $c->counter->{"$parent"},
@@ -2150,7 +2150,7 @@
         $c->log->debug("Query keywords are: $keywords");
     }
 
-    $c->log_request_parameters( query => $request->query_parameters, body => $request->body_parameters );
+    $c->log_request_parameters( query => $request->query_parameters, $request->_has_body ? (body => $request->body_parameters) : () );
 
     $c->log_request_uploads($request);
 }
@@ -2407,8 +2407,7 @@
 
     my $config  = $class->config->{ setup_components };
 
-    my @comps = sort { length $a <=> length $b }
-                $class->locate_components($config);
+    my @comps = $class->locate_components($config);
     my %comps = map { $_ => 1 } @comps;
 
     my $deprecatedcatalyst_component_names = grep { /::[CMV]::/ } @comps;
@@ -2463,7 +2462,8 @@
         %$config
     );
 
-    my @comps = $locator->plugins;
+    # XXX think about ditching this sort entirely
+    my @comps = sort { length $a <=> length $b } $locator->plugins;
 
     return @comps;
 }

Added: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/live__component_controller_action_chained2.t
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/live__component_controller_action_chained2.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/live__component_controller_action_chained2.t	2010-08-26 00:18:07 UTC (rev 13543)
@@ -0,0 +1,17 @@
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+use Catalyst::Test 'ChainedActionsApp';
+use Test::More;
+
+content_like('/', qr/Application Home Page/, 'Application home');
+content_like('/15/GoldFinger', qr/List project GoldFinger pages/, 'GoldFinger Project Index');
+content_like('/15/GoldFinger/4/007', qr/This is 007 page of GoldFinger project/, '007 page in GoldFinger Project');
+content_like('/account', qr/New account o login/, 'no account');
+content_like('/account/ferz', qr/This is account ferz/, 'account');
+content_like('/account/123', qr/This is account 123/, 'account');
+action_notfound('/c');
+
+done_testing;
+

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/unit_core_script_help.t
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/unit_core_script_help.t	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/unit_core_script_help.t	2010-08-26 00:18:07 UTC (rev 13543)
@@ -15,7 +15,6 @@
     sub _getopt_full_usage { $help++ }
 }
 
-test('-h');
 test('--help');
 test('-?');
 

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/unit_core_script_test.t
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/unit_core_script_test.t	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/aggregate/unit_core_script_test.t	2010-08-26 00:18:07 UTC (rev 13543)
@@ -33,8 +33,8 @@
         } "new_with_options";
         ok $i;
         my $saved;
-        open( $saved, '<&'. STDIN->fileno )
-              or croak("Can't dup stdin: $!");
+        open( $saved, '>&'. STDOUT->fileno )
+            or croak("Can't dup stdout: $!");
         open( STDOUT, '>&='. $fh->fileno )
             or croak("Can't open stdout: $!");
         eval { $i->run };

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/author/podcoverage.t
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/author/podcoverage.t	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/author/podcoverage.t	2010-08-26 00:18:07 UTC (rev 13543)
@@ -5,9 +5,12 @@
 use Pod::Coverage 0.19;
 use Test::Pod::Coverage 1.04;
 
-all_pod_coverage_ok(
-  {
-    also_private => ['BUILD']
-  }
-);
+my @modules = all_modules;
+our @private = ( 'BUILD' );
+foreach my $module (@modules) {
+    local @private = (@private, 'run') if $module =~ /^Catalyst::Script::/;
+    pod_coverage_ok($module, { also_private => \@private });
+}
 
+done_testing;
+

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/custom_exception_class_simple.t
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/custom_exception_class_simple.t	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/custom_exception_class_simple.t	2010-08-26 00:18:07 UTC (rev 13543)
@@ -4,9 +4,17 @@
 use warnings;
 use FindBin qw/$Bin/;
 use lib "$Bin/lib";
-use Test::More tests => 1;
+use Test::More tests => 2;
 use Test::Exception;
 
 lives_ok {
     require TestAppClassExceptionSimpleTest;
 } 'Can load application';
+
+
+lives_ok {
+    Catalyst::Exception->throw
+} 'throw is properly stubbed out';
+
+
+

Added: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/ChainedActionsApp/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/ChainedActionsApp/Controller/Root.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/ChainedActionsApp/Controller/Root.pm	2010-08-26 00:18:07 UTC (rev 13543)
@@ -0,0 +1,112 @@
+package ChainedActionsApp::Controller::Root;
+use Moose;
+use namespace::autoclean;
+
+BEGIN { extends 'Catalyst::Controller' }
+
+#
+# Sets the actions in this controller to be registered with no prefix
+# so they function identically to actions created in MyApp.pm
+#
+__PACKAGE__->config(namespace => '');
+
+=head1 NAME
+
+test_chained::Controller::Root - Root Controller for test_chained
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 METHODS
+
+=head2 setup
+
+This is the C<setup> method that initializes the request. Any matching action
+will go through this, so it is an application-wide automatically executed
+action. For more information, see L<Catalyst::DispatchType::Chained>
+
+=cut
+
+sub setup : Chained('/') PathPart('') CaptureArgs(0) {
+    my ( $self, $c ) = @_;
+    # Common things here are to check for ACL and setup global contexts
+}
+
+sub home : Chained('setup') PathPart('') Args(0) {
+    my($self,$c) = @_;
+    $c->response->body( "Application Home Page" );
+}
+
+=head2 home_base
+
+     Args:
+       project_id
+       project_title
+
+=cut
+
+sub home_base : Chained('setup') PathPart('') CaptureArgs(2) {
+    my($self,$c,$proj_id,$title) = @_;
+    $c->stash({project_id=>$proj_id, project_title=>$title});
+}
+
+sub hpages : Chained('home_base') PathPart('') Args(0) {
+    my($self,$c) = @_;
+    $c->response->body( "List project " . $c->stash->{project_title} . " pages");
+}
+
+sub hpage : Chained('home_base') PathPart('') Args(2) {
+    my($self,$c,$page_id, $pagetitle) = @_;
+    $c->response->body( "This is $pagetitle page of " . $c->stash->{project_title} . " project" );
+}
+
+sub no_account : Chained('setup') PathPart('account') Args(0) {
+    my($self,$c) = @_;
+    $c->response->body( "New account o login" );
+}
+
+sub account_base : Chained('setup') PathPart('account') CaptureArgs(1) {
+    my($self,$c,$acc_id) = @_;
+    $c->stash({account_id=>$acc_id});
+}
+
+sub account : Chained('account_base') PathPart('') Args(0) {
+    my($self,$c,$acc) = @_;
+    $c->response->body( "This is account " . $c->stash->{account_id} );
+}
+
+=head2 default
+
+Standard 404 error page
+
+=cut
+
+sub default : Chained('setup') PathPart('') Args() {
+    my ( $self, $c ) = @_;
+    $c->response->body( 'Page not found' );
+    $c->response->status(404);
+}
+
+=head2 end
+
+Attempt to render a view, if needed.
+
+=cut
+
+sub end : ActionClass('RenderView') {}
+
+=head1 AUTHOR
+
+Ferruccio Zamuner
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;
+
+1;

Added: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/ChainedActionsApp.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/ChainedActionsApp.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/ChainedActionsApp.pm	2010-08-26 00:18:07 UTC (rev 13543)
@@ -0,0 +1,21 @@
+package ChainedActionsApp;
+use Moose;
+use namespace::autoclean;
+
+use Catalyst::Runtime 5.80;
+
+use Catalyst qw//;
+
+extends 'Catalyst';
+
+our $VERSION = "0.01";
+$VERSION = eval $VERSION;
+
+__PACKAGE__->config(
+  name => 'ChainedActionsApp',
+  disable_component_regex_fallback => 1,
+);
+
+__PACKAGE__->setup;
+
+1;

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppClassExceptionSimpleTest.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppClassExceptionSimpleTest.pm	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppClassExceptionSimpleTest.pm	2010-08-26 00:18:07 UTC (rev 13543)
@@ -10,6 +10,8 @@
 use strict;
 use warnings;
 
+use Catalyst::Utils; #< some of the scripts use Catalyst::Utils before MyApp.pm
+
 BEGIN { $Catalyst::Exception::CATALYST_EXCEPTION_CLASS = 'TestAppClassExceptionSimpleTest::Exception'; }
 
 use Catalyst;

Added: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppShowInternalActions/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppShowInternalActions/Controller/Root.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppShowInternalActions/Controller/Root.pm	2010-08-26 00:18:07 UTC (rev 13543)
@@ -0,0 +1,19 @@
+package TestAppShowInternalActions::Controller::Root;
+use Moose;
+use namespace::autoclean;
+
+BEGIN { extends 'Catalyst::Controller' }
+
+__PACKAGE__->config(namespace => '');
+
+sub index :Path :Args(0) {
+    my ( $self, $c ) = @_;
+
+    $c->response->body( 'hello world' );
+}
+
+sub end : Action {}
+
+__PACKAGE__->meta->make_immutable;
+
+1;

Added: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppShowInternalActions.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppShowInternalActions.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/lib/TestAppShowInternalActions.pm	2010-08-26 00:18:07 UTC (rev 13543)
@@ -0,0 +1,20 @@
+package TestAppShowInternalActions;
+use Moose;
+use namespace::autoclean;
+
+use Catalyst::Runtime 5.80;
+
+use Catalyst qw/ -Debug /; # Debug must remain on for
+                           # t/live_show_internal_actions_warnings.t
+
+extends 'Catalyst';
+
+__PACKAGE__->config(
+    name => 'TestAppShowInternalActions',
+    disable_component_resolution_regex_fallback => 1,
+    show_internal_actions => 1,
+);
+
+__PACKAGE__->setup();
+
+1;

Added: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/live_show_internal_actions_warnings.t
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/live_show_internal_actions_warnings.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/live_show_internal_actions_warnings.t	2010-08-26 00:18:07 UTC (rev 13543)
@@ -0,0 +1,25 @@
+use strict;
+use warnings;
+use FindBin '$Bin';
+use lib "$Bin/lib";
+use Test::More;
+use File::Spec;
+BEGIN { # Shut up debug output, app needs debug on for the issue to
+        # appear, but we don't want the spraff to the screen
+
+    my $devnull = File::Spec->devnull;
+    open my $fh, '>', $devnull or die "Cannot write to $devnull: $!";
+
+    *STDERR = $fh;
+}
+
+use Catalyst::Test 'TestAppShowInternalActions';
+
+my $last_warning;
+{
+    local $SIG{__WARN__} = sub { $last_warning = shift };
+    my $res = get('/');
+}
+is( $last_warning, undef, 'there should be no warnings about uninitialized value' );
+
+done_testing;

Modified: Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/unit_core_methodattributes_method_metaclass_on_subclasses.t
===================================================================
--- Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/unit_core_methodattributes_method_metaclass_on_subclasses.t	2010-08-26 00:08:24 UTC (rev 13542)
+++ Catalyst-Runtime/5.80/branches/Catalyst-Test-base-href/t/unit_core_methodattributes_method_metaclass_on_subclasses.t	2010-08-26 00:18:07 UTC (rev 13543)
@@ -15,13 +15,13 @@
 
     sub test {}
 }
-
+my $c = 0;
 foreach my $class (qw/ CT RT /) {
     my $class_name = 'NoAttributes::' . $class;
     my $meta = $class_name->meta;
     my $meth = $meta->find_method_by_name('test');
     {
-        local $TODO = "Known MX::MethodAttributes issue";
+        local $TODO = "Known MX::MethodAttributes issue" if $c++;
         ok $meth->can('attributes'), 'method metaclass has ->attributes method for ' . $class;;
     }
 }




More information about the Catalyst-commits mailing list