[Catalyst-commits] r11364 - in Catalyst-Runtime/5.80/branches/exception_interface: . lib lib/Catalyst lib/Catalyst/DispatchType lib/Catalyst/Engine t t/aggregate t/author t/lib t/lib/ACLTestApp t/lib/ACLTestApp/Controller t/lib/Catalyst/Plugin/Test t/lib/PluginTestApp t/lib/PluginTestApp/Controller t/lib/TestApp/Action t/lib/TestApp/Controller t/lib/TestApp/Controller/Action t/lib/TestAppDoubleAutoBug t/lib/TestAppDoubleAutoBug/Controller t/lib/TestAppNonMooseController t/lib/TestAppNonMooseController/Controller t/lib/TestAppPluginWithConstructor t/lib/TestAppPluginWithConstructor/Controller t/lib/TestAppStats t/lib/TestAppStats/Controller

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Tue Sep 15 19:17:42 GMT 2009


Author: rafl
Date: 2009-09-15 19:17:41 +0000 (Tue, 15 Sep 2009)
New Revision: 11364

Added:
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_anon.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_attributes.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/author/
   Catalyst-Runtime/5.80/branches/exception_interface/t/author/optional_http-server.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/custom_exception_class_simple.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/deprecated_appclass_action_warnings.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/ACLTestApp.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/ACLTestApp/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/ACLTestApp/Controller/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/ACLTestApp/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/DeprecatedActionsInAppClassTestApp.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp/Controller/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Anon.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppClassExceptionSimpleTest.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppDoubleAutoBug/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppDoubleAutoBug/Controller/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppDoubleAutoBug/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController/Controller/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController/Controller/Foo.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController/ControllerBase.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPluginWithConstructor/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPluginWithConstructor/Controller/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPluginWithConstructor/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppStats/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppStats/Controller/
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppStats/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_controller_actions.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_action.t
Removed:
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/HTTP/
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_atttributes.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/cdi_backcompat_plugin_accessor_override.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/optional_http-server.t
Modified:
   Catalyst-Runtime/5.80/branches/exception_interface/Changes
   Catalyst-Runtime/5.80/branches/exception_interface/MANIFEST.SKIP
   Catalyst-Runtime/5.80/branches/exception_interface/Makefile.PL
   Catalyst-Runtime/5.80/branches/exception_interface/TODO
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Action.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/ClassData.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Component.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Controller.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Chained.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Path.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Regex.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Dispatcher.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/CGI.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/FastCGI.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/HTTP.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Request.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Response.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Runtime.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Stats.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Test.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_auto.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_begin.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_chained.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_default.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_detach.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_forward.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_go.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_index.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_index_or_default.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_path_matchsingle.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_regexp.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_streaming.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_visit.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_view_single.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_body.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_escaped_path.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_headers.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_remote_user.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/unit_core_action_for.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/unit_core_uri_for_action.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/caf_backcompat.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/custom_live_component_controller_action_auto_doublebug.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/deprecated.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/Catalyst/Plugin/Test/Plugin.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Action/TestMyAction.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Action/Streaming.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppDoubleAutoBug.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPathBug.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPluginWithConstructor.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppStats.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestPluginWithConstructor.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/optional_http-server-restart.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_classdata.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_component_loading.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_plugin.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup_log.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup_stats.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_dispatcher_requestargs_restore.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_metaclass_compat_non_moose_controller.t
   Catalyst-Runtime/5.80/branches/exception_interface/t/unit_stats.t
Log:
Merge branch 'master' into exception_interface

* master: (112 commits)
  The warning about a class having mutable ancestors has been removed (and was never in a non-dev Moose release)
  Work with old and new Moose
  Preserve immutable_options when temporarily making a class mutable
  Rework the C<< $c->go >> documentation a little, hopefully it's more clear.
  Blargh. Merge branch deprecate_appclass_actions manually, with svn merge http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.80/trunk http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.80/branches/deprecate_appclass_actions . after I forgot -l on svk push, but ctrl-C after the first rev meant svk had already committed a merge mark and re-merging did nothing, and removing it didn't do the right thing. Fail cake..
  Eat the merge mark, svk hates me.
  r11046 at t0mlaptop (orig r11045):  yousef | 2009-08-07 00:07:07 +0100
  Fix warnings in upcoming moose
  add myself to contributors
  Prepare for release
  un-TODO passing TODO tests
  Fix duplicate results from get_action_methods. Q. Why didn't I just do that first time round? A: Am idiot.
  AGH. Too tired to be doing this, fucked it up again
  I'm an idiot, that totally doesn't work. remove.
  Test for r11331 + fix to only report each action name once from get_action_methods
  Fix hash key name back to what it used to be for compat, keeping renamed accessor where it was. Tests for this breakage to follow
  Changelogging
  Changes tweaks
  Bump versions back to 5.8.4
  Changelog
  ...

Modified: Catalyst-Runtime/5.80/branches/exception_interface/Changes
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/Changes	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/Changes	2009-09-15 19:17:41 UTC (rev 11364)
@@ -1,9 +1,109 @@
 # This file documents the revision history for Perl extension Catalyst.
+#
 
+    - Add allow_mutable_ancestors option when force inlining a constructor onto
+      applications with plugins defining their own (usually Class::Accessor::Fast)
+      new methods, to avoid warnings generated by upcoming Moose releases
+      as we can make a class (MyApp) immutable when not all of it's superclasses
+      (e.g. plugins not fully Moose converted, but using
+       MooseX::Emulate::Class::Accessor::Fast) are not immutable.
+
+5.80012 2009-09-09 19:09:09
+
   Bug fixes:
+     - Fix t/optional_http-server.t test.
+     - Fix t/optional_http-server-restart.t test.
+     - Fix duplicate components being loaded at setup time, each component is
+       now loaded at most once + tests.
+     - Fix backward compatibility - hash key configured actions are stored in
+       is returned to 'actions'.
+     - Fix get_action_methods returning duplicate methods when a method is both
+       decorated with method attributes and set as an action in config.
+
+  Refactoring / cleanups:
+     - Reduce minimum supported perl version from 5.8.6 to 5.8.4 as there are
+       many people still running/testing this version with no known issues.
+
+  Tests:
+     - Make the optional_http_server.t test an author only test which must be
+       run by authors to stop it being broken again.
+     - Fix recursion warnings in the test suites.
+
+5.80011 2009-08-23 13:48:15
+
+  Bug fixes:
+      - Remove leftovers of the restarter engine. The removed code caused test
+        failures, which weren't apparent for anyone still having an old version
+        installed in @INC.
+
+5.80010 2009-08-21 23:32:15
+
+  Bug fixes:
+      - Fix and add tests for a regression introduced by 5.80008.
+        Catalyst::Engine is now able to send out data from filehandles larger
+        than the default chunksize of 64k again.
+
+5.80009 2009-08-21 22:21:08
+
+  Bug fixes:
+      - Fix and add tests for generating inner packages inside the COMPONENT
+        method, and those packages being correctly registered as components.
+        This fixes Catalyst::Model::DBIC among others.
+
+5.80008 2009-08-21 17:47:30
+
+  Bug fixes:
        - Fix replace_constructor warning to actually work if you make your
          application class immutable without that option.
+       - Depend on Module::Pluggable 3.9 to prevent a bug wherein components
+         in inner packages might not be registered. This especially affected
+         tests.
+       - Catalyst::Engine::FastCGI - relax the check for versions of Microsoft
+         IIS. Provides compatibility with Windows 2008 R2 as well as
+         (hopefully) future versions.
+       - In tests which depend on the values of environment variables,
+         localise the environment, then delete only relevant environment
+         variables (RT#48555)
+       - Fix issue with Engine::HTTP not sending headers properly in some cases
+         (RT#48623)
+       - Make Catalyst::Engine write at least once when finalizing the response
+         body from a filehandle, even if the write is empty. This avoids fail
+         when trying to send out an empty response body from a filehandle.
+       - Catalyst::Engine::HTTP - Accept a fully qualified absolute URI in the
+         Request-URI of the Request-Line
 
+  Refactoring / cleanups:
+       - Deleted the Restarter engine and its Watcher code. Use the
+         new Catalyst::Restarter in a recent Catalyst::Devel instead.
+       - New unit test for Catalyst::Action 'unit_core_action.t'
+       - Bump minimum supported perl version from 5.8.1 to 5.8.6 as there are
+         known issues with 5.8.3.
+       - Debug output uses dynamic column sizing to create more readable output
+         when using a larger $ENV{COLUMNS} setting. (groditi)
+
+  New features:
+       - Added private_path method for Catalyst::Action
+       - Allow uri_for($controller_instance) which will produce a URI
+         for the controller namespace
+       - Break setup_components into two more parts: locate_components and
+         expand_component_module (rjbs)
+       - Allow Components to return anon classed from their COMPONENT method
+         correctly, and have action registration work on Controllers returned
+         as such by adding a catalyst_component_name accessor for all components
+         which returns the component instance's name to be used when building
+         actions etc.
+       - Adding X-Forwarded-Port to allow the frontend proxy to dictate the
+         frontend port (jshirley)
+       - Added Catalyst::Stats->created accessor for the time at the start of
+         the request.
+
+  Documentation:
+       - Fix POD to refer to ->config(key => $val), rather than
+         ->config->{key} = $val, as the latter form is deprecated.
+       - Clearer docs for the 'uri_for' method.
+       - Fix POD refering to CGI::Cookie. We're using CGI::Simple::Cookie.
+         (Forrest Cahoon)
+
 5.80007 2009-06-30 23:54:34
 
   Bug fixes:
@@ -53,7 +153,7 @@
         - Add Catalyst::Component::ContextClosure as an easy way to create code
           references, that close over the context, without creating leaks.
 
-   Refactoring / cleanups:
+  Refactoring / cleanups:
         - Clean namespaces in Catalyst::Exception*.
         - Turn Catalyst::Exception into an actual class and make the throw
           method create instances of it. They can still be used as normal

Modified: Catalyst-Runtime/5.80/branches/exception_interface/MANIFEST.SKIP
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/MANIFEST.SKIP	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/MANIFEST.SKIP	2009-09-15 19:17:41 UTC (rev 11364)
@@ -1 +1 @@
-^(?!script/\w+\.pl$|TODO$|lib/.+(?<!ROADMAP)\.p(m|od)$|inc/|t/aggregate/.*\.t$|t/.*\.(gif|yml|pl|t)$|t/lib/.*\.pm$|t/something/(Makefile.PL|script/foo/bar/for_dist)$|t/conf/extra.conf.in$|Makefile.PL$|README$|MANIFEST$|Changes$|META.yml$)
+^(?!script/\w+\.pl$|TODO$|lib/.+(?<!ROADMAP)\.p(m|od)$|inc/|t/a(uthor|ggregate)/.*\.t$|t/.*\.(gif|yml|pl|t)$|t/lib/.*\.pm$|t/something/(Makefile.PL|script/foo/bar/for_dist)$|t/conf/extra.conf.in$|Makefile.PL$|README$|MANIFEST$|Changes$|META.yml$)

Modified: Catalyst-Runtime/5.80/branches/exception_interface/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/Makefile.PL	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/Makefile.PL	2009-09-15 19:17:41 UTC (rev 11364)
@@ -1,22 +1,30 @@
+use strict;
+use warnings;
 use inc::Module::Install 0.87;
+BEGIN { # Make it easy for newbies
+    if ($Module::Install::AUTHOR) {
+        require Module::Install::AuthorRequires;
+        require Module::Install::CheckConflicts;
+        require Module::Install::AuthorTests;
+    }
+}
+perl_version '5.008004';
 
-perl_version '5.008001';
-
 name 'Catalyst-Runtime';
 all_from 'lib/Catalyst/Runtime.pm';
 
+requires 'List::MoreUtils';
 requires 'namespace::autoclean';
 requires 'namespace::clean';
 requires 'B::Hooks::EndOfScope' => '0.08';
 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00801';
 requires 'Class::MOP' => '0.83';
 requires 'Moose' => '0.78';
-requires 'MooseX::MethodAttributes::Inheritable' => '0.12';
+requires 'MooseX::MethodAttributes::Inheritable' => '0.15';
 requires 'Carp';
 requires 'Class::C3::Adopt::NEXT' => '0.07';
 requires 'CGI::Simple::Cookie';
 requires 'Data::Dump';
-requires 'File::Modified';
 requires 'HTML::Entities';
 requires 'HTTP::Body'    => '1.04'; # makes uploadtmp work
 requires 'HTTP::Headers' => '1.64';
@@ -24,7 +32,7 @@
 requires 'HTTP::Response';
 requires 'HTTP::Request::AsCGI' => '0.8';
 requires 'LWP::UserAgent';
-requires 'Module::Pluggable' => '3.01';
+requires 'Module::Pluggable' => '3.9';
 requires 'Path::Class' => '0.09';
 requires 'Scalar::Util';
 requires 'Sub::Exporter';
@@ -54,6 +62,7 @@
         map  { glob } qw[t/*.t t/aggregate/*.t];
 }
 
+author_tests 't/author';
 author_requires(map {; $_ => 0 } qw(
   Test::NoTabs
   Test::Pod
@@ -112,7 +121,7 @@
     'Catalyst::Plugin::Upload::Image::Magick' => '0.03',
     'Catalyst::Plugin::ConfigLoader'   => '0.22', # Older versions work but
                                                   # throw Data::Visitor warns
-    'Catalyst::Devel'                  => '0.09',
+    'Catalyst::Devel'                  => '1.19',
     'Catalyst::Plugin::SmartURI'       => '0.032',
     'CatalystX::CRUD'                  => '0.37',
     'Catalyst::Action::RenderView'     => '0.07',
@@ -123,6 +132,7 @@
     'Catalyst::Action::REST'           => '0.67',
     'CatalystX::CRUD'                  => '0.42',
     'CatalystX::CRUD::Model::RDBO'     => '0.20',
+    'Catalyst::View::Mason'            => '0.17',
 );
 check_conflicts(%conflicts);
 
@@ -135,7 +145,8 @@
 
         # TAR on 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE
         # On 10.5 (Leopard) it wants COPYFILE_DISABLE
-        my $attr = $osx_ver eq '10.5' ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
+        die("Oh, you got Snow Lepoard, snazzy. Please read the man page for tar to find out if Apple renamed COPYFILE_DISABLE again and fix this Makefile.PL please?\n") if $osx_ver =~ /^10.6/;
+        my $attr = $osx_ver =~ /^10.5/ ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
 
         makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
                                           qq{ echo "You must set the ENV variable $attr to true,"; }.

Modified: Catalyst-Runtime/5.80/branches/exception_interface/TODO
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/TODO	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/TODO	2009-09-15 19:17:41 UTC (rev 11364)
@@ -1,36 +1,62 @@
-Known Bugs:
+# Known Bugs:
 
    - Bug ->go or ->visit causes actions which have Args or CaptureArgs called
      twice when called via ->go or ->visit.
 
      Test app: http://github.com/bobtfish/catalyst-app-bug-go_chain/tree/master
 
-Compatibility warnings to add:
+   - Bricas' Exception blog post
 
-   - $self->config should warn as config should only ever be called as a
-     class method.
+     http://bricas.vox.com/library/post/catalyst-exceptionclass.html
 
-Proposed functionality / feature additions:
+     Broken by recent exception refactoring
 
-    - Log setup needs to be less lame, so Catalyst::Plugin::Log::* can die
-      in a fire. Having $c->log_class would be a good start. kane volunteered
-      to do some of this.
+# Compatibility warnings to add:
 
-      Simple example: Catalyst::Plugin::Log::Colorful should just be a
-      subclass of Catalyst::Log, no ::Plugin:: needed.
+  - $self->config should warn as config should only ever be called as a
+    class method (TESTS).
 
-      See also: Catalyst::Plugin::Log::Dispatch and
-      http://github.com/willert/catalyst-plugin-log4perl-simple/tree
+# Proposed functionality / feature additions:
 
-TODO for brach namespace_handling_refactor:
+## Log setup needs to be less lame
 
-- refactor code in
-  * Catalyst::Dispatcher::get_containers           # No Idea
-  * Catalyst::Dispatcher::dispatch_type            # DONE
+So Catalyst::Plugin::Log::* can die
+in a fire. Having $c->log_class would be a good start. kane volunteered
+to do some of this.
 
-  * Catalyst::Controller::_parse_ActionClass_attr  # DONE
-  * Catalyst::Dispatcher::_load_dispatch_types     # DONE
-  * Catalyst::setup_plugins                        # DONE
-  to use the same namespacing method
+Simple example: Catalyst::Plugin::Log::Colorful should just be a
+subclass of Catalyst::Log, no ::Plugin:: needed.
 
-- Ok, so can you add tests for ->config(actions => { foo => { ActionClass => '+Bar' }});
+See also: Catalyst::Plugin::Log::Dispatch and
+http://github.com/willert/catalyst-plugin-log4perl-simple/tree
+
+# REFACTORING
+
+##  The horrible hack for plugin setup - replacing it:
+
+ * Have a look at the Devel::REPL BEFORE_PLUGIN stuff
+   I wonder if what we need is that combined with plugins-as-roles
+
+## App / ctx split:
+
+  NOTE - these are notes that t0m thought up after doing back compat for
+         catalyst_component_class, may be inaccurate, wrong or missing things
+         bug mst (at least) to correct before trying more than the first 2
+         steps. Please knock yourself out on the first two however :)
+
+  - Eliminate actions in MyApp from the main test suite
+  - Uncomment warning in C::C::register_action_methods, add tests it works
+    by mocking out the logging..
+  - Remove MyApp @ISA controller (ask metaclass if it has attributes, and if
+                                  so you need back compat :/)
+  - Make Catalyst::Context, move the per request stuff in there, handles from
+    main app class to delegate
+  - Make an instance of the app class which is a global variable
+  - Make new instance of the context class, not the app class per-request
+  - Remove the components as class data, move to instance data on the app
+    class (you probably have to do this for _all_ the class data, good luck!)
+  - Make it possible for users to spin up different instances of the app class
+    (with different config etc each)
+  - Profit! (Things like changing the complete app config per vhost, i.e.
+    writing a config loader / app class role which dispatches per vhost to
+    differently configured apps is piss easy)

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Action.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Action.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Action.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -8,6 +8,8 @@
 
     <form action="[%c.uri_for(c.action)%]">
 
+    $c->forward( $action->private_path );
+
 =head1 DESCRIPTION
 
 This class represents a Catalyst Action. You can access the object for the
@@ -28,6 +30,13 @@
 has attributes => (is => 'rw');
 has name => (is => 'rw');
 has code => (is => 'rw');
+has private_path => (
+  reader => 'private_path',
+  isa => 'Str',
+  lazy => 1,
+  required => 1,
+  default => sub { '/'.shift->reverse },
+);
 
 use overload (
 
@@ -46,8 +55,6 @@
 
 no warnings 'recursion';
 
-#__PACKAGE__->mk_accessors(qw/class namespace reverse attributes name code/);
-
 sub dispatch {    # Execute ourselves against a context
     my ( $self, $c ) = @_;
     return $c->execute( $self->class, $self );
@@ -75,7 +82,7 @@
     my ($a1_args) = @{ $a1->attributes->{Args} || [] };
     my ($a2_args) = @{ $a2->attributes->{Args} || [] };
 
-    $_ = looks_like_number($_) ? $_ : ~0 
+    $_ = looks_like_number($_) ? $_ : ~0
         for $a1_args, $a2_args;
 
     return $a1_args <=> $a2_args;
@@ -96,7 +103,9 @@
 
 =head2 class
 
-Returns the class name where this action is defined.
+Returns the name of the component where this action is defined.
+Derived by calling the L<Catalyst::Component/catalyst_component_name|catalyst_component_name>
+method on each component.
 
 =head2 code
 
@@ -104,7 +113,7 @@
 
 =head2 dispatch( $c )
 
-Dispatch this action against a context
+Dispatch this action against a context.
 
 =head2 execute( $controller, $c, @args )
 
@@ -129,13 +138,18 @@
 
 Returns the private path for this action.
 
+=head2 private_path
+
+Returns absolute private path for this action. Unlike C<reverse>, the
+C<private_path> of an action is always suitable for passing to C<forward>.
+
 =head2 name
 
-returns the sub name of this action.
+Returns the sub name of this action.
 
 =head2 meta
 
-Provided by Moose
+Provided by Moose.
 
 =head1 AUTHORS
 

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/ClassData.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/ClassData.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/ClassData.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -6,7 +6,7 @@
 use Moose::Util ();
 
 sub mk_classdata {
-  my ($class, $attribute) = @_;
+  my ($class, $attribute, $warn_on_instance) = @_;
   confess("mk_classdata() is a class method, not an object method")
     if blessed $class;
 
@@ -49,13 +49,16 @@
     unless $meta->isa('Class::MOP::Class');
 
   my $was_immutable = $meta->is_immutable;
+  # Need to save immutable_options if they're available from Moose 0.89_02
+  my %immutable_options = $meta->can('immutable_options') ? $meta->immutable_options : ();
+
   $meta->make_mutable if $was_immutable;
 
   my $alias = "_${attribute}_accessor";
   $meta->add_method($alias, $accessor);
   $meta->add_method($attribute, $accessor);
 
-  $meta->make_immutable if $was_immutable;
+  $meta->make_immutable(%immutable_options) if $was_immutable;
 
   $class->$attribute($_[2]) if(@_ > 2);
   return $accessor;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Component.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Component.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Component.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -60,6 +60,18 @@
 __PACKAGE__->mk_classdata('_plugins');
 __PACKAGE__->mk_classdata('_config');
 
+has catalyst_component_name => ( is => 'ro' ); # Cannot be required => 1 as context
+                                       # class @ISA component - HATE
+# Make accessor callable as a class method, as we need to call setup_actions
+# on the application class, which we don't have an instance of, ewwwww
+# Also, naughty modules like Catalyst::View::JSON try to write to _everything_,
+# so spit a warning, ignore that (and try to do the right thing anyway) here..
+around catalyst_component_name => sub {
+    my ($orig, $self) = (shift, shift);
+    Carp::cluck("Tried to write to the catalyst_component_name accessor - is your component broken or just mad? (Write ignored - using default value.)") if scalar @_;
+    blessed($self) ? $self->$orig() || blessed($self) : $self;
+};
+
 sub BUILDARGS {
     my $class = shift;
     my $args = {};
@@ -85,23 +97,24 @@
 }
 
 sub COMPONENT {
-    my ( $self, $c ) = @_;
+    my ( $class, $c ) = @_;
 
     # Temporary fix, some components does not pass context to constructor
     my $arguments = ( ref( $_[-1] ) eq 'HASH' ) ? $_[-1] : {};
-    if( my $next = $self->next::can ){
-      my $class = blessed $self || $self;
+    if ( my $next = $class->next::can ) {
       my ($next_package) = Class::MOP::get_code_info($next);
       warn "There is a COMPONENT method resolving after Catalyst::Component in ${next_package}.\n";
       warn "This behavior can no longer be supported, and so your application is probably broken.\n";
       warn "Your linearized isa hierarchy is: " . join(', ', @{ mro::get_linear_isa($class) }) . "\n";
       warn "Please see perldoc Catalyst::Upgrading for more information about this issue.\n";
     }
-    return $self->new($c, $arguments);
+    return $class->new($c, $arguments);
 }
 
 sub config {
     my $self = shift;
+    # Uncomment once sane to do so
+    #Carp::cluck("config method called on instance") if ref $self;
     my $config = $self->_config || {};
     if (@_) {
         my $newconfig = { %{@_ > 1 ? {@_} : $_[0]} };
@@ -157,9 +170,10 @@
 it is called by Catalyst during setup_components with the application class
 as $c and any config entry on the application for this component (for example,
 in the case of MyApp::Controller::Foo this would be
-MyApp->config->{'Controller::Foo'}). The arguments are expected to be a
-hashref and are merged with the __PACKAGE__->config hashref before calling
-->new to instantiate the component.
+C<< MyApp->config('Controller::Foo' => \%conf >>).
+The arguments are expected to be a hashref and are merged with the
+C<< __PACKAGE__->config >> hashref before calling C<< ->new >>
+to instantiate the component.
 
 You can override it in your components to do custom instantiation, using
 something like this:

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Controller.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Controller.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -2,7 +2,7 @@
 
 use Moose;
 use Moose::Util qw/find_meta/;
-
+use List::MoreUtils qw/uniq/;
 use namespace::clean -except => 'meta';
 
 BEGIN { extends qw/Catalyst::Component MooseX::MethodAttributes::Inheritable/; }
@@ -29,9 +29,9 @@
      predicate => 'has_action_namespace',
     );
 
-has _controller_actions =>
+has actions =>
     (
-     is => 'rw',
+     accessor => '_controller_actions',
      isa => 'HashRef',
      init_arg => undef,
     );
@@ -44,6 +44,8 @@
     $self->_controller_actions($attr_value);
 }
 
+
+
 =head1 NAME
 
 Catalyst::Controller - Catalyst Controller base class
@@ -135,28 +137,30 @@
     my $orig = shift;
     my ( $self, $c ) = @_;
 
+    my $class = ref($self) || $self;
+    my $appclass = ref($c) || $c;
     if( ref($self) ){
         return $self->$orig if $self->has_action_namespace;
     } else {
-        return $self->config->{namespace} if exists $self->config->{namespace};
+        return $class->config->{namespace} if exists $class->config->{namespace};
     }
 
     my $case_s;
     if( $c ){
-        $case_s = $c->config->{case_sensitive};
+        $case_s = $appclass->config->{case_sensitive};
     } else {
         if ($self->isa('Catalyst')) {
-            $case_s = $self->config->{case_sensitive};
+            $case_s = $class->config->{case_sensitive};
         } else {
             if (ref $self) {
-                $case_s = $self->_application->config->{case_sensitive};
+                $case_s = ref($self->_application)->config->{case_sensitive};
             } else {
                 confess("Can't figure out case_sensitive setting");
             }
         }
     }
 
-    my $namespace = Catalyst::Utils::class2prefix(ref($self) || $self, $case_s) || '';
+    my $namespace = Catalyst::Utils::class2prefix($self->catalyst_component_name, $case_s) || '';
     $self->$orig($namespace) if ref($self);
     return $namespace;
 };
@@ -177,8 +181,8 @@
 
 sub get_action_methods {
     my $self = shift;
-    my $meta = find_meta($self);
-    confess("Metaclass for "
+    my $meta = find_meta($self) || confess("No metaclass setup for $self");
+    confess("Metaclass "
           . ref($meta) . " for "
           . $meta->name
           . " cannot support register_actions." )
@@ -190,13 +194,13 @@
         @methods,
         map {
             $meta->find_method_by_name($_)
-              || confess( 'Action "' 
+              || confess( 'Action "'
                   . $_
                   . '" is not available from controller '
                   . ( ref $self ) )
           } keys %{ $self->_controller_actions }
     ) if ( ref $self );
-    return @methods;
+    return uniq @methods;
 }
 
 
@@ -207,10 +211,18 @@
 
 sub register_action_methods {
     my ( $self, $c, @methods ) = @_;
-    my $class = ref $self || $self;
+    my $class = $self->catalyst_component_name;
     #this is still not correct for some reason.
     my $namespace = $self->action_namespace($c);
 
+    # FIXME - fugly
+    if (!blessed($self) && $self eq $c && scalar(@methods)) {
+        my @really_bad_methods = grep { ! /^_(DISPATCH|BEGIN|AUTO|ACTION|END)$/ } map { $_->name } @methods;
+        if (scalar(@really_bad_methods)) {
+            $c->log->warn("Action methods (" . join(', ', @really_bad_methods) . ") found defined in your application class, $self. This is deprecated, please move them into a Root controller.");
+        }
+    }
+
     foreach my $method (@methods) {
         my $name = $method->name;
         my $attributes = $method->attributes;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Chained.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Chained.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Chained.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -80,14 +80,16 @@
 
     return unless $self->_endpoints;
 
-    my $column_width = Catalyst::Utils::term_width() - 35 - 9;
+    my $avail_width = Catalyst::Utils::term_width() - 9;
+    my $col1_width = ($avail_width * .50) < 35 ? 35 : int($avail_width * .50);
+    my $col2_width = $avail_width - $col1_width;
     my $paths = Text::SimpleTable->new(
-       [ 35, 'Path Spec' ], [ $column_width, 'Private' ],
+        [ $col1_width, 'Path Spec' ], [ $col2_width, 'Private' ],
     );
 
     my $has_unattached_actions;
     my $unattached_actions = Text::SimpleTable->new(
-        [ 35, 'Private' ], [ $column_width, 'Missing parent' ],
+        [ $col1_width, 'Private' ], [ $col2_width, 'Missing parent' ],
     );
 
     ENDPOINT: foreach my $endpoint (

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Path.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Path.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Path.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -47,9 +47,11 @@
 
 sub list {
     my ( $self, $c ) = @_;
-    my $column_width = Catalyst::Utils::term_width() - 35 - 9;
+    my $avail_width = Catalyst::Utils::term_width() - 9;
+    my $col1_width = ($avail_width * .50) < 35 ? 35 : int($avail_width * .50);
+    my $col2_width = $avail_width - $col1_width;
     my $paths = Text::SimpleTable->new(
-       [ 35, 'Path' ], [ $column_width, 'Private' ]
+       [ $col1_width, 'Path' ], [ $col2_width, 'Private' ]
     );
     foreach my $path ( sort keys %{ $self->_paths } ) {
         my $display_path = $path eq '/' ? $path : "/$path";

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Regex.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Regex.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/DispatchType/Regex.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -47,8 +47,12 @@
 
 sub list {
     my ( $self, $c ) = @_;
-    my $column_width = Catalyst::Utils::term_width() - 35 - 9;
-    my $re = Text::SimpleTable->new( [ 35, 'Regex' ], [ $column_width, 'Private' ] );
+    my $avail_width = Catalyst::Utils::term_width() - 9;
+    my $col1_width = ($avail_width * .50) < 35 ? 35 : int($avail_width * .50);
+    my $col2_width = $avail_width - $col1_width;
+    my $re = Text::SimpleTable->new(
+        [ $col1_width, 'Regex' ], [ $col2_width, 'Private' ]
+    );
     for my $regex ( @{ $self->_compiled } ) {
         my $action = $regex->{action};
         $re->row( $regex->{path}, "/$action" );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Dispatcher.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Dispatcher.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -335,7 +335,7 @@
                 reverse   => "$component_class->$method",
                 class     => $component_class,
                 namespace => Catalyst::Utils::class2prefix(
-                    $component_class, $c->config->{case_sensitive}
+                    $component_class, ref($c)->config->{case_sensitive}
                 ),
             }
         );
@@ -615,9 +615,12 @@
 sub _display_action_tables {
     my ($self, $c) = @_;
 
-    my $column_width = Catalyst::Utils::term_width() - 20 - 36 - 12;
+    my $avail_width = Catalyst::Utils::term_width() - 12;
+    my $col1_width = ($avail_width * .25) < 20 ? 20 : int($avail_width * .25);
+    my $col2_width = ($avail_width * .50) < 36 ? 36 : int($avail_width * .50);
+    my $col3_width =  $avail_width - $col1_width - $col2_width;
     my $privates = Text::SimpleTable->new(
-        [ 20, 'Private' ], [ 36, 'Class' ], [ $column_width, 'Method' ]
+        [ $col1_width, 'Private' ], [ $col2_width, 'Class' ], [ $col3_width, 'Method' ]
     );
 
     my $has_private = 0;
@@ -655,7 +658,7 @@
     for my $type (@types) {
         # first param is undef because we cannot get the appclass
         my $class = Catalyst::Utils::resolve_namespace(undef, 'Catalyst::DispatchType', $type);
-        
+
         eval { Class::MOP::load_class($class) };
         Catalyst::Exception->throw( message => qq/Couldn't load "$class"/ )
           if $@;
@@ -694,10 +697,26 @@
 # Various plugins (e.g. Plugin::Server and Plugin::Authorization::ACL)
 # need the methods here which *should* be private..
 
-# However we can't really take them away until there is a sane API for
-# building actions and configuring / introspecting the dispatcher.
-# In 5.90, we should build that infrastructure, port the plugins which
-# use it, and then take the crap below away.
+# You should be able to use get_actions or get_containers appropriately
+# instead of relying on these methods which expose implementation details
+# of the dispatcher..
+#
+# IRC backlog included below, please come ask if this doesn't work for you.
+#
+# <@t0m> 5.80, the state of. There are things in the dispatcher which have
+#        been deprecated, that we yell at anyone for using, which there isn't
+#        a good alternative for yet..
+# <@mst> er, get_actions/get_containers provides that doesn't it?
+# <@mst> DispatchTypes are loaded on demand anyway
+# <@t0m> I'm thinking of things like _tree which is aliased to 'tree' with
+#        warnings otherwise shit breaks.. We're issuing warnings about the
+#        correct set of things which you shouldn't be calling..
+# <@mst> right
+# <@mst> basically, I don't see there's a need for a replacement for anything
+# <@mst> it was never a good idea to call ->tree
+# <@mst> nothingmuch was the only one who did AFAIK
+# <@mst> and he admitted it was a hack ;)
+
 # See also t/lib/TestApp/Plugin/AddDispatchTypes.pm
 
 # Alias _method_name to method_name, add a before modifier to warn..

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/CGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/CGI.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/CGI.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -57,9 +57,9 @@
 
   PROXY_CHECK:
     {
-        unless ( $c->config->{using_frontend_proxy} ) {
+        unless ( ref($c)->config->{using_frontend_proxy} ) {
             last PROXY_CHECK if $ENV{REMOTE_ADDR} ne '127.0.0.1';
-            last PROXY_CHECK if $c->config->{ignore_frontend_proxy};
+            last PROXY_CHECK if ref($c)->config->{ignore_frontend_proxy};
         }
         last PROXY_CHECK unless $ENV{HTTP_X_FORWARDED_FOR};
 
@@ -67,6 +67,9 @@
         # as 127.0.0.1. Select the most recent upstream IP (last in the list)
         my ($ip) = $ENV{HTTP_X_FORWARDED_FOR} =~ /([^,\s]+)$/;
         $request->address($ip);
+        if ( defined $ENV{HTTP_X_FORWARDED_PORT} ) {
+            $ENV{SERVER_PORT} = $ENV{HTTP_X_FORWARDED_PORT};
+        }
     }
 
     $request->hostname( $ENV{REMOTE_HOST} ) if exists $ENV{REMOTE_HOST};
@@ -123,9 +126,9 @@
     # If we are running as a backend proxy, get the true hostname
   PROXY_CHECK:
     {
-        unless ( $c->config->{using_frontend_proxy} ) {
+        unless ( ref($c)->config->{using_frontend_proxy} ) {
             last PROXY_CHECK if $host !~ /localhost|127.0.0.1/;
-            last PROXY_CHECK if $c->config->{ignore_frontend_proxy};
+            last PROXY_CHECK if ref($c)->config->{ignore_frontend_proxy};
         }
         last PROXY_CHECK unless $ENV{HTTP_X_FORWARDED_HOST};
 
@@ -134,6 +137,9 @@
         # backend could be on any port, so
         # assume frontend is on the default port
         $port = $c->request->secure ? 443 : 80;
+        if ( $ENV{HTTP_X_FORWARDED_PORT} ) {
+            $port = $ENV{HTTP_X_FORWARDED_PORT};
+        }
     }
 
     # set the request URI

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/FastCGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/FastCGI.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/FastCGI.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -235,7 +235,7 @@
         $env->{PATH_INFO} ||= delete $env->{SCRIPT_NAME};
     }
     # Fix the environment variables PATH_INFO and SCRIPT_NAME when running under IIS
-    elsif ( $env->{SERVER_SOFTWARE} =~ /IIS\/[67].0/ ) {
+    elsif ( $env->{SERVER_SOFTWARE} =~ /IIS\/[6-9]\.[0-9]/ ) {
         my @script_name = split(m!/!, $env->{PATH_INFO});
         my @path_translated = split(m!/|\\\\?!, $env->{PATH_TRANSLATED});
         my @path_info;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/HTTP.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/HTTP.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine/HTTP.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -12,10 +12,6 @@
 use IO::Socket::INET ();
 use IO::Select       ();
 
-# For PAR
-require Catalyst::Engine::HTTP::Restarter;
-require Catalyst::Engine::HTTP::Restarter::Watcher;
-
 use constant CHUNKSIZE => 64 * 1024;
 use constant DEBUG     => $ENV{CATALYST_HTTP_DEBUG} || 0;
 
@@ -158,11 +154,16 @@
 
     # Prepend the headers if they have not yet been sent
     if ( $self->_has_header_buf ) {
-        $buffer = $self->_clear_header_buf . $buffer;
+        $self->_warn_on_write_error(
+            $self->$orig($c, $self->_clear_header_buf)
+        );
     }
 
-    my $ret = $self->$orig($c, $buffer);
+    $self->_warn_on_write_error($self->$orig($c, $buffer));
+};
 
+sub _warn_on_write_error {
+    my ($self, $ret) = @_;
     if ( !defined $ret ) {
         $self->_write_error($!);
         DEBUG && warn "write: Failed to write response ($!)\n";
@@ -170,9 +171,8 @@
     else {
         DEBUG && warn "write: Wrote response ($ret bytes)\n";
     }
-
     return $ret;
-};
+}
 
 =head2 run
 
@@ -364,6 +364,9 @@
     while (1) {
         my ( $path, $query_string ) = split /\?/, $uri, 2;
 
+        # URI is not the same as path. Remove scheme, domain name and port from it
+        $path =~ s{^https?://[^/?#]+}{};
+
         # Initialize CGI environment
         local %ENV = (
             PATH_INFO       => $path         || '',

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Engine.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -48,10 +48,12 @@
     my $body = $c->response->body;
     no warnings 'uninitialized';
     if ( blessed($body) && $body->can('read') or ref($body) eq 'GLOB' ) {
-        while ( !eof $body ) {
-            read $body, my ($buffer), $CHUNKSIZE;
-            last unless $self->write( $c, $buffer );
-        }
+        my $got;
+        do {
+            $got = read $body, my ($buffer), $CHUNKSIZE;
+            $got = 0 unless $self->write( $c, $buffer );
+        } while $got > 0;
+
         close $body;
     }
     else {
@@ -110,7 +112,7 @@
     my ( $self, $c ) = @_;
 
     $c->res->content_type('text/html; charset=utf-8');
-    my $name = $c->config->{name} || join(' ', split('::', ref $c));
+    my $name = ref($c)->config->{name} || join(' ', split('::', ref $c));
 
     my ( $title, $error, $infos );
     if ( $c->debug ) {
@@ -315,13 +317,14 @@
 sub prepare_body {
     my ( $self, $c ) = @_;
 
+    my $appclass = ref($c) || $c;
     if ( my $length = $self->read_length ) {
         my $request = $c->request;
         unless ( $request->_body ) {
             my $type = $request->header('Content-Type');
             $request->_body(HTTP::Body->new( $type, $length ));
-            $request->_body->tmpdir( $c->config->{uploadtmp} )
-              if exists $c->config->{uploadtmp};
+            $request->_body->tmpdir( $appclass->config->{uploadtmp} )
+              if exists $appclass->config->{uploadtmp};
         }
 
         while ( my $buffer = $self->read($c) ) {

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Request.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Request.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Request.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -223,7 +223,7 @@
 
 =head2 $req->args
 
-Shortcut for arguments.
+Shortcut for L</arguments>.
 
 =head2 $req->base
 
@@ -237,8 +237,9 @@
 
 =head2 $req->body
 
-Returns the message body of the request, unless Content-Type is
-C<application/x-www-form-urlencoded> or C<multipart/form-data>.
+Returns the message body of the request, as returned by L<HTTP::Body>: a string,
+unless Content-Type is C<application/x-www-form-urlencoded>, C<text/xml>, or
+C<multipart/form-data>, in which case a L<File::Temp> object is returned.
 
 =head2 $req->body_parameters
 
@@ -300,7 +301,7 @@
 
     print $c->request->cookies->{mycookie}->value;
 
-The cookies in the hash are indexed by name, and the values are L<CGI::Cookie>
+The cookies in the hash are indexed by name, and the values are L<CGI::Simple::Cookie>
 objects.
 
 =head2 $req->header
@@ -473,7 +474,7 @@
 used in a while loop, reading $maxlength bytes on every call. $maxlength
 defaults to the size of the request if not specified.
 
-You have to set MyApp->config->{parse_on_demand} to use this directly.
+You have to set MyApp->config(parse_on_demand => 1) to use this directly.
 
 =head2 $req->referer
 
@@ -649,7 +650,7 @@
 append mode:
 
   $req->uri_with( { key => 'value' }, { mode => 'append' } );
-  
+
 See C<mangle_params> for an explanation of this behavior.
 
 =cut

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Response.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Response.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Response.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -102,11 +102,11 @@
 
 Returns a reference to a hash containing cookies to be set. The keys of the
 hash are the cookies' names, and their corresponding values are hash
-references used to construct a L<CGI::Cookie> object.
+references used to construct a L<CGI::Simple::Cookie> object.
 
     $c->response->cookies->{foo} = { value => '123' };
 
-The keys of the hash reference on the right correspond to the L<CGI::Cookie>
+The keys of the hash reference on the right correspond to the L<CGI::Simple::Cookie>
 parameters of the same name, except they are used without a leading dash.
 Possible parameters are:
 

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Runtime.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Runtime.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Runtime.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -3,11 +3,11 @@
 use strict;
 use warnings;
 
-BEGIN { require 5.008001; }
+BEGIN { require 5.008004; }
 
 # Remember to update this in Catalyst as well!
 
-our $VERSION='5.80007';
+our $VERSION='5.80012';
 
 $VERSION = eval $VERSION;
 

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Stats.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Stats.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Stats.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -84,6 +84,10 @@
     return $node->getUID;
 }
 
+sub created {
+    return @{ shift->{tree}->getNodeValue->{t} };
+}
+
 sub elapsed {
     return tv_interval(shift->{tree}->getNodeValue->{t});
 }
@@ -297,6 +301,13 @@
 Returns the UID of the current point in the profile tree.  The UID is
 automatically assigned if not explicitly given.
 
+=head2 created
+
+    ($seconds, $microseconds) = $stats->created;
+
+Returns the time the object was created, in C<gettimeofday> format, with
+Unix epoch seconds followed by microseconds.
+
 =head2 elapsed
 
     $elapsed = $stats->elapsed

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Test.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Test.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Test.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -156,8 +156,8 @@
 environment variable. This module also adds a few Catalyst-specific
 testing methods as displayed in the method section.
 
-The L<get> and L<request> functions take either a URI or an L<HTTP::Request>
-object.
+The L<get|/"$content = get( ... )"> and L<request|/"$res = request( ... );">
+functions take either a URI or an L<HTTP::Request> object.
 
 =head1 INLINE TESTS WILL NO LONGER WORK
 
@@ -187,7 +187,7 @@
 
 Note that this method doesn't follow redirects, so to test for a
 correctly redirecting page you'll need to use a combination of this
-method and the L<request> method below:
+method and the L<request|/"$res = request( ... );"> method below:
 
     my $res = request('/'); # redirects to /y
     warn $res->header('location');
@@ -208,7 +208,7 @@
 
 =head2 ($res, $c) = ctx_request( ... );
 
-Works exactly like L<request>, except it also returns the Catalyst context object,
+Works exactly like L<request|/"$res = request( ... );">, except it also returns the Catalyst context object,
 C<$c>. Note that this only works for local requests.
 
 =head2 $res = Catalyst::Test::local_request( $AppClass, $url );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -27,11 +27,12 @@
 use Tree::Simple qw/use_weak_refs/;
 use Tree::Simple::Visitor::FindByUID;
 use Class::C3::Adopt::NEXT;
+use List::MoreUtils qw/uniq/;
 use attributes;
 use utf8;
 use Carp qw/croak carp shortmess/;
 
-BEGIN { require 5.008001; }
+BEGIN { require 5.008004; }
 
 has stack => (is => 'ro', default => sub { [] });
 has stash => (is => 'rw', default => sub { {} });
@@ -78,7 +79,7 @@
 
 # Remember to update this in Catalyst::Runtime as well!
 
-our $VERSION = '5.80007';
+our $VERSION = '5.80012';
 
 {
     my $dev_version = $VERSION =~ /_\d{2}$/;
@@ -335,9 +336,11 @@
     $c->forward(qw/MyApp::Model::DBIC::Foo do_stuff/);
     $c->forward('MyApp::View::TT');
 
-Note that forward implies an C<<eval { }>> around the call (actually
-C<execute> does), thus de-fatalizing all 'dies' within the called
-action. If you want C<die> to propagate you need to do something like:
+Note that L<< forward|/"$c->forward( $action [, \@arguments ] )" >> implies
+an C<< eval { } >> around the call (actually
+L<< execute|/"$c->execute( $class, $coderef )" >> does), thus de-fatalizing
+all 'dies' within the called action. If you want C<die> to propagate you
+need to do something like:
 
     $c->forward('foo');
     die $c->error if $c->error;
@@ -357,8 +360,8 @@
 
 =head2 $c->detach()
 
-The same as C<forward>, but doesn't return to the previous action when
-processing is finished.
+The same as L<< forward|/"$c->forward( $action [, \@arguments ] )" >>, but
+doesn't return to the previous action when processing is finished.
 
 When called with no arguments it escapes the processing chain entirely.
 
@@ -370,23 +373,27 @@
 
 =head2 $c->visit( $class, $method, [, \@captures, \@arguments ] )
 
-Almost the same as C<forward>, but does a full dispatch, instead of just
-calling the new C<$action> / C<$class-E<gt>$method>. This means that C<begin>,
-C<auto> and the method you go to are called, just like a new request.
+Almost the same as L<< forward|/"$c->forward( $action [, \@arguments ] )" >>,
+but does a full dispatch, instead of just calling the new C<$action> /
+C<< $class->$method >>. This means that C<begin>, C<auto> and the method
+you go to are called, just like a new request.
 
 In addition both C<< $c->action >> and C<< $c->namespace >> are localized.
-This means, for example, that $c->action methods such as C<name>, C<class> and
-C<reverse> return information for the visited action when they are invoked
-within the visited action.  This is different from the behavior of C<forward>
-which continues to use the $c->action object from the caller action even when
+This means, for example, that C<< $c->action >> methods such as
+L<name|Catalyst::Action/name>, L<class|Catalyst::Action/class> and
+L<reverse|Catalyst::Action/reverse> return information for the visited action
+when they are invoked within the visited action.  This is different from the
+behavior of L<< forward|/"$c->forward( $action [, \@arguments ] )" >>, which
+continues to use the $c->action object from the caller action even when
 invoked from the callee.
 
-C<$c-E<gt>stash> is kept unchanged.
+C<< $c->stash >> is kept unchanged.
 
-In effect, C<visit> allows you to "wrap" another action, just as it
-would have been called by dispatching from a URL, while the analogous
-C<go> allows you to transfer control to another action as if it had
-been reached directly from a URL.
+In effect, L<< visit|/"$c->visit( $action [, \@captures, \@arguments ] )" >>
+allows you to "wrap" another action, just as it would have been called by
+dispatching from a URL, while the analogous
+L<< go|/"$c->go( $action [, \@captures, \@arguments ] )" >> allows you to
+transfer control to another action as if it had been reached directly from a URL.
 
 =cut
 
@@ -396,13 +403,16 @@
 
 =head2 $c->go( $class, $method, [, \@captures, \@arguments ] )
 
-Almost the same as C<detach>, but does a full dispatch like C<visit>,
-instead of just calling the new C<$action> /
-C<$class-E<gt>$method>. This means that C<begin>, C<auto> and the
-method you visit are called, just like a new request.
+The relationship between C<go> and 
+L<< visit|/"$c->visit( $action [, \@captures, \@arguments ] )" >> is the same as
+the relationship between 
+L<< forward|/"$c->forward( $class, $method, [, \@arguments ] )" >> and
+L<< detach|/"$c->detach( $action [, \@arguments ] )" >>. Like C<< $c->visit >>,
+C<< $c->go >> will perform a full dispatch on the specified action or method,
+with localized C<< $c->action >> and C<< $c->namespace >>. Like C<detach>,
+C<go> escapes the processing of the current request chain on completion, and
+does not return to its caller.
 
-C<$c-E<gt>stash> is kept unchanged.
-
 =cut
 
 sub go { my $c = shift; $c->dispatcher->go( $c, @_ ) }
@@ -639,7 +649,7 @@
 
 sub model {
     my ( $c, $name, @args ) = @_;
-
+    my $appclass = ref($c) || $c;
     if( $name ) {
         my @result = $c->_comp_search_prefixes( $name, qw/Model M/ );
         return map { $c->_filter_component( $_, @args ) } @result if ref $name;
@@ -652,14 +662,14 @@
         return $c->model( $c->stash->{current_model} )
           if $c->stash->{current_model};
     }
-    return $c->model( $c->config->{default_model} )
-      if $c->config->{default_model};
+    return $c->model( $appclass->config->{default_model} )
+      if $appclass->config->{default_model};
 
     my( $comp, $rest ) = $c->_comp_search_prefixes( undef, qw/Model M/);
 
     if( $rest ) {
         $c->log->warn( Carp::shortmess('Calling $c->model() will return a random model unless you specify one of:') );
-        $c->log->warn( '* $c->config->{default_model} # the name of the default model to use' );
+        $c->log->warn( '* $c->config(default_model => "the name of the default model to use")' );
         $c->log->warn( '* $c->stash->{current_model} # the name of the model to use for this request' );
         $c->log->warn( '* $c->stash->{current_model_instance} # the instance of the model to use for this request' );
         $c->log->warn( 'NB: in version 5.81, the "random" behavior will not work at all.' );
@@ -693,6 +703,7 @@
 sub view {
     my ( $c, $name, @args ) = @_;
 
+    my $appclass = ref($c) || $c;
     if( $name ) {
         my @result = $c->_comp_search_prefixes( $name, qw/View V/ );
         return map { $c->_filter_component( $_, @args ) } @result if ref $name;
@@ -705,14 +716,14 @@
         return $c->view( $c->stash->{current_view} )
           if $c->stash->{current_view};
     }
-    return $c->view( $c->config->{default_view} )
-      if $c->config->{default_view};
+    return $c->view( $appclass->config->{default_view} )
+      if $appclass->config->{default_view};
 
     my( $comp, $rest ) = $c->_comp_search_prefixes( undef, qw/View V/);
 
     if( $rest ) {
         $c->log->warn( 'Calling $c->view() will return a random view unless you specify one of:' );
-        $c->log->warn( '* $c->config->{default_view} # the name of the default view to use' );
+        $c->log->warn( '* $c->config(default_view => "the name of the default view to use")' );
         $c->log->warn( '* $c->stash->{current_view} # the name of the view to use for this request' );
         $c->log->warn( '* $c->stash->{current_view_instance} # the instance of the view to use for this request' );
         $c->log->warn( 'NB: in version 5.81, the "random" behavior will not work at all.' );
@@ -818,11 +829,11 @@
 
     __PACKAGE__->config( { db => 'dsn:SQLite:foo.db' } );
 
-You can also use a C<YAML>, C<XML> or C<Config::General> config file
-like myapp.conf in your applications home directory. See
+You can also use a C<YAML>, C<XML> or L<Config::General> config file
+like C<myapp.conf> in your applications home directory. See
 L<Catalyst::Plugin::ConfigLoader>.
 
-=head3 Cascading configuration.
+=head3 Cascading configuration
 
 The config method is present on all Catalyst components, and configuration
 will be merged when an application is started. Configuration loaded with
@@ -918,7 +929,7 @@
 Merges C<@path> with C<< $c->config->{home} >> and returns a
 L<Path::Class::Dir> object. Note you can usually use this object as
 a filename, but sometimes you will have to explicitly stringify it
-yourself by calling the C<<->stringify>> method.
+yourself by calling the C<< ->stringify >> method.
 
 For example:
 
@@ -1126,8 +1137,9 @@
                 . "Class::Accessor(::Fast)?\nPlease pass "
                 . "(replace_constructor => 1)\nwhen making your class immutable.\n";
         }
-        $meta->make_immutable(replace_constructor => 1)
-            unless $meta->is_immutable;
+        $meta->make_immutable(
+            replace_constructor => 1,
+        ) unless $meta->is_immutable;
     };
 
     $class->setup_finalize;
@@ -1158,36 +1170,54 @@
     $class->setup_finished(1);
 }
 
+=head2 $c->uri_for( $path, @args?, \%query_values? )
+
 =head2 $c->uri_for( $action, \@captures?, @args?, \%query_values? )
 
-=head2 $c->uri_for( $path, @args?, \%query_values? )
+Constructs an absolute L<URI> object based on the application root, the
+provided path, and the additional arguments and query parameters provided.
+When used as a string, provides a textual URI.
 
-=over
+If the first argument is a string, it is taken as a public URI path relative
+to C<< $c->namespace >> (if it doesn't begin with a forward slash) or
+relative to the application root (if it does). It is then merged with
+C<< $c->request->base >>; any C<@args> are appended as additional path
+components; and any C<%query_values> are appended as C<?foo=bar> parameters.
 
-=item $action
+If the first argument is a L<Catalyst::Action> it represents an action which
+will have its path resolved using C<< $c->dispatcher->uri_for_action >>. The
+optional C<\@captures> argument (an arrayref) allows passing the captured
+variables that are needed to fill in the paths of Chained and Regex actions;
+once the path is resolved, C<uri_for> continues as though a path was
+provided, appending any arguments or parameters and creating an absolute
+URI.
 
-A Catalyst::Action object representing the Catalyst action you want to
-create a URI for. To get one for an action in the current controller,
-use C<< $c->action('someactionname') >>. To get one from different
-controller, fetch the controller using C<< $c->controller() >>, then
-call C<action_for> on it.
+The captures for the current request can be found in
+C<< $c->request->captures >>, and actions can be resolved using
+C<< Catalyst::Controller->action_for($name) >>. If you have a private action
+path, use C<< $c->uri_for_action >> instead.
 
-You can maintain the arguments captured by an action (e.g.: Regex, Chained)
-using C<< $c->req->captures >>.
+  # Equivalent to $c->req->uri
+  $c->uri_for($c->action, $c->req->captures,
+      @{ $c->req->args }, $c->req->params);
 
-  # For the current action
-  $c->uri_for($c->action, $c->req->captures);
-
   # For the Foo action in the Bar controller
-  $c->uri_for($c->controller('Bar')->action_for('Foo'), $c->req->captures);
+  $c->uri_for($c->controller('Bar')->action_for('Foo'));
 
-=back
+  # Path to a static resource
+  $c->uri_for('/static/images/logo.png');
 
 =cut
 
 sub uri_for {
     my ( $c, $path, @args ) = @_;
 
+    if (blessed($path) && $path->isa('Catalyst::Controller')) {
+        $path = $path->path_prefix;
+        $path =~ s{/+\z}{};
+        $path .= '/';
+    }
+
     if ( blessed($path) ) { # action object
         my $captures = ( scalar @args && ref $args[0] eq 'ARRAY'
                          ? shift(@args)
@@ -1541,9 +1571,9 @@
 
 sub _stats_start_execute {
     my ( $c, $code ) = @_;
-
+    my $appclass = ref($c) || $c;
     return if ( ( $code->name =~ /^_.*/ )
-        && ( !$c->config->{show_internal_actions} ) );
+        && ( !$appclass->config->{show_internal_actions} ) );
 
     my $action_name = $code->reverse();
     $c->counter->{$action_name}++;
@@ -1606,25 +1636,6 @@
     $c->stats->profile( end => $info );
 }
 
-=head2 $c->_localize_fields( sub { }, \%keys );
-
-=cut
-
-#Why does this exist? This is no longer safe and WILL NOT WORK.
-# it doesnt seem to be used anywhere. can we remove it?
-sub _localize_fields {
-    my ( $c, $localized, $code ) = ( @_ );
-
-    my $request = delete $localized->{request} || {};
-    my $response = delete $localized->{response} || {};
-
-    local @{ $c }{ keys %$localized } = values %$localized;
-    local @{ $c->request }{ keys %$request } = values %$request;
-    local @{ $c->response }{ keys %$response } = values %$response;
-
-    $code->();
-}
-
 =head2 $c->finalize
 
 Finalizes the request.
@@ -1876,7 +1887,7 @@
         $c->prepare_read;
 
         # Parse the body unless the user wants it on-demand
-        unless ( $c->config->{parse_on_demand} ) {
+        unless ( ref($c)->config->{parse_on_demand} ) {
             $c->prepare_body;
         }
     }
@@ -2090,7 +2101,7 @@
 be used in a while loop, reading C<$maxlength> bytes on every call.
 C<$maxlength> defaults to the size of the request if not specified.
 
-You have to set C<< MyApp->config->{parse_on_demand} >> to use this
+You have to set C<< MyApp->config(parse_on_demand => 1) >> to use this
 directly.
 
 Warning: If you use read(), Catalyst will not process the body,
@@ -2127,40 +2138,32 @@
 
 =head2 $c->setup_components
 
-Sets up components. Specify a C<setup_components> config option to pass
-additional options directly to L<Module::Pluggable>. To add additional
-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.
+This method is called internally to set up the application's components.
 
-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.
+It finds modules by calling the L<locate_components> method, expands them to
+package names with the L<expand_component_module> method, and then installs
+each component into the application.
 
+The C<setup_components> config option is passed to both of the above methods.
+
+Installation of each component is performed by the L<setup_component> method,
+below.
+
 =cut
 
 sub setup_components {
     my $class = shift;
 
-    my @paths   = qw( ::Controller ::C ::Model ::M ::View ::V );
     my $config  = $class->config->{ setup_components };
-    my $extra   = delete $config->{ search_extra } || [];
 
-    push @paths, @$extra;
-
-    my $locator = Module::Pluggable::Object->new(
-        search_path => [ map { s/^(?=::)/$class/; $_; } @paths ],
-        %$config
-    );
-
-    my @comps = sort { length $a <=> length $b } $locator->plugins;
+    my @comps = sort { length $a <=> length $b }
+                $class->locate_components($config);
     my %comps = map { $_ => 1 } @comps;
 
-    my $deprecated_component_names = grep { /::[CMV]::/ } @comps;
+    my $deprecatedcatalyst_component_names = grep { /::[CMV]::/ } @comps;
     $class->log->warn(qq{Your application is using the deprecated ::[MVC]:: type naming scheme.\n}.
         qq{Please switch your class names to ::Model::, ::View:: and ::Controller: as appropriate.\n}
-    ) if $deprecated_component_names;
+    ) if $deprecatedcatalyst_component_names;
 
     for my $component ( @comps ) {
 
@@ -2169,30 +2172,76 @@
         # we know M::P::O found a file on disk so this is safe
 
         Catalyst::Utils::ensure_class_loaded( $component, { ignore_loaded => 1 } );
-        #Class::MOP::load_class($component);
 
-        my $module  = $class->setup_component( $component );
-        my %modules = (
-            $component => $module,
-            map {
-                $_ => $class->setup_component( $_ )
-            } grep {
-              not exists $comps{$_}
-            } Devel::InnerPackage::list_packages( $component )
-        );
+        # Needs to be done as soon as the component is loaded, as loading a sub-component
+        # (next time round the loop) can cause us to get the wrong metaclass..
+        $class->_controller_init_base_classes($component);
+    }
 
-        for my $key ( keys %modules ) {
-            $class->components->{ $key } = $modules{ $key };
+    for my $component (@comps) {
+        $class->components->{ $component } = $class->setup_component($component);
+        for my $component ($class->expand_component_module( $component, $config )) {
+            next if $comps{$component};
+            $class->_controller_init_base_classes($component); # Also cover inner packages
+            $class->components->{ $component } = $class->setup_component($component);
         }
     }
 }
 
+=head2 $c->locate_components( $setup_component_config )
+
+This method is meant to provide a list of component modules that should be
+setup for the application.  By default, it will use L<Module::Pluggable>.
+
+Specify a C<setup_components> config option to pass additional options directly
+to L<Module::Pluggable>. To add additional 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.
+
+=cut
+
+sub locate_components {
+    my $class  = shift;
+    my $config = shift;
+
+    my @paths   = qw( ::Controller ::C ::Model ::M ::View ::V );
+    my $extra   = delete $config->{ search_extra } || [];
+
+    push @paths, @$extra;
+
+    my $locator = Module::Pluggable::Object->new(
+        search_path => [ map { s/^(?=::)/$class/; $_; } @paths ],
+        %$config
+    );
+
+    my @comps = $locator->plugins;
+
+    return @comps;
+}
+
+=head2 $c->expand_component_module( $component, $setup_component_config )
+
+Components found by C<locate_components> will be passed to this method, which
+is expected to return a list of component (package) names to be set up.
+
+=cut
+
+sub expand_component_module {
+    my ($class, $module) = @_;
+    return Devel::InnerPackage::list_packages( $module );
+}
+
 =head2 $c->setup_component
 
 =cut
 
+# FIXME - Ugly, ugly hack to ensure the we force initialize non-moose base classes
+#         nearest to Catalyst::Controller first, no matter what order stuff happens
+#         to be loaded. There are TODO tests in Moose for this, see
+#         f2391d17574eff81d911b97be15ea51080500003
 sub _controller_init_base_classes {
     my ($app_class, $component) = @_;
+    return unless $component->isa('Catalyst::Controller');
     foreach my $class ( reverse @{ mro::get_linear_isa($component) } ) {
         Moose::Meta::Class->initialize( $class )
             unless find_meta($class);
@@ -2206,16 +2255,12 @@
         return $component;
     }
 
-    # FIXME - Ugly, ugly hack to ensure the we force initialize non-moose base classes
-    #         nearest to Catalyst::Controller first, no matter what order stuff happens
-    #         to be loaded. There are TODO tests in Moose for this, see
-    #         f2391d17574eff81d911b97be15ea51080500003
-    if ($component->isa('Catalyst::Controller')) {
-        $class->_controller_init_base_classes($component);
-    }
-
     my $suffix = Catalyst::Utils::class2classsuffix( $component );
     my $config = $class->config->{ $suffix } || {};
+    # Stash catalyst_component_name in the config here, so that custom COMPONENT
+    # methods also pass it. local to avoid pointlessly shitting in config
+    # for the debug screen, as $component is already the key name.
+    local $config->{catalyst_component_name} = $component;
 
     my $instance = eval { $component->COMPONENT( $class, $config ); };
 
@@ -2596,7 +2641,7 @@
 C<_ACTION>, and C<_END>. These are by default not shown in the private
 action table, but you can make them visible with a config parameter.
 
-    MyApp->config->{show_internal_actions} = 1;
+    MyApp->config(show_internal_actions => 1);
 
 =head1 CASE SENSITIVITY
 
@@ -2604,7 +2649,7 @@
 mapped to C</foo/bar>. You can activate case sensitivity with a config
 parameter.
 
-    MyApp->config->{case_sensitive} = 1;
+    MyApp->config(case_sensitive => 1);
 
 This causes C<MyApp::C::Foo::Bar> to map to C</Foo/Bar>.
 
@@ -2614,7 +2659,7 @@
 but if you want to handle input yourself, you can enable on-demand
 parsing with a config parameter.
 
-    MyApp->config->{parse_on_demand} = 1;
+    MyApp->config(parse_on_demand => 1);
 
 =head1 PROXY SUPPORT
 
@@ -2635,6 +2680,18 @@
     The host value for $c->req->base and $c->req->uri is set to the real
     host, as read from the HTTP X-Forwarded-Host header.
 
+Additionally, you may be running your backend application on an insecure
+connection (port 80) while your frontend proxy is running under SSL.  If there
+is a discrepancy in the ports, use the HTTP header C<X-Forwarded-Port> to
+tell Catalyst what port the frontend listens on.  This will allow all URIs to
+be created properly.
+
+In the case of passing in:
+
+    X-Forwarded-Port: 443
+
+All calls to C<uri_for> will result in an https link, as is expected.
+
 Obviously, your web server must support these headers for this to work.
 
 In a more complex server farm environment where you may have your
@@ -2642,11 +2699,11 @@
 configuration option to tell Catalyst to read the proxied data from the
 headers.
 
-    MyApp->config->{using_frontend_proxy} = 1;
+    MyApp->config(using_frontend_proxy => 1);
 
 If you do not wish to use the proxy support at all, you may set:
 
-    MyApp->config->{ignore_frontend_proxy} = 1;
+    MyApp->config(ignore_frontend_proxy => 1);
 
 =head1 THREAD SAFETY
 
@@ -2683,7 +2740,7 @@
 
 =head2 L<Catalyst::Manual> - The Catalyst Manual
 
-=head2 L<Catalyst::Component>, L<Catalyst::Base> - Base classes for components
+=head2 L<Catalyst::Component>, L<Catalyst::Controller> - Base classes for components
 
 =head2 L<Catalyst::Engine> - Core engine
 
@@ -2707,7 +2764,7 @@
 
 Andrew Bramble
 
-Andrew Ford
+Andrew Ford E<lt>A.Ford at ford-mason.co.ukE<gt>
 
 Andrew Ruthven
 
@@ -2723,6 +2780,14 @@
 
 chicks: Christopher Hicks
 
+Chisel Wright C<pause at herlpacker.co.uk>
+
+Danijel Milicevic C<me at danijel.de>
+
+David Kamholz E<lt>dkamholz at cpan.orgE<gt>
+
+David Naughton, C<naughton at umn.edu>
+
 David E. Wheeler
 
 dkubb: Dan Kubb <dan.kubb-cpan at onautopilot.com>
@@ -2735,16 +2800,26 @@
 
 fireartist: Carl Franks <cfranks at cpan.org>
 
+frew: Arthur Axel "fREW" Schmidt <frioux at gmail.com>
+
 gabb: Danijel Milicevic
 
 Gary Ashton Jones
 
+Gavin Henry C<ghenry at perl.me.uk>
+
 Geoff Richards
 
+groditi: Guillermo Roditi <groditi at gmail.com>
+
+hobbs: Andrew Rodland <andrew at cleverdomain.org>
+
 ilmari: Dagfinn Ilmari Mannsåker <ilmari at ilmari.org>
 
 jcamacho: Juan Camacho
 
+jester: Jesse Sheidlower C<jester at panix.com>
+
 jhannah: Jay Hannah <jay at jays.net>
 
 Jody Belka
@@ -2753,6 +2828,12 @@
 
 jon: Jon Schutz <jjschutz at cpan.org>
 
+Jonathan Rockway C<< <jrockway at cpan.org> >>
+
+Kieren Diment C<kd at totaldatasolution.com>
+
+konobi: Scott McWhirter <konobi at cpan.org>
+
 marcus: Marcus Ramberg <mramberg at cpan.org>
 
 miyagawa: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
@@ -2781,16 +2862,22 @@
 
 random: Roland Lammel <lammel at cpan.org>
 
+Robert Sedlacek C<< <rs at 474.at> >>
+
 sky: Arthur Bergman
 
-the_jester: Jesse Sheidlower
-
 t0m: Tomas Doran <bobtfish at bobtfish.net>
 
 Ulf Edvinsson
 
+Viljo Marrandi C<vilts at yahoo.com>
+
+Will Hawes C<info at whawes.co.uk>
+
 willert: Sebastian Willert <willert at cpan.org>
 
+Yuval Kogman, C<nothingmuch at woobling.org>
+
 =head1 LICENSE
 
 This library is free software. You can redistribute it and/or modify it under

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_auto.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_auto.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_auto.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -35,7 +35,7 @@
           TestApp::Controller::Action::Auto->begin
           TestApp::Controller::Action::Auto->auto
           TestApp::Controller::Action::Auto->one
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
     
         my $expected = join( ", ", @expected );
@@ -52,7 +52,7 @@
           TestApp::Controller::Action::Auto->begin
           TestApp::Controller::Action::Auto->auto
           TestApp::Controller::Action::Auto->default
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
     
         my $expected = join( ", ", @expected );
@@ -70,7 +70,7 @@
           TestApp::Controller::Action::Auto->auto
           TestApp::Controller::Action::Auto::Deep->auto
           TestApp::Controller::Action::Auto::Deep->one
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
     
         my $expected = join( ", ", @expected );
@@ -88,7 +88,7 @@
           TestApp::Controller::Action::Auto->auto
           TestApp::Controller::Action::Auto::Deep->auto
           TestApp::Controller::Action::Auto::Deep->default
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
     
         my $expected = join( ", ", @expected );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_begin.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_begin.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_begin.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -30,7 +30,7 @@
           TestApp::Controller::Action::Begin->begin
           TestApp::Controller::Action::Begin->default
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         my $expected = join( ", ", @expected );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_chained.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_chained.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_chained.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -815,7 +815,7 @@
         my @expected = qw[
           TestApp::Controller::Action::Chained::Root->rootsub
           TestApp::Controller::Action::Chained::Root->endpointsub
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         my $expected = join( ", ", @expected );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_default.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_default.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_default.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -29,7 +29,7 @@
           TestApp::Controller::Action::Default->begin
           TestApp::Controller::Action::Default->default
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         my $expected = join( ", ", @expected );
@@ -76,7 +76,7 @@
         my @expected = qw[
           TestApp::Controller::Action->begin
           TestApp::Controller::Action->default
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
         
         my $expected = join( ", ", @expected );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_detach.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_detach.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_detach.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -30,7 +30,7 @@
           TestApp::Controller::Action::Detach->one
           TestApp::Controller::Action::Detach->two
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         my $expected = join( ", ", @expected );
@@ -57,7 +57,7 @@
           TestApp::Controller::Action::Detach->path
           TestApp::Controller::Action::Detach->two
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         my $expected = join( ", ", @expected );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_forward.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_forward.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_forward.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -33,7 +33,7 @@
           TestApp::Controller::Action::Forward->four
           TestApp::Controller::Action::Forward->five
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         my $expected = join( ", ", @expected );
@@ -81,7 +81,7 @@
           TestApp::Controller::Action::Forward->four
           TestApp::Controller::Action::Forward->five
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         my $expected = join( ", ", @expected );
@@ -156,7 +156,7 @@
           TestApp::Controller::Action::Forward->four
           TestApp::Controller::Action::Forward->five
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         my $expected = join( ", ", @expected );
@@ -191,7 +191,7 @@
           TestApp::Controller::Action::Forward->four
           TestApp::Controller::Action::Forward->five
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         my $expected = join( ", ", @expected );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_go.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_go.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_go.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -43,7 +43,7 @@
           TestApp::Controller::Action::Go->four
           TestApp::Controller::Action::Go->five
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -74,7 +74,7 @@
         my @expected = qw[
           TestApp::Controller::Action::Go->go_die
           TestApp::Controller::Action::Go->args
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -165,7 +165,7 @@
           TestApp::Controller::Action::Go->four
           TestApp::Controller::Action::Go->five
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -200,7 +200,7 @@
           TestApp::Controller::Action::Go->four
           TestApp::Controller::Action::Go->five
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_index.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_index.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_index.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -27,8 +27,8 @@
     # test root index
     {
         my @expected = qw[
-          TestApp->index
-          TestApp->end
+          TestApp::Controller::Root->index
+          TestApp::Controller::Root->end
         ];
     
         my $expected = join( ", ", @expected );
@@ -45,7 +45,7 @@
     {
         my @expected = qw[
           TestApp::Controller::Index->index
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
     
         my $expected = join( ", ", @expected );
@@ -66,7 +66,7 @@
         my @expected = qw[
           TestApp::Controller::Action::Index->begin
           TestApp::Controller::Action::Index->index
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
     
         my $expected = join( ", ", @expected );
@@ -87,7 +87,7 @@
         my @expected = qw[
           TestApp::Controller::Action::Index->begin
           TestApp::Controller::Action::Index->default
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
     
         my $expected = join( ", ", @expected );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_index_or_default.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_index_or_default.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_index_or_default.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -10,10 +10,13 @@
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 6*$iters;
-
+use Test::More;
 use Catalyst::Test 'TestAppIndexDefault';
 
+plan 'skip_all' if ( $ENV{CATALYST_SERVER} );
+
+plan tests => 6*$iters;
+
 if ( $ENV{CAT_BENCHMARK} ) {
     require Benchmark;
     Benchmark::timethis( $iters, \&run_tests );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_path_matchsingle.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_path_matchsingle.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_path_matchsingle.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -10,9 +10,13 @@
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 3*$iters;
+use Test::More;
 use Catalyst::Test 'TestAppMatchSingleArg';
 
+plan 'skip_all' if ( $ENV{CATALYST_SERVER} );
+
+plan tests => 3*$iters;
+
 if ( $ENV{CAT_BENCHMARK} ) {
     require Benchmark;
     Benchmark::timethis( $iters, \&run_tests );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_regexp.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_regexp.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_regexp.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -131,8 +131,10 @@
             'TestApp::Controller::Action::Regexp',
             'Test Class'
         );
+        my $location = $response->header('location');
+        $location =~ s/localhost(:\d+)?/localhost/;
         is(
-            $response->header('location'),
+            $location,
             $url,
             'Redirect URI is the same as the request URI'
         );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_streaming.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_streaming.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_streaming.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -10,7 +10,7 @@
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 10*$iters;
+use Test::More tests => 15*$iters;
 use Catalyst::Test 'TestApp';
 
 if ( $ENV{CAT_BENCHMARK} ) {
@@ -69,4 +69,14 @@
         is( $response->content_length, -s $file, 'Response Content-Length' );
         is( $response->content, $buffer, 'Content is read from filehandle' );
     }
+
+    {
+        my $size = 128 * 1024; # more than one read with the default chunksize
+
+        ok( my $response = request('http://localhost/action/streaming/body_large'), 'Request' );
+        ok( $response->is_success, 'Response Successful 2xx' );
+        is( $response->content_type, 'text/plain', 'Response Content-Type' );
+        is( $response->content_length, $size, 'Response Content-Length' );
+        is( $response->content, "\0" x $size, 'Content is read from filehandle' );
+    }
 }

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_visit.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_visit.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_action_visit.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -42,11 +42,11 @@
           TestApp::Controller::Action::Visit->four
           TestApp::Controller::Action::Visit->five
           TestApp::View::Dump::Request->process
-          TestApp->end
-          TestApp->end
-          TestApp->end
-          TestApp->end
-          TestApp->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -76,8 +76,8 @@
         my @expected = qw[
           TestApp::Controller::Action::Visit->visit_die
           TestApp::Controller::Action::Visit->args
-          TestApp->end
-          TestApp->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -166,12 +166,12 @@
           TestApp::Controller::Action::Visit->four
           TestApp::Controller::Action::Visit->five
           TestApp::View::Dump::Request->process
-          TestApp->end
-          TestApp->end
-          TestApp->end
-          TestApp->end
-          TestApp->end
-          TestApp->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -206,12 +206,12 @@
           TestApp::Controller::Action::Visit->four
           TestApp::Controller::Action::Visit->five
           TestApp::View::Dump::Request->process
-          TestApp->end
-          TestApp->end
-          TestApp->end
-          TestApp->end
-          TestApp->end
-          TestApp->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -266,7 +266,7 @@
           TestApp::Controller::Action::Chained->foo
           TestApp::Controller::Action::Chained::Foo->spoon
           TestApp::Controller::Action::Chained->end
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         my $expected = join( ", ", @expected );

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_anon.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_anon.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_anon.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,24 @@
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+use Test::More tests => 6;
+use Catalyst::Test 'TestApp';
+
+{
+    my $response = request('http://localhost/anon/test');
+    ok($response->is_success);
+    is($response->header('X-Component-Name-Action'),
+        'TestApp::Controller::Anon', 'Action can see correct catalyst_component_name');
+    isnt($response->header('X-Component-Instance-Name-Action'),
+        'TestApp::Controller::Anon', 'ref($controller) ne catalyst_component_name');
+    is($response->header('X-Component-Name-Controller'),
+        'TestApp::Controller::Anon', 'Controller can see correct catalyst_component_name');
+    is($response->header('X-Class-In-Action'),
+        'TestApp::Controller::Anon', '$action->class is catalyst_component_name');
+    is($response->header('X-Anon-Trait-Applied'),
+        '1', 'Anon controller class has trait applied correctly');
+}
+

Copied: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_attributes.t (from rev 10814, Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_atttributes.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_attributes.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_attributes.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,19 @@
+#!perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+use Test::More tests => 4;
+use Catalyst::Test 'TestApp';
+
+ok( my $response = request('http://localhost/attributes/view'),
+    'get /attributes/view' );
+ok( !$response->is_success, 'Response Unsuccessful' );
+
+ok( $response = request('http://localhost/attributes/foo'),
+    "get /attributes/foo" );
+
+ok( $response->is_success, "Response OK" );

Deleted: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_atttributes.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_atttributes.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_controller_atttributes.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -1,19 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use FindBin;
-use lib "$FindBin::Bin/../lib";
-
-use Test::More tests => 4;
-use Catalyst::Test 'TestApp';
-
-ok( my $response = request('http://localhost/attributes/view'),
-    'get /attributes/view' );
-ok( !$response->is_success, 'Response Unsuccessful' );
-
-ok( $response = request('http://localhost/attributes/foo'),
-    "get /attributes/foo" );
-
-ok( $response->is_success, "Response OK" );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_view_single.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_view_single.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_component_view_single.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -10,9 +10,13 @@
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 3*$iters;
+use Test::More;
 use Catalyst::Test 'TestAppOneView';
 
+plan 'skip_all' if ( $ENV{CATALYST_SERVER} );
+
+plan tests => 3*$iters;
+
 if ( $ENV{CAT_BENCHMARK} ) {
     require Benchmark;
     Benchmark::timethis( $iters, \&run_tests );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_body.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_body.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_body.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -80,13 +80,13 @@
 # 5.80 regression, see note in Catalyst::Plugin::Test::Plugin
 {
     my $request = GET(
-        'http://localhost/have_req_body_in_prepare_action',
+        'http://localhost/dump/response',
         'Content-Type' => 'text/plain',
         'Content'      => 'x' x 100_000
     );
 
     ok( my $response = request($request), 'Request' );
     ok( $response->is_success, 'Response Successful 2xx' );
-    like( $response->content, qr/^[1-9]/, 'Has body' );
+    ok( $response->header('X-Have-Request-Body'), 'X-Have-Request-Body set' );
 }
 

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_escaped_path.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_escaped_path.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_escaped_path.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -54,8 +54,6 @@
 }
 
 # test that request with URL-escaped code works.
-TODO: {
-    local $TODO = 'Actions should match when path parts are url encoded';
     my $request = Catalyst::Utils::request( 'http://localhost/args/param%73/one/two' );
     my $cgi     = HTTP::Request::AsCGI->new( $request, %ENV )->setup;
 
@@ -67,6 +65,8 @@
     TestApp->handle_request( env => \%ENV );
 
     ok( my $response = $cgi->restore->response );
+TODO: {
+    local $TODO = 'Actions should match when path parts are url encoded';
     ok( $response->is_success, 'Response Successful 2xx' );
     is( $response->content, 'onetwo' );
 }

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_headers.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_headers.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_headers.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -6,7 +6,7 @@
 use FindBin;
 use lib "$FindBin::Bin/../lib";
 
-use Test::More tests => 17;
+use Test::More tests => 18;
 use Catalyst::Test 'TestApp';
 
 use Catalyst::Request;
@@ -22,6 +22,7 @@
         'X-Multiple'       => [ 1 .. 5 ],
         'X-Forwarded-Host' => 'frontend.server.com',
         'X-Forwarded-For'  => '192.168.1.1, 1.2.3.4',
+        'X-Forwarded-Port' => 443
     );
  
     ok( my $response = request($request), 'Request' );
@@ -30,6 +31,7 @@
     like( $response->content, qr/^bless\( .* 'Catalyst::Request' \)$/s, 'Content is a serialized Catalyst::Request' );
     ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' );
     isa_ok( $creq, 'Catalyst::Request' );
+    ok( $creq->secure, 'Forwarded port sets securet' );
     isa_ok( $creq->headers, 'HTTP::Headers', 'Catalyst::Request->headers' );
     is( $creq->header('X-Whats-Cool'), $request->header('X-Whats-Cool'), 'Catalyst::Request->header X-Whats-Cool' );
     

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_remote_user.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_remote_user.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/live_engine_request_remote_user.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -37,6 +37,11 @@
     }
 
     isa_ok( $creq, 'Catalyst::Request' );
-    
-    is( $creq->remote_user, 'dwc', '$c->req->remote_user ok' );
+    SKIP:
+    {
+        if ( $ENV{CATALYST_SERVER} ) {
+            skip 'Using remote server', 1;
+        }
+        is( $creq->remote_user, 'dwc', '$c->req->remote_user ok' );
+    }
 }

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/unit_core_action_for.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/unit_core_action_for.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/unit_core_action_for.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -12,7 +12,7 @@
 
 use_ok('TestApp');
 
-is(TestApp->action_for('global_action')->code, TestApp->can('global_action'),
+is(TestApp->action_for('global_action')->code, TestApp::Controller::Root->can('global_action'),
    'action_for on appclass ok');
 
 is(TestApp->controller('Args')->action_for('args')->code,

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/unit_core_uri_for_action.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/unit_core_uri_for_action.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/aggregate/unit_core_uri_for_action.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -8,7 +8,7 @@
 
 use Test::More;
 
-plan tests => 29;
+plan tests => 30;
 
 use_ok('TestApp');
 
@@ -97,6 +97,10 @@
                 namespace => 'yada',
               } );
 
+is($context->uri_for($context->controller('Action')),
+   "http://127.0.0.1/foo/yada/action/",
+   "uri_for a controller");
+
 is($context->uri_for($path_action),
    "http://127.0.0.1/foo/action/relative/relative",
    "uri_for correct for path action");

Copied: Catalyst-Runtime/5.80/branches/exception_interface/t/author/optional_http-server.t (from rev 10814, Catalyst-Runtime/5.80/branches/exception_interface/t/optional_http-server.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/author/optional_http-server.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/author/optional_http-server.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,96 @@
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+use File::Path;
+use FindBin;
+use IPC::Open3;
+use IO::Socket;
+
+use Catalyst::Devel 1.0;
+use File::Copy::Recursive;
+
+# Run a single test by providing it as the first arg
+my $single_test = shift;
+
+my $tmpdir = "$FindBin::Bin/../../t/tmp";
+
+# clean up
+rmtree $tmpdir if -d $tmpdir;
+
+# create a TestApp and copy the test libs into it
+mkdir $tmpdir;
+chdir $tmpdir;
+system( $^X, "-I$FindBin::Bin/../../lib", "$FindBin::Bin/../../script/catalyst.pl", 'TestApp' );
+chdir "$FindBin::Bin/..";
+File::Copy::Recursive::dircopy( '../t/lib', '../t/tmp/TestApp/lib' ) or die;
+
+# remove TestApp's tests
+rmtree '../t/tmp/TestApp/t' or die;
+
+# spawn the standalone HTTP server
+my $port = 30000 + int rand(1 + 10000);
+my @cmd = ($^X, "-I$FindBin::Bin/../../lib",
+  "$FindBin::Bin/../../t/tmp/TestApp/script/testapp_server.pl", '-port', $port );
+my $pid = open3( undef, my $server, undef, @cmd)
+    or die "Unable to spawn standalone HTTP server: $!";
+
+# wait for it to start
+print "Waiting for server to start...\n";
+my $timeout = 30;
+my $count = 0;
+while ( check_port( 'localhost', $port ) != 1 ) {
+    sleep 1;
+    die("Server did not start within $timeout seconds: " . join(' ', @cmd))
+        if $count++ > $timeout;
+}
+
+# run the testsuite against the HTTP server
+$ENV{CATALYST_SERVER} = "http://localhost:$port";
+
+my $return;
+if ( $single_test ) {
+    $return = system( "$^X -I../lib/ $single_test" );
+}
+else {
+    $return = prove( '-r', '-I../lib/', glob('../t/aggregate/live_*.t') );
+}
+
+# shut it down
+kill 'INT', $pid;
+close $server;
+
+# clean up
+rmtree "$FindBin::Bin/../../t/tmp" if -d "$FindBin::Bin/../../t/tmp";
+
+is( $return, 0, 'live tests' );
+
+sub check_port {
+    my ( $host, $port ) = @_;
+
+    my $remote = IO::Socket::INET->new(
+        Proto    => "tcp",
+        PeerAddr => $host,
+        PeerPort => $port
+    );
+    if ($remote) {
+        close $remote;
+        return 1;
+    }
+    else {
+        return 0;
+    }
+}
+
+sub prove {
+    if (!(my $pid = fork)) {
+        require App::Prove;
+        my $prove = App::Prove->new;
+        $prove->process_args(@_);
+        exit( $prove->run ? 0 : 1 );
+    } else {
+        waitpid $pid, 0;
+        return $?;
+    }
+}

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/caf_backcompat.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/caf_backcompat.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/caf_backcompat.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -12,7 +12,6 @@
     Catalyst::Component
     Catalyst::Dispatcher
     Catalyst::DispatchType
-    Catalyst::Engine::HTTP::Restarter::Watcher
     Catalyst::Engine
     Catalyst::Log
     Catalyst::Request::Upload

Deleted: Catalyst-Runtime/5.80/branches/exception_interface/t/cdi_backcompat_plugin_accessor_override.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/cdi_backcompat_plugin_accessor_override.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/cdi_backcompat_plugin_accessor_override.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -1,39 +0,0 @@
-use strict;
-use warnings;
-use lib 't/lib';
-
-use Test::More tests => 2;
-use Test::Exception;
-
-# Force a stack trace.
-use Carp;
-$SIG{__DIE__} = \&Carp::confess;
-
-{
-    package CDICompatTestApp;
-    use Catalyst qw/
-	    +CDICompatTestPlugin
-    /;
-    # Calling ->config here (before we call setup). With CDI/Cat 5.70 this
-    # causes *CDICompatTestApp::_config to have a class data accessor created.
-    
-    # If this doesn't happen, then later when we've added CDICompatTestPlugin
-    # to @ISA, we fail in the overridden ->setup method when we call ->config
-    # again, as we get the CAF accessor from CDICompatTestPlugin, not the one
-    # created in this package as a side-effect of this call. :-(
-    __PACKAGE__->config;
-}
-
-SKIP: {
-  skip 'Not trying to replicate the nasty CDI hackness', 2;
-  lives_ok {
-      CDICompatTestApp->setup;
-  } 'Setup app with plugins which says use base qw/Class::Accessor::Fast/';
-
-  # And the plugin's setup_finished method should have been run, as accessors
-  # are not created in MyApp until the data is written to.
-  {
-      no warnings 'once';
-      is $CDICompatTestPlugin::Data::HAS_RUN_SETUP_FINISHED, 1, 'Plugin setup_finish run';
-  }
-}
\ No newline at end of file

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/custom_exception_class_simple.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/custom_exception_class_simple.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/custom_exception_class_simple.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,18 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+use Test::More tests => 1;
+use Test::Exception;
+
+TODO: {
+    local $TODO = 'Does not work yet';
+
+lives_ok {
+    require TestAppClassExceptionSimpleTest;
+} 'Can load application';
+
+}
+

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/custom_live_component_controller_action_auto_doublebug.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/custom_live_component_controller_action_auto_doublebug.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/custom_live_component_controller_action_auto_doublebug.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -32,9 +32,9 @@
         
         {
             my @expected = qw[
-                TestAppDoubleAutoBug->auto
-                TestAppDoubleAutoBug->default
-                TestAppDoubleAutoBug->end
+                TestAppDoubleAutoBug::Controller::Root->auto
+                TestAppDoubleAutoBug::Controller::Root->default
+                TestAppDoubleAutoBug::Controller::Root->end
             ];
     
             my $expected = join( ", ", @expected );

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/deprecated.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/deprecated.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/deprecated.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -16,6 +16,8 @@
 BEGIN {
     my $logger = Class::MOP::Class->create_anon_class(
     methods => {
+        debug => sub {0},
+        info  => sub {0},
         warn => sub {
             if ($_[1] =~ /switch your class names/) {
                $mvc_warnings++;

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/deprecated_appclass_action_warnings.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/deprecated_appclass_action_warnings.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/deprecated_appclass_action_warnings.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::More;
+use Catalyst::Test 'DeprecatedActionsInAppClassTestApp';
+
+plan tests => 3;
+
+my $warnings;
+my $logger = DeprecatedActionsInAppClassTestApp::Log->new;
+Catalyst->log($logger);
+
+ok( my $response = request('http://localhost/foo'), 'Request' );
+ok( $response->is_success, 'Response Successful 2xx' );
+is( $DeprecatedActionsInAppClassTestApp::Log::warnings, 1, 'Get the appclass action warning' );
\ No newline at end of file

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/ACLTestApp/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/ACLTestApp/Controller/Root.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/ACLTestApp/Controller/Root.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,18 @@
+package ACLTestApp::Controller::Root;
+use Test::More;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+sub foobar : Private {
+    die $Catalyst::DETACH;
+}
+
+sub gorch : Local {
+    my ( $self, $c, $frozjob ) = @_;
+    is $frozjob, 'wozzle';
+    $c->res->body("gorch");
+}
+
+1;

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/ACLTestApp.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/ACLTestApp.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/ACLTestApp.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,26 @@
+package ACLTestApp;
+use Test::More;
+
+use strict;
+use warnings;
+use MRO::Compat;
+use Scalar::Util ();
+
+use base qw/Catalyst Catalyst::Controller/;
+use Catalyst qw//;
+
+sub execute {
+    my $c = shift;
+    my ( $class, $action ) = @_;
+
+    if ( Scalar::Util::blessed($action)
+	 and $action->name ne "foobar" ) {
+	eval { $c->detach( 'foobar', [$action, 'foo'] ) };
+    }
+
+    $c->next::method( @_ );
+}
+
+__PACKAGE__->setup;
+
+1;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/Catalyst/Plugin/Test/Plugin.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/Catalyst/Plugin/Test/Plugin.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/Catalyst/Plugin/Test/Plugin.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -22,26 +22,14 @@
     return $c;
 }
 
-# Note: This is horrible, but Catalyst::Plugin::Server forces the body to
+# Note: Catalyst::Plugin::Server forces the body to
 #       be parsed, by calling the $c->req->body method in prepare_action.
 #       We need to test this, as this was broken by 5.80. See also
-#       t/aggregate/live_engine_request_body.t. Better ways to test this
-#       appreciated if you have suggestions :)
-{
-    my $have_req_body = 0;
-    sub prepare_action {
-        my $c = shift;
-        $have_req_body++ if $c->req->body;
-        $c->next::method(@_);
-    }
-    sub have_req_body_in_prepare_action : Local {
-        my ($self, $c) = @_;
-        $c->res->body($have_req_body);
-    }
+#       t/aggregate/live_engine_request_body.t.
+sub prepare_action {
+    my $c = shift;
+    $c->res->header('X-Have-Request-Body', 1) if $c->req->body;
+    $c->next::method(@_);
 }
 
-sub end : Private {
-    my ($self,$c) = @_;
-}
-
 1;

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/DeprecatedActionsInAppClassTestApp.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/DeprecatedActionsInAppClassTestApp.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/DeprecatedActionsInAppClassTestApp.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,30 @@
+package DeprecatedActionsInAppClassTestApp;
+
+use strict;
+use warnings;
+use Catalyst;
+
+our $VERSION = '0.01';
+
+__PACKAGE__->config( name => 'DeprecatedActionsInAppClassTestApp', root => '/some/dir' );
+__PACKAGE__->log(DeprecatedActionsInAppClassTestApp::Log->new);
+__PACKAGE__->setup;
+
+sub foo : Local {
+    my ($self, $c) = @_;
+    $c->res->body('OK');
+}
+
+package DeprecatedActionsInAppClassTestApp::Log;
+use strict;
+use warnings;
+use base qw/Catalyst::Log/;
+
+our $warnings;
+
+sub warn {
+    my ($self, $warning) = @_;
+    $warnings++ if $warning =~ /action methods .+ found defined/i;
+}
+
+1;

Copied: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp/Controller/Root.pm (from rev 10814, Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp.pm)
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp/Controller/Root.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp/Controller/Root.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,55 @@
+package PluginTestApp::Controller::Root;
+use Test::More;
+
+use base 'Catalyst::Controller';
+
+#use Catalyst qw(
+#        Test::Plugin
+#        +TestApp::Plugin::FullyQualified
+#        );
+
+__PACKAGE__->config->{namespace} = '';
+
+sub compile_time_plugins : Local {
+    my ( $self, $c ) = @_;
+
+    isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
+    isa_ok $c, 'TestApp::Plugin::FullyQualified';
+
+    can_ok $c, 'registered_plugins';
+    $c->_test_plugins;
+
+    $c->res->body("ok");
+}
+
+sub run_time_plugins : Local {
+    my ( $self, $c ) = @_;
+
+    $c->_test_plugins;
+    my $faux_plugin = 'Faux::Plugin';
+
+# Trick perl into thinking the plugin is already loaded
+    $INC{'Faux/Plugin.pm'} = 1;
+
+    ref($c)->plugin( faux => $faux_plugin );
+
+    isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
+    isa_ok $c, 'TestApp::Plugin::FullyQualified';
+    ok !$c->isa($faux_plugin),
+    '... and it should not inherit from the instant plugin';
+    can_ok $c, 'faux';
+    is $c->faux->count, 1, '... and it should behave correctly';
+    is_deeply [ $c->registered_plugins ],
+    [
+        qw/Catalyst::Plugin::Test::Plugin
+        Faux::Plugin
+        TestApp::Plugin::FullyQualified/
+        ],
+    'registered_plugins() should report all plugins';
+    ok $c->registered_plugins('Faux::Plugin'),
+    '... and even the specific instant plugin';
+
+    $c->res->body("ok");
+}
+
+1;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/PluginTestApp.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -6,48 +6,6 @@
         +TestApp::Plugin::FullyQualified
         );
 
-sub compile_time_plugins : Local {
-    my ( $self, $c ) = @_;
-
-    isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
-    isa_ok $c, 'TestApp::Plugin::FullyQualified';
-
-    can_ok $c, 'registered_plugins';
-    $c->_test_plugins;
-
-    $c->res->body("ok");
-}
-
-sub run_time_plugins : Local {
-    my ( $self, $c ) = @_;
-
-    $c->_test_plugins;
-    my $faux_plugin = 'Faux::Plugin';
-
-# Trick perl into thinking the plugin is already loaded
-    $INC{'Faux/Plugin.pm'} = 1;
-
-    __PACKAGE__->plugin( faux => $faux_plugin );
-
-    isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
-    isa_ok $c, 'TestApp::Plugin::FullyQualified';
-    ok !$c->isa($faux_plugin),
-    '... and it should not inherit from the instant plugin';
-    can_ok $c, 'faux';
-    is $c->faux->count, 1, '... and it should behave correctly';
-    is_deeply [ $c->registered_plugins ],
-    [
-        qw/Catalyst::Plugin::Test::Plugin
-        Faux::Plugin
-        TestApp::Plugin::FullyQualified/
-        ],
-    'registered_plugins() should report all plugins';
-    ok $c->registered_plugins('Faux::Plugin'),
-    '... and even the specific instant plugin';
-
-    $c->res->body("ok");
-}
-
 sub _test_plugins {
     my $c = shift;
     is_deeply [ $c->registered_plugins ],

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Action/TestMyAction.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Action/TestMyAction.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Action/TestMyAction.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -9,6 +9,9 @@
     my $self = shift;
     my ( $controller, $c, $test ) = @_;
     $c->res->header( 'X-TestAppActionTestMyAction', 'MyAction works' );
+    $c->res->header( 'X-Component-Name-Action', $controller->catalyst_component_name);
+    $c->res->header( 'X-Component-Instance-Name-Action', ref($controller));
+    $c->res->header( 'X-Class-In-Action', $self->class);
     $self->next::method(@_);
 }
 

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Action/Streaming.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Action/Streaming.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Action/Streaming.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -16,7 +16,7 @@
 
 sub body : Local {
     my ( $self, $c ) = @_;
-    
+
     my $file = "$FindBin::Bin/../lib/TestApp/Controller/Action/Streaming.pm";
     my $fh = IO::File->new( $file, 'r' );
     if ( defined $fh ) {
@@ -27,4 +27,16 @@
     }
 }
 
+sub body_large : Local {
+    my ($self, $c) = @_;
+
+    # more than one write with the default chunksize
+    my $size = 128 * 1024;
+
+    my $data = "\0" x $size;
+    open my $fh, '<', \$data;
+    $c->res->content_length($size);
+    $c->res->body($fh);
+}
+
 1;

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Anon.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Anon.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Anon.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,40 @@
+package Anon::Trait;
+use Moose::Role -traits => 'MethodAttributes'; # Needed for role composition to work correctly with anon classes.
+
+after test => sub {
+    my ($self, $c) = @_;
+    $c->res->header('X-Anon-Trait-Applied', 1);
+};
+
+no Moose::Role;
+
+package TestApp::Controller::Anon;
+use Moose;
+use Moose::Util qw/find_meta/;
+use namespace::clean -except => 'meta';
+BEGIN { extends 'Catalyst::Controller' };
+
+sub COMPONENT { # Don't do this yourself, use CatalystX::Component::Traits!
+    my ($class, $app, $args) = @_;
+
+    my $meta = $class->meta->create_anon_class(
+            superclasses => [ $class->meta->name ],
+            roles        => ['Anon::Trait'],
+            cache        => 1,
+    );
+    # Special move as the methodattributes trait has changed our metaclass..
+    $meta = find_meta($meta->name);
+
+    $meta->add_method('meta' => sub { $meta });
+    $class = $meta->name;
+    $class->new($app, $args);
+}
+
+sub test : Local ActionClass('+TestApp::Action::TestMyAction') {
+    my ($self, $c) = @_;
+    $c->res->header('X-Component-Name-Controller', $self->catalyst_component_name);
+    $c->res->body('It works');
+}
+
+__PACKAGE__->meta->make_immutable;
+

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Root.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp/Controller/Root.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -20,4 +20,36 @@
     $c->forward('TestApp::View::Dump::Request');
 }
 
+sub index : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body('root index');
+}
+
+sub global_action : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub class_forward_test_method :Private {
+    my ( $self, $c ) = @_;
+    $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
+}
+
+sub loop_test : Local {
+    my ( $self, $c ) = @_;
+
+    for( 1..1001 ) {
+        $c->forward( 'class_forward_test_method' );
+    }
+}
+
+sub recursion_test : Local {
+    my ( $self, $c ) = @_;
+    $c->forward( 'recursion_test' );
+}
+
+sub end : Private {
+    my ($self,$c) = @_;
+}
+
 1;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestApp.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -41,16 +41,6 @@
 
 TestApp->setup;
 
-sub index : Private {
-    my ( $self, $c ) = @_;
-    $c->res->body('root index');
-}
-
-sub global_action : Private {
-    my ( $self, $c ) = @_;
-    $c->forward('TestApp::View::Dump::Request');
-}
-
 sub execute {
     my $c      = shift;
     my $class  = ref( $c->component( $_[0] ) ) || $_[0];
@@ -77,7 +67,7 @@
             @executed
         );
     }
-
+    no warnings 'recursion';
     return $c->SUPER::execute(@_);
 }
 
@@ -92,24 +82,6 @@
     $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) );
 }
 
-sub class_forward_test_method :Private {
-    my ( $self, $c ) = @_;
-    $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
-}
-
-sub loop_test : Local {
-    my ( $self, $c ) = @_;
-
-    for( 1..1001 ) {
-        $c->forward( 'class_forward_test_method' );
-    }
-}
-
-sub recursion_test : Local {
-    my ( $self, $c ) = @_;
-    $c->forward( 'recursion_test' );
-}
-
 {
     no warnings 'redefine';
     sub Catalyst::Log::error { }

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppClassExceptionSimpleTest.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppClassExceptionSimpleTest.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppClassExceptionSimpleTest.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,19 @@
+package TestAppClassExceptionSimpleTest::Exception;
+use strict;
+use warnings;
+
+sub throw {}
+
+#########
+
+package TestAppClassExceptionSimpleTest;
+use strict;
+use warnings;
+
+BEGIN { $Catalyst::Exception::CATALYST_EXCEPTION_CLASS = 'TestAppClassExceptionSimpleTest::Exception'; }
+
+use Catalyst;
+
+__PACKAGE__->setup;
+
+1;

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppDoubleAutoBug/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppDoubleAutoBug/Controller/Root.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppDoubleAutoBug/Controller/Root.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,22 @@
+package TestAppDoubleAutoBug::Controller::Root;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+sub auto : Private {
+    my ( $self, $c ) = @_;
+    ++$c->stash->{auto_count};
+    return 1;
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( sprintf 'default, auto=%d', $c->stash->{auto_count} );
+}
+
+sub end : Private {
+    my ($self,$c) = @_;
+}
+
+1;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppDoubleAutoBug.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppDoubleAutoBug.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppDoubleAutoBug.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -44,16 +44,3 @@
 
     return $c->SUPER::execute(@_);
 }
-
-
-
-sub auto : Private {
-    my ( $self, $c ) = @_;
-    ++$c->stash->{auto_count};
-    return 1;
-}
-
-sub default : Private {
-    my ( $self, $c ) = @_;
-    $c->res->body( sprintf 'default, auto=%d', $c->stash->{auto_count} );
-}

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController/Controller/Foo.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController/Controller/Foo.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController/Controller/Foo.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,5 @@
+package TestAppNonMooseController::Controller::Foo;
+use base qw/TestAppNonMooseController::ControllerBase/;
+
+1;
+

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController/ControllerBase.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController/ControllerBase.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController/ControllerBase.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,5 @@
+package TestAppNonMooseController::ControllerBase;
+use base qw/Catalyst::Controller/;
+
+1;
+

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppNonMooseController.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,8 @@
+package TestAppNonMooseController;
+use base qw/Catalyst/;
+use Catalyst;
+
+__PACKAGE__->setup;
+
+1;
+

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPathBug.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPathBug.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPathBug.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -2,13 +2,15 @@
 use warnings;
 
 package TestAppPathBug;
-
+use strict;
+use warnings;
 use Catalyst;
 
 our $VERSION = '0.01';
 
 __PACKAGE__->config( name => 'TestAppPathBug', root => '/some/dir' );
 
+__PACKAGE__->log(TestAppPathBug::Log->new);
 __PACKAGE__->setup;
 
 sub foo : Path {
@@ -16,4 +18,11 @@
     $c->res->body( 'This is the foo method.' );
 }
 
+package TestAppPathBug::Log;
+use strict;
+use warnings;
+use base qw/Catalyst::Log/;
+
+sub warn {}
+
 1;

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPluginWithConstructor/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPluginWithConstructor/Controller/Root.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPluginWithConstructor/Controller/Root.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,12 @@
+package TestAppPluginWithConstructor::Controller::Root;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+sub foo : Local {
+    my ($self, $c) = @_;
+    $c->res->body('foo');
+}
+
+1;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPluginWithConstructor.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPluginWithConstructor.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppPluginWithConstructor.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -6,11 +6,6 @@
 use Moose;
 BEGIN { extends qw/Catalyst Catalyst::Controller/ } # Ewww, FIXME.
 
-sub foo : Local {
-    my ($self, $c) = @_;
-    $c->res->body('foo');
-}
-
 __PACKAGE__->setup;
 our $MODIFIER_FIRED = 0;
 

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppStats/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppStats/Controller/Root.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppStats/Controller/Root.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,16 @@
+package TestAppStats::Controller::Root;
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+# Return log messages from previous request
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->stats->profile("test");
+    $c->res->body(join("\n", @TestAppStats::log_messages));
+    @TestAppStats::log_messages = ();
+}
+
+1;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppStats.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppStats.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestAppStats.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -16,16 +16,8 @@
 
 __PACKAGE__->setup;
 
-# Return log messages from previous request
-sub default : Private {
-    my ( $self, $c ) = @_;
-    $c->stats->profile("test");
-    $c->res->body(join("\n", @log_messages));
-    @log_messages = ();
-}
-
 package TestAppStats::Log;
 use base qw/Catalyst::Log/;
 
-sub info { push(@log_messages, @_); }
-sub debug { push(@log_messages, @_); }
+sub info { push(@TestAppStats::log_messages, @_); }
+sub debug { push(@TestAppStats::log_messages, @_); }

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestPluginWithConstructor.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestPluginWithConstructor.pm	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/lib/TestPluginWithConstructor.pm	2009-09-15 19:17:41 UTC (rev 11364)
@@ -1,11 +1,17 @@
 # See t/plugin_new_method_backcompat.t
-package TestPluginWithConstructor;
+package Class::Accessor::Fast;
 use strict;
 use warnings;
+
 sub new {
     my $class = shift;
     return bless $_[0], $class;
 }
 
+package TestPluginWithConstructor;
+use strict;
+use warnings;
+use base qw/Class::Accessor::Fast/;
+
 1;
 

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/optional_http-server-restart.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/optional_http-server-restart.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/optional_http-server-restart.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -45,10 +45,11 @@
 my $port = 30000 + int rand( 1 + 10000 );
 
 my( $server, $pid );
-$pid = open3( undef, $server, undef,
-  $^X, "-I$FindBin::Bin/../lib",
+my @cmd = ($^X, "-I$FindBin::Bin/../lib", "-I$FindBin::Bin/lib",
   "$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl", '-port',
-  $port, '-restart' )
+  $port, '-restart');
+
+$pid = open3( undef, $server, undef, @cmd )
     or die "Unable to spawn standalone HTTP server: $!";
 
 # switch to non-blocking reads so we can fail
@@ -67,11 +68,9 @@
     "$FindBin::Bin/../t/tmp/TestApp/lib/TestApp.pm",
     "$FindBin::Bin/../t/tmp/TestApp/lib/TestApp/Controller/Action/Begin.pm",
     "$FindBin::Bin/../t/tmp/TestApp/lib/TestApp/Controller/Immutable.pm",
+    "$FindBin::Bin/../t/tmp/TestApp/lib/TestApp/Controller/Immutable/HardToReload.pm",
 );
 
-push(@files, "$FindBin::Bin/../t/tmp/TestApp/lib/TestApp/Controller/Immutable/HardToReload.pm")
-    if Catalyst::Engine::HTTP::Restarter::Watcher::DETECT_PACKAGE_COMPILATION();
-
 # change some files and make sure the server restarts itself
 NON_ERROR_RESTART:
 for ( 1 .. 20 ) {
@@ -84,7 +83,6 @@
     # give the server time to notice the change and restart
     my $count = 0;
     my $line;
-
     while ( ( $line || '' ) !~ /can connect/ ) {
         # wait for restart message
         $line = $server->getline;

Deleted: Catalyst-Runtime/5.80/branches/exception_interface/t/optional_http-server.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/optional_http-server.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/optional_http-server.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -1,98 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More;
-BEGIN {
-    plan skip_all => 'set TEST_HTTP to enable this test' unless $ENV{TEST_HTTP};
-}
-
-use File::Path;
-use FindBin;
-use IPC::Open3;
-use IO::Socket;
-
-eval "use Catalyst::Devel 1.0";
-plan skip_all => 'Catalyst::Devel required' if $@;
-eval "use File::Copy::Recursive";
-plan skip_all => 'File::Copy::Recursive required' if $@;
-plan tests => 1;
-
-# Run a single test by providing it as the first arg
-my $single_test = shift;
-
-my $tmpdir = "$FindBin::Bin/../t/tmp";
-
-# clean up
-rmtree $tmpdir if -d $tmpdir;
-
-# create a TestApp and copy the test libs into it
-mkdir $tmpdir;
-chdir $tmpdir;
-system( $^X, "-I$FindBin::Bin/../lib", "$FindBin::Bin/../script/catalyst.pl", 'TestApp' );
-chdir "$FindBin::Bin/..";
-File::Copy::Recursive::dircopy( 't/lib', 't/tmp/TestApp/lib' );
-
-# remove TestApp's tests
-rmtree 't/tmp/TestApp/t';
-
-# spawn the standalone HTTP server
-my $port = 30000 + int rand(1 + 10000);
-my $pid = open3( undef, my $server, undef,
-  $^X, "-I$FindBin::Bin/../lib",
-  "$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl", '-port', $port )
-    or die "Unable to spawn standalone HTTP server: $!";
-
-# wait for it to start
-print "Waiting for server to start...\n";
-while ( check_port( 'localhost', $port ) != 1 ) {
-    sleep 1;
-}
-
-# run the testsuite against the HTTP server
-$ENV{CATALYST_SERVER} = "http://localhost:$port";
-
-my $return;
-if ( $single_test ) {
-    $return = system( "$^X -Ilib/ $single_test" );
-}
-else {
-    $return = prove( '-r', '-Ilib/', glob('t/aggregate/live_*.t') );
-}
-
-# shut it down
-kill 'INT', $pid;
-close $server;
-
-# clean up
-rmtree "$FindBin::Bin/../t/tmp" if -d "$FindBin::Bin/../t/tmp";
-
-is( $return, 0, 'live tests' );
-
-sub check_port {
-    my ( $host, $port ) = @_;
-
-    my $remote = IO::Socket::INET->new(
-        Proto    => "tcp",
-        PeerAddr => $host,
-        PeerPort => $port
-    );
-    if ($remote) {
-        close $remote;
-        return 1;
-    }
-    else {
-        return 0;
-    }
-}
-
-sub prove {
-    if (!(my $pid = fork)) {
-        require App::Prove;
-        my $prove = App::Prove->new;
-        $prove->process_args(@_);
-        exit( $prove->run ? 0 : 1 );
-    } else {
-        waitpid $pid, 0;
-        return $?;
-    }
-}

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_controller_actions.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_controller_actions.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_controller_actions.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,26 @@
+use strict;
+use warnings;
+use Test::More tests => 4;
+
+use Catalyst ();
+{
+    package TestController;
+    use Moose;
+    BEGIN { extends 'Catalyst::Controller' }
+
+    sub action : Local {}
+
+    sub foo : Path {}
+
+    no Moose;
+}
+
+my $mock_app = Class::MOP::Class->create_anon_class( superclasses => ['Catalyst'] );
+my $app = $mock_app->name->new;
+my $controller = TestController->new($app, {actions => { foo => { Path => '/some/path' }}});
+
+ok $controller->can('_controller_actions');
+is_deeply $controller->_controller_actions => { foo => { Path => '/some/path' }};
+is_deeply $controller->{actions} => { foo => { Path => '/some/path' }}; # Back compat.
+is_deeply [ sort grep { ! /^_/ } map { $_->name } $controller->get_action_methods ], [sort qw/action foo/];
+

Added: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_action.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_action.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_action.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -0,0 +1,54 @@
+use Test::More tests => 6;
+use strict;
+use warnings;
+use Moose::Meta::Class;
+#use Moose::Meta::Attribute;
+use Catalyst::Request;
+
+use_ok('Catalyst::Action');
+
+my $action_1 = Catalyst::Action->new(
+  name => 'foo',
+  code => sub { "DUMMY" },
+  reverse => 'bar/foo',
+  namespace => 'bar',
+  attributes => {
+    Args => [ 1 ],
+    attr2 => [ 2 ],
+  },
+);
+
+my $action_2 = Catalyst::Action->new(
+  name => 'foo',
+  code => sub { "DUMMY" },
+  reverse => 'bar/foo',
+  namespace => 'bar',
+  attributes => {
+    Args => [ 2 ],
+    attr2 => [ 2 ],
+  },
+);
+
+is("${action_1}", $action_1->reverse, 'overload string');
+is($action_1->(), 'DUMMY', 'overload code');
+
+my $anon_meta = Moose::Meta::Class->create_anon_class(
+  attributes => [
+    Moose::Meta::Attribute->new(
+      request => (
+        reader => 'request',
+        required => 1,
+        default => sub { Catalyst::Request->new(arguments => [qw/one two/]) },
+      ),
+    ),
+  ],
+  methods => { req => sub { shift->request(@_) } }
+);
+
+my $mock_c = $anon_meta->new_object();
+$mock_c->request;
+
+ok(!$action_1->match($mock_c), 'bad match fails');
+ok($action_2->match($mock_c), 'good match works');
+
+ok($action_2->compare( $action_1 ), 'compare works');

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_classdata.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_classdata.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_classdata.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -100,3 +100,7 @@
 is(refaddr(ClassDataTest->_scalarref), refaddr($scalarref3));
 is(refaddr(ClassDataTest->_coderef), refaddr($coderef3));
 is(ClassDataTest->_scalar, $scalar3);
+
+my $i = bless {}, 'ClassDataTest';
+$i->_scalar('foo');
+

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_component_loading.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_component_loading.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_component_loading.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -1,7 +1,8 @@
 # 2 initial tests, and 6 per component in the loop below
 # (do not forget to update the number of components in test 3 as well)
 # 5 extra tests for the loading options
-use Test::More tests => 2 + 6 * 24 + 5;
+# One test for components in inner packages
+use Test::More tests => 2 + 6 * 24 + 8 + 1;
 
 use strict;
 use warnings;
@@ -174,6 +175,9 @@
     my \$self = shift->next::method(\@_);
     no strict 'refs';
     *{\__PACKAGE__ . "::whoami"} = sub { return \__PACKAGE__; };
+    *${appclass}::Model::TopLevel::GENERATED::ACCEPT_CONTEXT = sub {
+        return bless {}, 'FooBarBazQuux';
+    };
     \$self;
 }
 
@@ -189,8 +193,10 @@
 package ${appclass}::Model::TopLevel::Nested;
 use base 'Catalyst::Model';
 
+my \$called=0;
 no warnings 'redefine';
-sub COMPONENT { return shift->next::method(\@_); }
+sub COMPONENT { \$called++;return shift->next::method(\@_); }
+sub called { return \$called };
 1;
 
 EOF
@@ -198,5 +204,23 @@
 eval "package $appclass; use Catalyst; __PACKAGE__->setup";
 
 is($@, '', "Didn't load component twice");
+is($appclass->model('TopLevel::Nested')->called,1, 'COMPONENT called once');
 
+ok($appclass->model('TopLevel::Generated'), 'Have generated model');
+is(ref($appclass->model('TopLevel::Generated')), 'FooBarBazQuux',
+    'ACCEPT_CONTEXT in generated inner package fired as expected');
+
+$appclass = "InnerComponent";
+
+{
+  package InnerComponent::Controller::Test;
+  use base 'Catalyst::Controller';
+}
+
+$INC{'InnerComponent/Controller/Test.pm'} = 1;
+
+eval "package $appclass; use Catalyst; __PACKAGE__->setup";
+
+isa_ok($appclass->controller('Test'), 'Catalyst::Controller');
+
 rmtree($libdir);

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_plugin.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_plugin.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_plugin.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -21,6 +21,9 @@
 use PluginTestApp;
 my $logger = Class::MOP::Class->create_anon_class(
     methods => {
+        error => sub {0},
+        debug => sub {0},
+        info => sub {0},
         warn => sub {
             if ($_[1] =~ /plugin method is deprecated/) {
                $warnings++;
@@ -40,6 +43,8 @@
 #         for Catalyst 5.9
 ok( get("/run_time_plugins"),     "get ok" );
 
+local $ENV{CATALYST_DEBUG} = 0;
+
 is( $warnings, 1, '1 warning' );
 
 use_ok 'TestApp';
@@ -56,3 +61,4 @@
 # Faux::Plugin is no longer reported
 is_deeply [ TestApp->registered_plugins ], \@expected,
   'registered_plugins() should only report the plugins for the current class';
+

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -26,12 +26,17 @@
     return $name;
 }
 
-local %ENV; # Don't allow env variables to mess us up.
+local %ENV = %ENV;
 
+# Remove all relevant env variables to avoid accidental fail
+foreach my $name (grep { /^(CATALYST|TESTAPP)/ } keys %ENV) {
+    delete $ENV{$name};
+}
+
 {
-    my $app = build_test_app_with_setup('MyTestDebug', '-Debug');
+    my $app = build_test_app_with_setup('TestAppMyTestDebug', '-Debug');
 
-    ok my $c = MyTestDebug->new, 'Get debug app object';
+    ok my $c = $app->new, 'Get debug app object';
     ok my $log = $c->log, 'Get log object';
     isa_ok $log, 'Catalyst::Log', 'It should be a Catalyst::Log object';
     ok $log->is_warn, 'Warnings should be enabled';
@@ -43,7 +48,7 @@
 }
 
 {
-    my $app = build_test_app_with_setup('MyTestLogParam', '-Log=warn,error,fatal');
+    my $app = build_test_app_with_setup('TestAppMyTestLogParam', '-Log=warn,error,fatal');
 
     ok my $c = $app->new, 'Get log app object';
     ok my $log = $c->log, 'Get log object';
@@ -56,7 +61,7 @@
     ok !$c->debug, 'Catalyst debugging is off';
 }
 {
-    my $app = build_test_app_with_setup('MyTestNoParams');
+    my $app = build_test_app_with_setup('TestAppMyTestNoParams');
 
     ok my $c = $app->new, 'Get log app object';
     ok my $log = $c->log, 'Get log object';
@@ -72,12 +77,12 @@
     methods => { map { $_ => sub { 0 } } qw/debug error fatal info warn/ },
 );
 {
-    package MyTestAppWithOwnLogger;
+    package TestAppWithOwnLogger;
     use base qw/Catalyst/;
     __PACKAGE__->log($log_meta->new_object);
     __PACKAGE__->setup('-Debug');
 }
 
-ok my $c = MyTestAppWithOwnLogger->new, 'Get with own logger app object';
+ok my $c = TestAppWithOwnLogger->new, 'Get with own logger app object';
 ok $c->debug, '$c->debug is true';
 

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup_log.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup_log.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup_log.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -27,10 +27,15 @@
     }
 }
 
-local %ENV; # Ensure blank or someone, somewhere will fail..
+local %ENV = %ENV;
 
+# Remove all relevant env variables to avoid accidental fail
+foreach my $name (grep { /^(CATALYST|TESTAPP)/ } keys %ENV) {
+    delete $ENV{$name};
+}
+
 {
-    my $app = mock_app('TestLogAppParseLevels');
+    my $app = mock_app('TestAppParseLogLevels');
     $app->setup_log('error,warn');
     ok !$app->debug, 'Not in debug mode';
     test_log_object($app->log,
@@ -42,8 +47,9 @@
     );
 }
 {
-    local %ENV = ( CATALYST_DEBUG => 1 );
-    my $app = mock_app('TestLogAppDebugEnvSet');
+    local %ENV = %ENV;
+    $ENV{CATALYST_DEBUG} = 1;
+    my $app = mock_app('TestAppLogDebugEnvSet');
     $app->setup_log('');
     ok $app->debug, 'In debug mode';
     test_log_object($app->log,
@@ -55,8 +61,9 @@
     );
 }
 {
-    local %ENV = ( CATALYST_DEBUG => 0 );
-    my $app = mock_app('TestLogAppDebugEnvUnset');
+    local %ENV = %ENV;
+    $ENV{CATALYST_DEBUG} = 0;
+    my $app = mock_app('TestAppLogDebugEnvUnset');
     $app->setup_log('warn');
     ok !$app->debug, 'Not In debug mode';
     test_log_object($app->log,
@@ -68,7 +75,7 @@
     );
 }
 {
-    my $app = mock_app('TestLogAppEmptyString');
+    my $app = mock_app('TestAppLogEmptyString');
     $app->setup_log('');
     ok !$app->debug, 'Not In debug mode';
     # Note that by default, you get _all_ the log levels turned on
@@ -81,7 +88,7 @@
     );
 }
 {
-    my $app = mock_app('TestLogAppDebugOnly');
+    my $app = mock_app('TestAppLogDebugOnly');
     $app->setup_log('debug');
     ok $app->debug, 'In debug mode';
     test_log_object($app->log,

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup_stats.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup_stats.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_core_setup_stats.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -22,40 +22,46 @@
 sub mock_app {
     my $name = shift;
     %log_messages = (); # Flatten log messages.
-    print "Setting up mock application: $name\n";
     my $meta = Moose->init_meta( for_class => $name );
     $meta->superclasses('Catalyst');
     $meta->add_method('log', sub { $mock_log }); 
     return $meta->name;
 }
 
-local %ENV; # Ensure blank or someone, somewhere will fail..
+local %ENV = %ENV;
 
+# Remove all relevant env variables to avoid accidental fail
+foreach my $name (grep { /^(CATALYST|TESTAPP)/ } keys %ENV) {
+    delete $ENV{$name};
+}
+
 {
-    my $app = mock_app('TestNoStats');
+    my $app = mock_app('TestAppNoStats');
     $app->setup_stats();
     ok !$app->use_stats, 'stats off by default';
 }
 {
-    my $app = mock_app('TestStats');
+    my $app = mock_app('TestAppStats');
     $app->setup_stats(1);
     ok $app->use_stats, 'stats on if you say >setup_stats(1)';
 }
 {
-    my $app = mock_app('TestStatsDebugTurnsStatsOn');
+    my $app = mock_app('TestAppStatsDebugTurnsStatsOn');
     $app->meta->add_method('debug' => sub { 1 });
     $app->setup_stats();
     ok $app->use_stats, 'debug on turns stats on';
 }
 {
-    local %ENV = ( CATALYST_STATS => 1 );
-    my $app = mock_app('TestStatsAppStatsEnvSet');
+    local %ENV = %ENV;
+    $ENV{CATALYST_STATS} = 1;
+    my $app = mock_app('TestAppStatsEnvSet');
     $app->setup_stats();
     ok $app->use_stats, 'ENV turns stats on';
 }
 {
-    local %ENV = ( CATALYST_STATS => 0 );
-    my $app = mock_app('TestStatsAppStatsEnvUnset');
+    local %ENV = %ENV;
+    $ENV{CATALYST_STATS} = 0;
+    my $app = mock_app('TestAppStatsEnvUnset');
     $app->meta->add_method('debug' => sub { 1 });
     $app->setup_stats(1);
     ok !$app->use_stats, 'ENV turns stats off, even when debug on and ->setup_stats(1)';

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_dispatcher_requestargs_restore.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_dispatcher_requestargs_restore.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_dispatcher_requestargs_restore.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -10,43 +10,7 @@
 # executing another action from the dispatcher (i.e. wrapping actions)
 # is present, so that the Authorization::ACL plugin can be re-written
 # to not be full of such crazy shit.
-{
-    package ACLTestApp;
-    use Test::More;
 
-    use strict;
-    use warnings;
-    use MRO::Compat;
-    use Scalar::Util ();
-
-    use base qw/Catalyst Catalyst::Controller/;
-    use Catalyst qw//;
-
-    sub execute {
-        my $c = shift;
-        my ( $class, $action ) = @_;
-
-        if ( Scalar::Util::blessed($action)
-            and $action->name ne "foobar" ) {
-              eval { $c->detach( 'foobar', [$action, 'foo'] ) };
-        }
-
-        $c->next::method( @_ );
-    }
-
-    sub foobar : Private {
-        die $Catalyst::DETACH;
-    }
-
-    sub gorch : Local {
-        my ( $self, $c, $frozjob ) = @_;
-        is $frozjob, 'wozzle';
-        $c->res->body("gorch");
-    }
-
-    __PACKAGE__->setup;
-}
-
 use strict;
 use warnings;
 use FindBin qw/$Bin/;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_metaclass_compat_non_moose_controller.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_metaclass_compat_non_moose_controller.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_metaclass_compat_non_moose_controller.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -1,23 +1,12 @@
-use Catalyst ();
+use strict;
+use warnings;
 
-{
-    package TestApp;
-    use base qw/Catalyst/;
-}
-{
-    package TestApp::Controller::Base;
-    use base qw/Catalyst::Controller/;
-}
-{
-    package TestApp::Controller::Other;
-    use base qw/TestApp::Controller::Base/;
-}
+use FindBin;
+use lib "$FindBin::Bin/lib";
 
-TestApp->setup_component('TestApp::Controller::Other');
-TestApp->setup_component('TestApp::Controller::Base');
-
 use Test::More tests => 1;
 use Test::Exception;
+use TestAppNonMooseController;
 
 # Metaclass init order causes fail.
 # There are TODO tests in Moose for this, see
@@ -25,6 +14,6 @@
 # after which the evil kludge in core can die in a fire.
 
 lives_ok {
-    TestApp::Controller::Base->get_action_methods
+    TestAppNonMooseController::ControllerBase->get_action_methods
 } 'Base class->get_action_methods ok when sub class initialized first';
 

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/unit_stats.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/unit_stats.t	2009-09-14 18:37:25 UTC (rev 11363)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/unit_stats.t	2009-09-15 19:17:41 UTC (rev 11364)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 12;
+use Test::More tests => 13;
 use Time::HiRes qw/gettimeofday/;
 use Tree::Simple;
 
@@ -19,6 +19,8 @@
     my $stats = Catalyst::Stats->new;
     is (ref($stats), "Catalyst::Stats", "new");
 
+    is_deeply([ $stats->created ], [0, 0], "created time");
+
     my @expected; # level, string, time
 
     $fudge_t[0] = 1;




More information about the Catalyst-commits mailing list