[Catalyst-commits] r13115 - in Catalyst-Runtime/5.80/branches/refactoring_dispatcher: . lib lib/Catalyst lib/Catalyst/DispatchType lib/Catalyst/Engine lib/Catalyst/Exception lib/Catalyst/Script script t t/aggregate t/author t/lib t/lib/Catalyst t/lib/Catalyst/Plugin/Test t/lib/Catalyst/Script t/lib/ScriptTestApp t/lib/ScriptTestApp/Script t/lib/TestApp/Action t/lib/TestApp/Controller t/lib/TestApp/Controller/Action t/lib/TestApp/Controller/Action/Chained t/lib/TestApp/Model t/lib/TestAppEncoding t/lib/TestAppEncoding/Controller

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Wed Mar 31 18:20:10 GMT 2010


Author: t0m
Date: 2010-03-31 19:20:10 +0100 (Wed, 31 Mar 2010)
New Revision: 13115

Added:
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Basic.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Interface.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/CGI.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Create.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/FastCGI.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Server.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Test.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ScriptRole.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ScriptRunner.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/c3_appclass_bug.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/c3_mro.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/caf_backcompat.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/catalyst_test_utf8.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/custom_live_component_controller_action_auto_doublebug.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/custom_live_path_bug.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/deprecated_test_import.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/error_page_dump.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/meta_method_unneeded.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_actions.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_config.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_namespace.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_action.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_classdata.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_generating.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_loading.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_mro.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_cgi-prepare_path.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_fixenv-iis6.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_fixenv-lighttpd.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_log.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_merge_config_hashes.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_mvc.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_path_to.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_plugin.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_cgi.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_create.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_fastcgi.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_help.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_server.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_test.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_scriptrunner.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup_log.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup_stats.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_with.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_dispatcher_requestargs_restore.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_load_catalyst_test.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_extend_non_moose_controller.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_non_moose.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_non_moose_controller.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_response.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_env_value.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_prefix.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_request.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/utf8_content_length.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/http-server.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/notabs.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/pod.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/podcoverage.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/Bar.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/Baz.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/CompileTest.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/Bar.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/CompileTest.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/Foo.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Action/TestExtraArgsAction.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Chained/CaptureArgs.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Model/Generating.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppEncoding.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppEncoding/
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppEncoding/Controller/
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppEncoding/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppToTestScripts.pm
Removed:
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/02pod.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/03podcoverage.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/04critic.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/optional_http-server.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/c3_appclass_bug.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/c3_mro.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/caf_backcompat.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_live_component_controller_action_auto_doublebug.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_live_path_bug.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/meta_method_unneeded.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_actions.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_config.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_namespace.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_action.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_classdata.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component_loading.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component_mro.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_engine_fixenv-iis6.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_engine_fixenv-lighttpd.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_log.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_merge_config_hashes.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_mvc.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_path_to.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_plugin.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup_log.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup_stats.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_uri_for.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_uri_with.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_dispatcher_requestargs_restore.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_load_catalyst_test.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_extend_non_moose_controller.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_non_moose.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_non_moose_controller.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_response.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_env_value.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_prefix.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_request.t
Modified:
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/Changes
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/Makefile.PL
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/TODO
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Component.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Controller.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/DispatchType/Chained.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/DispatchType/Index.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Dispatcher.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/CGI.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/FastCGI.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/HTTP.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Detach.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Go.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ROADMAP.pod
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Request.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Response.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Runtime.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Test.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Upgrading.pod
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Utils.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/script/catalyst.pl
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_component_controller_action_action.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_component_controller_action_chained.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_engine_request_escaped_path.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for_action.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for_multibytechar.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_exception_class_simple.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/deprecated.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Plugin/Test/Deprecated.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Plugin/Test/Plugin.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Action.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Chained.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppDoubleAutoBug.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppPluginWithConstructor.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppStats.pm
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/live_component_controller_context_closure.t
   Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/live_fork.t
Log:
 r11796 at t0mlaptop (orig r11761):  t0m | 2009-11-05 00:11:15 +0000
 Need newer LWP for tests to pass as suggested on list by Jose Luis Martinez
 r11811 at t0mlaptop (orig r11776):  altreus | 2009-11-06 17:09:51 +0000
 Add doc for no-args call to ->uri_for
 r11813 at t0mlaptop (orig r11778):  dhoss | 2009-11-06 17:13:27 +0000
 fixed options passed to devel server so that author tests pass
 r11814 at t0mlaptop (orig r11779):  altreus | 2009-11-06 17:14:49 +0000
 Amend doc to not mention using undef in ->uri_for
 r11816 at t0mlaptop (orig r11781):  t0m | 2009-11-07 16:50:59 +0000
 Back out change from -port to -l - svn merge -r 11778:11777
 r11823 at t0mlaptop (orig r11788):  rafl | 2009-11-09 22:21:19 +0000
 Make request->body fail when used as a writer.
 r11824 at t0mlaptop (orig r11789):  t0m | 2009-11-10 19:51:33 +0000
 Fix changelog, me--
 r11825 at t0mlaptop (orig r11790):  t0m | 2009-11-10 19:56:09 +0000
 Warn on case_sensitive being set, remove documentation
 r11827 at t0mlaptop (orig r11792):  t0m | 2009-11-10 21:36:06 +0000
 Return 1, only currently works by chance
 r11828 at t0mlaptop (orig r11793):  t0m | 2009-11-10 21:37:26 +0000
 Also retarded
 r11829 at t0mlaptop (orig r11794):  t0m | 2009-11-10 21:41:27 +0000
 And lets not change behaviour with the log flush change..
 r11836 at t0mlaptop (orig r11801):  t0m | 2009-11-12 01:12:05 +0000
 Bring the changelog up to date.
 r11839 at t0mlaptop (orig r11804):  t0m | 2009-11-12 01:44:46 +0000
  r11462 at t0mlaptop (orig r11432):  rafl | 2009-09-27 16:06:26 +0100
  More aggregated tests.
  r11463 at t0mlaptop (orig r11433):  rafl | 2009-09-27 16:06:36 +0100
  Fix a couple of aggregation warnings.
  r11464 at t0mlaptop (orig r11434):  rafl | 2009-09-27 16:06:51 +0100
  More aggregation.
  r11465 at t0mlaptop (orig r11435):  rafl | 2009-09-27 16:28:04 +0100
  Make things run again with aggregation disabled.
  r11838 at t0mlaptop (orig r11803):  t0m | 2009-11-12 01:39:56 +0000
  Patch up changes to tests into new location. This merges parts of the following commits which were missed by svk:
  
  -r11456:11457 http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.80/trunk
  -r11467:11468 http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.80/trunk
  
 
 r11841 at t0mlaptop (orig r11806):  bricas | 2009-11-12 17:58:02 +0000
 remove duplicate changelog entry
 r11847 at t0mlaptop (orig r11812):  t0m | 2009-11-12 23:57:15 +0000
  r11668 at t0mlaptop (orig r11633):  t0m | 2009-10-19 17:53:27 +0100
  Branch for uri encoding things in uri_for in some way that means you can round trip path parts like '24/7', but without totally breaking backward compatibility this time hopefully.
  
  r11669 at t0mlaptop (orig r11634):  t0m | 2009-10-19 17:54:08 +0100
  Well, this fixes my current issue, and doesn't seem to break any tests.. This likely means that the tests are still shit
  r11769 at t0mlaptop (orig r11734):  t0m | 2009-11-04 19:17:33 +0000
  Needed for authors to run optional http test
  r11833 at t0mlaptop (orig r11798):  t0m | 2009-11-12 00:22:06 +0000
  Tests, fix args as well as captureargs and be less violent - only encode /
  r11840 at t0mlaptop (orig r11805):  rafl | 2009-11-12 16:08:57 +0000
  trailing whitespace
  r11843 at t0mlaptop (orig r11808):  t0m | 2009-11-12 23:41:17 +0000
  Tidy up a bit
  r11845 at t0mlaptop (orig r11810):  t0m | 2009-11-12 23:46:28 +0000
  Changelog
  r11846 at t0mlaptop (orig r11811):  t0m | 2009-11-12 23:56:36 +0000
  Don't fail the live tests by only looking for http://localhost/etc..
 
 r11858 at t0mlaptop (orig r11823):  t0m | 2009-11-14 17:26:04 +0000
 Pod patch
 r11860 at t0mlaptop (orig r11825):  t0m | 2009-11-14 17:30:26 +0000
 Pod fixes re RT#51489
 r11914 at t0mlaptop (orig r11879):  rafl | 2009-11-17 23:00:32 +0000
 Merge branch 'exception_interface'
 
 * exception_interface:
   Use MooseX::Role::WithOverloading.
   Add Exception::Interface and Exception::Basic. Make ::Base, ::Go and ::Detach use them.
   Create branch exception_interface
 r11953 at t0mlaptop (orig r11918):  t0m | 2009-11-19 21:58:59 +0000
 Add Pod for all the new exception classes
 r11954 at t0mlaptop (orig r11919):  t0m | 2009-11-19 22:00:27 +0000
 Rename http server test as it is not optional for authors
 r11978 at t0mlaptop (orig r11943):  rafl | 2009-11-20 06:22:44 +0000
 Fix a doc typo.
 
 Also trim some trailing whitespace.
 r11979 at t0mlaptop (orig r11944):  rafl | 2009-11-20 06:22:51 +0000
 Remove some docs for Exception::Go and ::Detach.
 
 Users really shouldn't care.
 r11980 at t0mlaptop (orig r11945):  rafl | 2009-11-20 07:05:08 +0000
 Depend on MX::Role::WithOverloading 0.03 to make sure things work out on 5.8.8 and older.
 r11986 at t0mlaptop (orig r11951):  rafl | 2009-11-21 01:30:07 +0000
 Remove duplicate changelog entry.
 r11987 at t0mlaptop (orig r11952):  rafl | 2009-11-21 01:43:12 +0000
 Improve Exception::Interface docs.
 r11988 at t0mlaptop (orig r11953):  rafl | 2009-11-21 01:43:28 +0000
 More changelogging.
 r11989 at t0mlaptop (orig r11954):  rafl | 2009-11-21 01:43:57 +0000
 Refer to the right ticket in Changes.
 r11990 at t0mlaptop (orig r11955):  rafl | 2009-11-21 02:31:02 +0000
 Version 5.80014.
 r11996 at t0mlaptop (orig r11961):  zby | 2009-11-21 13:03:43 +0000
 warning for plugins inheriting from Catayst::Component
 r11998 at t0mlaptop (orig r11963):  t0m | 2009-11-22 12:57:30 +0000
 Chop out that crap, not needed
 r11999 at t0mlaptop (orig r11964):  t0m | 2009-11-22 13:01:09 +0000
 Do not be @ISA Controller, that's hideous dumb and now warns
 r12000 at t0mlaptop (orig r11965):  t0m | 2009-11-22 13:01:48 +0000
 Do not use NEXT, like it says in the comments
 r12001 at t0mlaptop (orig r11966):  t0m | 2009-11-22 13:04:50 +0000
 Fix unicode issues in CGI and FastCGI engines
 r12002 at t0mlaptop (orig r11967):  t0m | 2009-11-22 13:08:47 +0000
 Changelog, adjust warning text, bump versions for a dev release. The 'we do get Class::C3::Adopt::NEXT warnings test is now broken, no idea why, will look later.
 r12003 at t0mlaptop (orig r11968):  t0m | 2009-11-22 19:42:30 +0000
 Different phrasing for different versions
 r12004 at t0mlaptop (orig r11969):  t0m | 2009-11-22 19:53:00 +0000
 Whoops, fix typo
 r12005 at t0mlaptop (orig r11970):  t0m | 2009-11-22 19:58:31 +0000
 It actually wants 'true', make that more explicit
 r12006 at t0mlaptop (orig r11971):  t0m | 2009-11-22 19:59:04 +0000
 release 5.80014_01
 r12008 at t0mlaptop (orig r11973):  t0m | 2009-11-22 20:08:28 +0000
 Notabs is author only
 r12009 at t0mlaptop (orig r11974):  t0m | 2009-11-22 20:11:17 +0000
 Pod tests are also author only
 r12010 at t0mlaptop (orig r11975):  t0m | 2009-11-22 20:13:06 +0000
 Changelog
 r12013 at t0mlaptop (orig r11978):  t0m | 2009-11-23 21:25:19 +0000
 Don't do bytes::length, just use length, tests to demonstrate the issue
 r12014 at t0mlaptop (orig r11979):  t0m | 2009-11-23 21:45:55 +0000
 Nasty hack for fastcgi, fixes gitalist
 r12021 at t0mlaptop (orig r11986):  t0m | 2009-11-23 22:57:40 +0000
 Have a new conflict statement
 r12035 at t0mlaptop (orig r12000):  t0m | 2009-11-24 09:50:07 +0000
 Trivial Pod fixes
 r12055 at t0mlaptop (orig r12020):  t0m | 2009-11-26 01:07:08 +0000
 Remove test spraff
 r12057 at t0mlaptop (orig r12022):  t0m | 2009-11-26 01:21:22 +0000
 Back out 11979 until I work out why IPC::Run is getting hold of the FCGI file handle
 r12070 at t0mlaptop (orig r12035):  t0m | 2009-11-26 21:29:32 +0000
 Fix test on bleadperl RT#52100
 r12095 at t0mlaptop (orig r12060):  gshank | 2009-11-27 22:43:11 +0000
 testcase for Chained bug - dispatches to wrong action
 
 r12108 at t0mlaptop (orig r12073):  rafl | 2009-11-29 16:43:17 +0000
 Depend on a recent leakchecker to stop everything from crapping over itself if PadWalker is too old.
 r12110 at t0mlaptop (orig r12075):  t0m | 2009-11-29 17:16:40 +0000
  r11583 at nc10 (orig r10642):  dhoss | 2009-06-24 22:18:13 +0100
  created better scripts branch
  
  r11584 at nc10 (orig r10643):  dhoss | 2009-06-24 22:21:03 +0100
  initial script commit
  
  r11585 at nc10 (orig r10644):  dhoss | 2009-06-24 23:56:42 +0100
  initial ScriptRunner checkin
  
  r11588 at nc10 (orig r10647):  dhoss | 2009-06-25 01:54:12 +0100
  added a test application to get the new scripts working
  created Catalyst::ScriptRunner, Catalyst::Script::*
  got Catalyst::Script::FastCGI running
  wrote a test for Catalyst::Script::FastCGI, but it fails for some reason
  
  r11590 at nc10 (orig r10649):  dhoss | 2009-06-25 02:10:57 +0100
  added dev_server test, poked Catalyst::Script::Create
  
  r11591 at nc10 (orig r10650):  dhoss | 2009-06-25 02:21:18 +0100
  fixed test server, blech
  
  r11592 at nc10 (orig r10651):  dhoss | 2009-06-25 02:28:41 +0100
  pulled crap out of testapp_server
  
  r11593 at nc10 (orig r10652):  dhoss | 2009-06-25 02:41:39 +0100
  fixed server start
  
  r11594 at nc10 (orig r10653):  dhoss | 2009-06-25 03:03:00 +0100
  fixed Server and testapp_server.pl. Test still wonky
  
  r11595 at nc10 (orig r10654):  dhoss | 2009-06-25 03:15:18 +0100
  poked at t/start_dev_server.t
  corrected Server to start with HTTP not CGI
  
  r11597 at nc10 (orig r10656):  dhoss | 2009-06-25 03:30:41 +0100
  updated testapp_cgi.pl
  updated CGI
  
  r11598 at nc10 (orig r10657):  dhoss | 2009-06-25 04:11:14 +0100
  added more to Test, added testapp_test, and worked on start_fcgi
  
  r11604 at nc10 (orig r10663):  dhoss | 2009-06-25 11:37:12 +0100
  updated Makefil.PL
  
  r11624 at nc10 (orig r10683):  dhoss | 2009-06-26 20:46:17 +0100
  updated so that if their class doesn't load, we use ours.
  
  r11650 at nc10 (orig r10709):  dhoss | 2009-06-28 21:33:41 +0100
  added name to contributors list
  
  r11660 at nc10 (orig r10719):  t0m | 2009-06-29 00:12:11 +0100
  Kind of, sort of make the server work, except it doesn't
  r11685 at nc10 (orig r10744):  dhoss | 2009-06-30 19:28:47 +0100
  fixed Server
  
  r11726 at nc10 (orig r10785):  dhoss | 2009-07-04 01:41:40 +0100
  help option now has a short option
  
  r11727 at nc10 (orig r10786):  dhoss | 2009-07-04 01:44:15 +0100
  fork now has a short option
  
  r11728 at nc10 (orig r10787):  dhoss | 2009-07-04 01:45:19 +0100
  listen now has a short option
  
  r11729 at nc10 (orig r10788):  dhoss | 2009-07-04 01:49:39 +0100
  doez haz pidfile short opt
  
  r11730 at nc10 (orig r10789):  dhoss | 2009-07-04 01:51:12 +0100
  doez haz keepalive short opt
  
  r11731 at nc10 (orig r10790):  dhoss | 2009-07-04 01:51:35 +0100
  changed pf => pid
  
  r11732 at nc10 (orig r10791):  dhoss | 2009-07-04 01:53:16 +0100
  background now has a short opshun
  
  r11733 at nc10 (orig r10792):  dhoss | 2009-07-04 01:54:29 +0100
  restart has short option
  
  r11734 at nc10 (orig r10793):  dhoss | 2009-07-04 01:56:16 +0100
  restart_delay HAZ OPSHUN
  
  r11735 at nc10 (orig r10794):  dhoss | 2009-07-04 01:57:11 +0100
  restart regex has a short option
  
  r11736 at nc10 (orig r10795):  dhoss | 2009-07-04 01:58:02 +0100
  follow_symlinks has short option
  
  r11737 at nc10 (orig r10796):  dhoss | 2009-07-04 03:01:44 +0100
  Updated testapp_server
  broke Script::Server, why?!
  
  r11738 at nc10 (orig r10797):  dhoss | 2009-07-04 03:57:13 +0100
  added namespace::autoclean to all the helper classes
  removed a redundant use Catalyst::Engine::HTTP
  
  r11739 at nc10 (orig r10798):  dhoss | 2009-07-04 04:25:25 +0100
  added warn to setup. sigh. doesn't appear it's getting called, unless 
  i'm way off.
  
  r11740 at nc10 (orig r10799):  dhoss | 2009-07-04 04:27:41 +0100
  untarded!
  
  r11741 at nc10 (orig r10800):  dhoss | 2009-07-04 04:28:15 +0100
  really untarded
  
  r11778 at nc10 (orig r10837):  dhoss | 2009-07-11 00:27:12 +0100
  removed except meta stuff since we're using autoclean
  
  r11779 at nc10 (orig r10838):  dhoss | 2009-07-11 01:06:53 +0100
  fixed Catalyst::Script::Server so app doesn't have to be a cmd line opt
  
  r11780 at nc10 (orig r10839):  dhoss | 2009-07-11 01:14:43 +0100
  removed all required => 0
  
  r11781 at nc10 (orig r10840):  dhoss | 2009-07-11 01:18:23 +0100
  removed "broken" commetn
  
  r11782 at nc10 (orig r10841):  dhoss | 2009-07-11 01:19:41 +0100
  removed debug warn
  
  r11783 at nc10 (orig r10842):  dhoss | 2009-07-11 01:31:58 +0100
  removed default => 0s
  
  r11784 at nc10 (orig r10843):  dhoss | 2009-07-11 01:34:54 +0100
  added debug option
  
  r11785 at nc10 (orig r10844):  dhoss | 2009-07-11 02:50:11 +0100
  fasterized
  
  r11786 at nc10 (orig r10845):  dhoss | 2009-07-11 03:21:41 +0100
  added restarter code
  
  r11787 at nc10 (orig r10846):  dhoss | 2009-07-11 03:24:02 +0100
  fixed follow_symlinks option in restarter code
  
  r11788 at nc10 (orig r10847):  dhoss | 2009-07-11 03:33:44 +0100
  cleaned up sub runner
  
  r11793 at nc10 (orig r10852):  t0m | 2009-07-11 19:10:02 +0100
  Strip trailing spaces
  r11801 at nc10 (orig r10860):  autarch | 2009-07-11 20:32:11 +0100
  Get the restarter running
  r11809 at nc10 (orig r10868):  t0m | 2009-07-12 18:15:09 +0100
  Too slow
  r11810 at nc10 (orig r10869):  t0m | 2009-07-12 18:27:36 +0100
  And unfuck so the app name is passed properly
  r11831 at nc10 (orig r10890):  dhoss | 2009-07-15 22:41:11 +0100
  -d and --debug work for me
  
  r11834 at nc10 (orig r10893):  dhoss | 2009-07-16 10:25:47 +0100
  added Deploy prototype
  
  r11843 at nc10 (orig r10902):  dhoss | 2009-07-17 01:52:56 +0100
  untarded and added documentation
  
  r11844 at nc10 (orig r10903):  dhoss | 2009-07-17 01:53:38 +0100
  don't need  -except => [ qw(meta) ] with autoclean
  
  r11845 at nc10 (orig r10904):  dhoss | 2009-07-17 02:00:54 +0100
  added documentation, surely needs refining
  
  r11846 at nc10 (orig r10905):  dhoss | 2009-07-17 02:01:25 +0100
  removed -except => qw[meta]
  
  r11847 at nc10 (orig r10906):  dhoss | 2009-07-17 02:04:12 +0100
  cleaned up
  
  r11848 at nc10 (orig r10907):  dhoss | 2009-07-17 02:12:07 +0100
  added documentation
  
  r11849 at nc10 (orig r10908):  dhoss | 2009-07-17 02:13:28 +0100
  fasterized
  
  r11850 at nc10 (orig r10909):  dhoss | 2009-07-17 02:15:04 +0100
  added MX::Types::Moose
  
  r11851 at nc10 (orig r10910):  dhoss | 2009-07-17 02:24:44 +0100
  added MX::Types::Moose, cleaned up moar
  
  r11852 at nc10 (orig r10911):  dhoss | 2009-07-17 02:43:29 +0100
  created proof of working app
  
  r11853 at nc10 (orig r10912):  dhoss | 2009-07-17 02:44:07 +0100
  removed proof of working tests
  
  r11966 at nc10 (orig r11025):  dhoss | 2009-08-04 01:00:57 +0100
  removed MooseX::Command::* stuff for now
  
  r11967 at nc10 (orig r11026):  dhoss | 2009-08-04 01:01:43 +0100
  removed MooseX::App::CMD* stuff from ScriptRunner
  
  r11968 at nc10 (orig r11027):  dhoss | 2009-08-04 01:22:27 +0100
  split helper into app generation helper and component generation helper (initial split, at least)
  
  r11976 at nc10 (orig r11035):  dhoss | 2009-08-05 21:07:12 +0100
  had this stuff in the wrong branch, blech
  
  r12162 at nc10 (orig r11221):  dhoss | 2009-08-23 21:32:34 +0100
  added command directory structure for MooseX::App::Cmd
  
  r12236 at nc10 (orig r11295):  t0m | 2009-09-02 01:48:38 +0100
   r11288 at t0mlaptop:  t0m | 2009-09-02 00:26:10 +0100
   Remove unused TestApp
  
  r12237 at nc10 (orig r11296):  t0m | 2009-09-02 01:48:43 +0100
   r11289 at t0mlaptop:  t0m | 2009-09-02 00:33:55 +0100
   Remove DBIC deploy script, this should not be in core runtime
  
  r12238 at nc10 (orig r11297):  t0m | 2009-09-02 01:48:47 +0100
   r11290 at t0mlaptop:  t0m | 2009-09-02 01:09:31 +0100
   Remove empty directories
  
  r12239 at nc10 (orig r11298):  t0m | 2009-09-02 01:48:54 +0100
   r11291 at t0mlaptop:  t0m | 2009-09-02 01:14:00 +0100
   Factor stuff out into a script role, clean up all the script code
  
  r12254 at nc10 (orig r11313):  t0m | 2009-09-05 16:16:00 +0100
   r11320 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 12:38:54 +0100
   Fix passing correct key, re-add getopt trait as this is needed, my bad
  
  r12255 at nc10 (orig r11314):  t0m | 2009-09-05 16:16:04 +0100
   r11321 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 12:42:20 +0100
   Make ScriptRunner include the lib path.
  
  r12256 at nc10 (orig r11315):  t0m | 2009-09-05 16:16:08 +0100
   r11322 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 12:47:39 +0100
   Fix FastCGI script
  
  r12257 at nc10 (orig r11316):  t0m | 2009-09-05 16:16:13 +0100
   r11323 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 12:48:58 +0100
   Fix CGI script
  
  r12258 at nc10 (orig r11317):  t0m | 2009-09-05 16:16:15 +0100
   r11324 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 12:56:01 +0100
   Add a short TODO list to complete before this branch is merged
  
  r12259 at nc10 (orig r11318):  t0m | 2009-09-05 16:16:20 +0100
   r11325 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 12:57:21 +0100
   Default run methods not required, can be provided by the role
  
  r12260 at nc10 (orig r11319):  t0m | 2009-09-05 16:16:25 +0100
   r11326 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 13:00:17 +0100
   Documentation dinks
  
  r12261 at nc10 (orig r11320):  t0m | 2009-09-05 16:16:30 +0100
   r11327 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 13:01:00 +0100
   Gawd, that is out of date
  
  r12262 at nc10 (orig r11321):  t0m | 2009-09-05 16:16:33 +0100
   r11328 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 13:06:34 +0100
   More POD
  
  r12263 at nc10 (orig r11322):  t0m | 2009-09-05 16:16:37 +0100
   r11329 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 13:08:41 +0100
   We need to depend on MX::Types, and ::StashChange not needed any more
  
  r12264 at nc10 (orig r11323):  t0m | 2009-09-05 16:16:41 +0100
   r11330 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 13:09:11 +0100
   We also need autoclean
  
  r12265 at nc10 (orig r11324):  t0m | 2009-09-05 16:16:48 +0100
   r11331 at tomas-dorans-macbook-pro:  t0m | 2009-09-05 13:43:25 +0100
   Basic tests for ScriptRunner, more needed
  
  r12320 at nc10 (orig r11379):  t0m | 2009-09-17 22:47:22 +0100
  Skeleton testapp for testing the args thrown to the run method by scripts
  r12321 at nc10 (orig r11380):  t0m | 2009-09-17 23:10:46 +0100
  Meh, that shows what I mean. This can be done waaaay more elegantly by abstracting the testing logic..
  r12377 at nc10 (orig r11436):  zts | 2009-09-27 20:12:39 +0100
  Further tests for Server script option parsing.
  Also, first pass at abstracting the test logic.  Currently very ugly.
  
  r12402 at nc10 (orig r11461):  t0m | 2009-10-05 23:17:11 +0100
  And start the app correctly(ish) under the restarter - really not sure args are perserved correctly?
  r12908 at nc10 (orig r11777):  dhoss | 2009-11-06 17:12:25 +0000
  fixed dev server options so that test now passes
  r12911 at nc10 (orig r11780):  dhoss | 2009-11-06 17:25:35 +0000
  unfucked test server options and made test pass f'real this time
  r13011 at nc10 (orig r11880):  t0m | 2009-11-18 00:51:29 +0000
  Beat somewhat into shape by comparing the old and new docs. Need to write basic tests for the other scripts.
  r13052 at nc10 (orig r11921):  t0m | 2009-11-19 22:23:58 +0000
  Move to aggregate
  r13053 at nc10 (orig r11922):  t0m | 2009-11-19 23:32:24 +0000
  Unified help display, at the cost of having lost the info about what you fucked up. Neither of these are particularly helpful, but this is at least uniform
  r13054 at nc10 (orig r11923):  t0m | 2009-11-19 23:48:42 +0000
  Cleanup and some moar tests
  r13055 at nc10 (orig r11924):  t0m | 2009-11-20 00:00:02 +0000
  More tests for help, proving it's still bork
  r13056 at nc10 (orig r11925):  t0m | 2009-11-20 00:13:53 +0000
  Basic tests for fcgi script
  r13057 at nc10 (orig r11926):  t0m | 2009-11-20 00:44:35 +0000
  Fix script_test.pl
  r13058 at nc10 (orig r11927):  t0m | 2009-11-20 00:45:13 +0000
  Pass Pod coverage
  r13059 at nc10 (orig r11928):  t0m | 2009-11-20 01:00:24 +0000
  Nested TAP and Test::Aggregate don't play nice together. It was cute, but screw it, sorry zts
  r13060 at nc10 (orig r11929):  t0m | 2009-11-20 01:01:47 +0000
  Fugly test for myapp_test.pl. If someone fancies rewriting the IO redirection to be less gross then I loveyoulongtime
  r13061 at nc10 (orig r11930):  t0m | 2009-11-20 01:07:04 +0000
  Update todo on this branch
  r13123 at nc10 (orig r11992):  t0m | 2009-11-23 23:40:57 +0000
  Fix duplicate short options issue
  r13124 at nc10 (orig r11993):  t0m | 2009-11-23 23:43:32 +0000
  Chomp trailing space
  r13125 at nc10 (orig r11994):  t0m | 2009-11-23 23:49:10 +0000
  And do that in a way which actually works
  r13126 at nc10 (orig r11995):  t0m | 2009-11-23 23:56:49 +0000
  Fix test
  r13127 at nc10 (orig r11996):  t0m | 2009-11-24 00:15:45 +0000
  Add tests for the create script and fix the bugs that this shows up
  r13146 at nc10 (orig r12015):  t0m | 2009-11-25 22:32:11 +0000
  Fix warnings from ScriptRunner
  r13147 at nc10 (orig r12016):  t0m | 2009-11-25 22:51:28 +0000
  Fix big bug in test
  r13148 at nc10 (orig r12017):  t0m | 2009-11-26 00:25:01 +0000
  Get useful help about which option you fucked up back
  r13149 at nc10 (orig r12018):  t0m | 2009-11-26 00:35:31 +0000
  Remove most of the horrible
  r13150 at nc10 (orig r12019):  t0m | 2009-11-26 01:02:52 +0000
  Tidy up help and TODO tests
  r13161 at nc10 (orig r12030):  t0m | 2009-11-26 01:53:20 +0000
  Fix up docs
  r13162 at nc10 (orig r12031):  t0m | 2009-11-26 02:23:00 +0000
  Factor restarter arg assembly out into it's own routine for ease of testing. Use $self->ARGV instead of $ARGV
  r13165 at nc10 (orig r12034):  t0m | 2009-11-26 21:02:57 +0000
  Fix typo, bricas++, add simple test for restarter arguments
  r13175 at nc10 (orig r12044):  t0m | 2009-11-26 23:40:27 +0000
  Pass app name into constructor
  r13185 at nc10 (orig r12054):  t0m | 2009-11-27 02:08:33 +0000
  Bump version in runtime branch
  r13192 at nc10 (orig r12061):  t0m | 2009-11-28 12:38:12 +0000
  Adding the files you need for the tests you've committed helps them pass, idiot :)
  r13194 at nc10 (orig r12063):  rafl | 2009-11-29 14:00:12 +0000
  Depend on a new CMOP because we rely on its new load_class error messages.
  r13195 at nc10 (orig r12064):  rafl | 2009-11-29 14:00:19 +0000
  Make follow_symlinks more consistent with the other restarter args.
  r13196 at nc10 (orig r12065):  rafl | 2009-11-29 14:00:25 +0000
  Properly validate restart regexen.
  r13197 at nc10 (orig r12066):  rafl | 2009-11-29 14:00:31 +0000
  Tidy up some attr definitions.
  r13198 at nc10 (orig r12067):  rafl | 2009-11-29 14:00:38 +0000
  Port numbers need to be > 0.
  r13199 at nc10 (orig r12068):  rafl | 2009-11-29 14:00:43 +0000
  Remove useless lexical.
  r13200 at nc10 (orig r12069):  rafl | 2009-11-29 14:00:51 +0000
  Less trailing whitespace.
  r13201 at nc10 (orig r12070):  rafl | 2009-11-29 15:33:48 +0000
  This is not a release.
  r13202 at nc10 (orig r12071):  rafl | 2009-11-29 15:33:55 +0000
  Tidy things up a little and fix pod usage.
 
 r12121 at t0mlaptop (orig r12086):  t0m | 2009-11-30 22:59:15 +0000
 Require new M::I
 r12126 at t0mlaptop (orig r12091):  t0m | 2009-12-01 00:09:19 +0000
  r12113 at t0mlaptop (orig r12078):  t0m | 2009-11-30 18:25:57 +0000
  Branch for path_info fixes. This may be short lived, but worth doing..
  
  r12114 at t0mlaptop (orig r12079):  t0m | 2009-11-30 18:26:34 +0000
  Commit miyagawa's fix for PATH_INFO decoding. I think that this also implies changes / fixes in the fcgi _fix_env stuff
  r12116 at t0mlaptop (orig r12081):  t0m | 2009-11-30 20:44:16 +0000
  And yea, these test cases now pass
  r12118 at t0mlaptop (orig r12083):  t0m | 2009-11-30 21:02:14 +0000
  I think the nginx hackery can just die with the new code in ::Engine::CGI
  r12119 at t0mlaptop (orig r12084):  t0m | 2009-11-30 22:05:41 +0000
  Back out r12083, also clarify the docs - like this works for me now, and the bottom para seems the wrong way round...?
  r12122 at t0mlaptop (orig r12087):  t0m | 2009-11-30 23:17:33 +0000
  Require new HTTP::Request::AsCGI
  r12124 at t0mlaptop (orig r12089):  t0m | 2009-11-30 23:23:38 +0000
  Rewrite changelog entry to be more complete
 
 r12127 at t0mlaptop (orig r12092):  t0m | 2009-12-01 00:52:57 +0000
 TODO out gshanks chained tests
 r12128 at t0mlaptop (orig r12093):  t0m | 2009-12-01 00:54:23 +0000
 Bump deps and changelog for another dev release with new scripts and scary path resolving changes so I can have another call to test.
 r12135 at t0mlaptop (orig r12100):  t0m | 2009-12-01 02:16:08 +0000
 Fix bug in Catalyst::Engine which could cause it to all go wrong if read returned '0' as per thread on mailing list re 'Wrong Content-Length value' and clarify docs about read and read_chunk methods in Catalyst::Engine
 r12149 at t0mlaptop (orig r12114):  t0m | 2009-12-01 04:19:44 +0000
 The documentation example had the variables the opposite way round to my working nginx config. CLEARLY this meant the documentation needed the variables (but not their values) transposing. Yes, yes - I really am _that_ dumb.
 r12181 at t0mlaptop (orig r12146):  t0m | 2009-12-02 15:10:52 +0000
 Changes, bump version
 r12184 at t0mlaptop (orig r12149):  t0m | 2009-12-02 18:58:14 +0000
 Pod nits, rt#52370
 r12185 at t0mlaptop (orig r12150):  t0m | 2009-12-02 19:13:19 +0000
 And that's what I get for not really applying the patch and doing it manually. Fail..
 r12186 at t0mlaptop (orig r12151):  gshank | 2009-12-02 21:52:21 +0000
 add another failing test for Chained CaptureArgs preference
 
 r12203 at t0mlaptop (orig r12168):  t0m | 2009-12-03 17:15:17 +0000
 I can't stand the over-long debug screens any more. Suggestions on how to do this in a less gross way?
 r12244 at t0mlaptop (orig r12209):  t0m | 2009-12-06 12:47:59 +0000
 Win32 fix, kmx++
 r12245 at t0mlaptop (orig r12210):  t0m | 2009-12-06 13:04:50 +0000
 Skip on win32, hopefully we'll get a better answer than this, but lets stop failing
 r12253 at t0mlaptop (orig r12218):  rafl | 2009-12-06 16:31:52 +0000
 Undocument $request->user.
 r12254 at t0mlaptop (orig r12219):  autarch | 2009-12-06 18:44:36 +0000
 Add restartdirectory as alias for restart_directory, for backcompat
 
 r12255 at t0mlaptop (orig r12220):  autarch | 2009-12-06 18:48:34 +0000
 fix pod for Server script so options match actual attr name
 r12257 at t0mlaptop (orig r12222):  autarch | 2009-12-06 18:50:57 +0000
 Doc change for --restartdirectory
 
 r12260 at t0mlaptop (orig r12225):  kmx | 2009-12-06 20:11:43 +0000
 Win32 fix: reverting commit 12210 (after a discussion with t0m) - all tests pass on Win32/strawberry perl 5.8.9 and 5.10.1
 r12287 at t0mlaptop (orig r12252):  autarch | 2009-12-08 05:38:40 +0000
 Don't default to localhost for --host
 
 Tweak docs for --host to say it accepts a name or IP
 
 r12288 at t0mlaptop (orig r12253):  autarch | 2009-12-08 05:39:25 +0000
 Doc --host change
 
 r12291 at t0mlaptop (orig r12256):  t0m | 2009-12-08 11:16:44 +0000
 Fix tests from r12252, add comments to make the behavior explicit
 r12306 at t0mlaptop (orig r12271):  t0m | 2009-12-09 18:30:53 +0000
 Regression for 5.80015 when rewriting an app, nanonyme++, Khisanth++
 r12311 at t0mlaptop (orig r12276):  t0m | 2009-12-09 20:21:13 +0000
 Fixes port environment, RT#52604
 r12312 at t0mlaptop (orig r12277):  t0m | 2009-12-09 20:35:13 +0000
 And more tests and fixing for the same thing
 r12313 at t0mlaptop (orig r12278):  t0m | 2009-12-09 20:50:18 +0000
 Changelog
 r12314 at t0mlaptop (orig r12279):  t0m | 2009-12-09 20:54:53 +0000
 More tests for the prepare_path thing, fix said tests, changelog
 r12316 at t0mlaptop (orig r12281):  t0m | 2009-12-09 21:36:13 +0000
 Additional test
 r12325 at t0mlaptop (orig r12290):  t0m | 2009-12-10 09:46:10 +0000
 Fix RT#52630
 r12342 at t0mlaptop (orig r12307):  t0m | 2009-12-11 12:44:55 +0000
 Unfuck that as well
 r12350 at t0mlaptop (orig r12315):  t0m | 2009-12-11 23:25:35 +0000
 Remove warning when running tests aggregated
 r12351 at t0mlaptop (orig r12316):  t0m | 2009-12-11 23:26:08 +0000
 Changelog, bump version
 r12352 at t0mlaptop (orig r12317):  rafl | 2009-12-11 23:28:09 +0000
 moar better warnings fix.
 r12422 at t0mlaptop (orig r12387):  t0m | 2009-12-15 10:21:32 +0000
 Bug fix for issue reported on the mailing list by Toby Corkindale
 r12466 at t0mlaptop (orig r12431):  t0m | 2009-12-18 19:55:03 +0000
 Fix RT#52898, __MOP__ removal breaking debug screen with C::P::Session
 r12497 at t0mlaptop (orig r12462):  t0m | 2009-12-22 14:19:36 +0000
 Someone think of a less fugly way of doing this please? Fixes using rewrite rules to ask for a sub-path in your app with apache in some combinations..
 r12528 at t0mlaptop (orig r12493):  t0m | 2009-12-30 15:55:43 +0000
 Fix regex special characters screwing things up by not using regexes
 r12559 at t0mlaptop (orig r12524):  t0m | 2010-01-04 20:52:10 +0000
 Doc fix
 r12560 at t0mlaptop (orig r12525):  t0m | 2010-01-04 20:55:25 +0000
 Clarify comment
 r12564 at t0mlaptop (orig r12529):  rafl | 2010-01-05 00:28:35 +0000
 Stop supressing Adopt::NEXT warnings.
 r12570 at t0mlaptop (orig r12535):  rafl | 2010-01-06 15:59:41 +0000
 Clarify comment.
 r12589 at t0mlaptop (orig r12554):  t0m | 2010-01-09 15:37:00 +0000
 Don't screw over people using --detach, <sigh>
 r12590 at t0mlaptop (orig r12555):  t0m | 2010-01-09 15:57:27 +0000
 Back out r12493, use \Q instead
 r12591 at t0mlaptop (orig r12556):  t0m | 2010-01-09 15:58:18 +0000
 Changelog Adopt::NEXT warnings
 r12592 at t0mlaptop (orig r12557):  t0m | 2010-01-09 16:43:25 +0000
 Correctly pass argv option into Catalyst::Engine::HTTP
 r12593 at t0mlaptop (orig r12558):  t0m | 2010-01-09 16:54:08 +0000
 Un stupid
 r12594 at t0mlaptop (orig r12559):  t0m | 2010-01-09 17:38:59 +0000
 Bump dep
 r12608 at t0mlaptop (orig r12573):  t0m | 2010-01-09 18:22:02 +0000
 Bump version of ::Role::WithOverloading
 r12610 at t0mlaptop (orig r12575):  t0m | 2010-01-09 19:01:59 +0000
 require autoclean once only
 r12622 at t0mlaptop (orig r12587):  rafl | 2010-01-10 02:00:03 +0000
 Version 5.80017.
 r12631 at t0mlaptop (orig r12596):  t0m | 2010-01-10 14:22:15 +0000
 Apply patch to clarify uri_for action from Octavian Rasnita on list
 r12640 at t0mlaptop (orig r12605):  t0m | 2010-01-11 21:11:05 +0000
 Deprecate bare imports of Catalyst::Test - either use an app name or don't run the import method. As-per r12564
 r12648 at t0mlaptop (orig r12613):  t0m | 2010-01-11 23:18:08 +0000
 Fix URI bug masked by HTTP::Request::AsCGI
 r12652 at t0mlaptop (orig r12617):  rafl | 2010-01-12 21:37:31 +0000
 Fix a deprecation warning in the tests.
 r12653 at t0mlaptop (orig r12618):  rafl | 2010-01-12 21:37:39 +0000
 canonical() is a no-op for the base uri.
 r12654 at t0mlaptop (orig r12619):  rafl | 2010-01-12 21:37:46 +0000
 Version 5.80018.
 r12669 at t0mlaptop (orig r12634):  rafl | 2010-01-14 02:26:03 +0000
 Depend on n:c 0.12 to work on perl >= 5.11.2.
 r12673 at t0mlaptop (orig r12638):  rafl | 2010-01-14 05:21:24 +0000
 Exception stuff is fixed for a while now.
 r12674 at t0mlaptop (orig r12639):  rafl | 2010-01-14 05:45:09 +0000
 Only set up the leakchecker for the tests that need it.
 
 That way we avoid the useless Devel::Cycle glob warnings.
 r12676 at t0mlaptop (orig r12641):  dandv | 2010-01-14 08:15:10 +0000
 Typo fix
 r12678 at t0mlaptop (orig r12643):  dandv | 2010-01-14 09:23:50 +0000
 Cosmetic: wrapped long code line
 r12690 at t0mlaptop (orig r12655):  dandv | 2010-01-14 23:52:44 +0000
 Passing test case for RT #53678 - Catalyst::Test::get currently doesn't decode the response body octets
 
 r12691 at t0mlaptop (orig r12656):  karpet | 2010-01-15 06:35:30 +0000
 in what case is a numeric comparison called for? I cannot think of one. Is this the best way to test?
 r12698 at t0mlaptop (orig r12663):  t0m | 2010-01-15 16:39:55 +0000
 Clarify that it's an app, not a ctx here
 r12713 at t0mlaptop (orig r12678):  rafl | 2010-01-18 09:00:20 +0000
 Depend on a namespace::clean that isn't broken on <= 5.8.8.
 r12725 at t0mlaptop (orig r12690):  rafl | 2010-01-19 16:07:45 +0000
 Merge branch 'action_args'
 
 * action_args:
   And another minor tweak.
   Some more doc tweaking.
   tweaked docs based on IRC suggestions
   added documentation for the configuration option "action_args".
   Allow passing extra args to action constructors using action_args config.
   Add tests for passing extra arguments to action constructors.
   Create branch action_args
 r12726 at t0mlaptop (orig r12691):  rafl | 2010-01-19 16:08:22 +0000
 Changelog action_args.
 r12728 at t0mlaptop (orig r12693):  aristotle | 2010-01-19 21:41:23 +0000
 fix $c->error doc in Catalyst.pm POD
 r12761 at t0mlaptop (orig r12726):  aCiD2 | 2010-01-25 01:03:52 +0000
 Improve the documentation about -Home and how Catalyst finds the home path for apps
 r12762 at t0mlaptop (orig r12727):  rafl | 2010-01-25 18:59:52 +0000
 Revert "in what case is a numeric comparison called for? I cannot think of one. Is this the best way to test?"
 
 This reverts commit 279b2f1abb0a8e056b8c905e5a4ecb66537ee194.
 r12763 at t0mlaptop (orig r12728):  rafl | 2010-01-25 19:00:17 +0000
 Remove apparently useless Component::BUILDARGS conditional.
 r12778 at t0mlaptop (orig r12743):  t0m | 2010-01-27 20:12:46 +0000
 Clarrify debug documentation
 r12779 at t0mlaptop (orig r12744):  t0m | 2010-01-27 20:15:52 +0000
 Fix failing test related to missing g in regex
 r12781 at t0mlaptop (orig r12746):  t0m | 2010-01-27 21:04:17 +0000
 Fix / => %2F in uri_for so that it only works for action objects as previously advertised as this has been screwing people. Also fix multiple / => %2F conversion in the same arg/capture
 r12793 at t0mlaptop (orig r12758):  t0m | 2010-01-28 15:47:31 +0000
 Fix paths with URI encoding as the first path part
 r12794 at t0mlaptop (orig r12759):  t0m | 2010-01-28 18:15:10 +0000
 And test the non root app case
 r12804 at t0mlaptop (orig r12769):  t0m | 2010-01-28 23:28:15 +0000
 Changelog up to date
 r12805 at t0mlaptop (orig r12770):  rafl | 2010-01-29 00:16:42 +0000
 Changelog tweaking.
 r12806 at t0mlaptop (orig r12771):  rafl | 2010-01-29 00:16:48 +0000
 Version 5.80019.
 r12845 at t0mlaptop (orig r12810):  rafl | 2010-02-04 05:50:05 +0000
 Merge branch 'expand_modules'
 
 * expand_modules:
   Allow models and components to specify the names of any components they generate
   Branching to allow components to specify any modules they may have created
 r12846 at t0mlaptop (orig r12811):  rafl | 2010-02-04 06:18:46 +0000
 Version 5.80020.
 r12870 at t0mlaptop (orig r12835):  t0m | 2010-02-08 21:46:15 +0000
  r12572 at t0mlaptop (orig r12537):  caelum | 2010-01-06 22:33:51 +0000
  branch to utf8-decode captures and args
  r12573 at t0mlaptop (orig r12538):  caelum | 2010-01-06 22:56:59 +0000
  utf8::decode captures and args, and uri-escape captures
  r12574 at t0mlaptop (orig r12539):  caelum | 2010-01-07 00:04:45 +0000
  add a test for the uri_for utf8 stuff
  r12869 at t0mlaptop (orig r12834):  t0m | 2010-02-08 21:20:05 +0000
  Unfuck
 
 r12889 at t0mlaptop (orig r12853):  caelum | 2010-02-09 22:26:23 +0000
 update Changes, put comment back in
 r12890 at t0mlaptop (orig r12854):  t0m | 2010-02-11 20:06:15 +0000
 Fix typo
 r12891 at t0mlaptop (orig r12855):  t0m | 2010-02-11 20:36:22 +0000
 First attempt to make this make more sense.
 r12897 at t0mlaptop (orig r12861):  rafl | 2010-02-14 11:30:23 +0000
 Make the debug log say the cat version with all its digits.
 r13014 at t0mlaptop (orig r12978):  rafl | 2010-02-23 17:52:30 +0000
 fix doc typo.
 r13036 at t0mlaptop (orig r13000):  t0m | 2010-03-03 22:57:24 +0000
 The no warnings stanza does nothing, so remove it
 r13037 at t0mlaptop (orig r13001):  t0m | 2010-03-03 23:03:13 +0000
 Bump versions, expand somewhat on the changelog
 r13045 at t0mlaptop (orig r13009):  hobbs | 2010-03-05 02:16:07 +0000
 Tiny doc fix for Engine::FastCGI
 
 r13046 at t0mlaptop (orig r13010):  matthewt | 2010-03-05 03:36:57 +0000
 fix Index uri_for_action bug
 r13049 at t0mlaptop (orig r13013):  t0m | 2010-03-06 20:31:33 +0000
  r10813 at t0mlaptop (orig r10812):  t0m | 2009-07-07 15:21:59 +0100
  Branch for param filtering
  
  r10943 at t0mlaptop (orig r10942):  bpphillips | 2009-07-22 17:43:22 +0100
  refactored request/response logging with configurable filters
  r10944 at t0mlaptop (orig r10943):  jester | 2009-07-22 19:44:46 +0100
  minor doc tweaking on param filtering
  r13032 at t0mlaptop (orig r12996):  bpphillips | 2010-03-02 13:23:50 +0000
  remove filtering, get request/response logging from $c->dump_these instead
  
  r13033 at t0mlaptop (orig r12997):  bpphillips | 2010-03-02 20:42:43 +0000
  cleaned up tabs vs. spaces
  
  r13041 at t0mlaptop (orig r13005):  bpphillips | 2010-03-04 04:20:39 +0000
  only log response status, content-type and content-length headers
  
 
 r13050 at t0mlaptop (orig r13014):  t0m | 2010-03-06 20:35:19 +0000
 Changelog
 r13072 at t0mlaptop (orig r13036):  szbalint | 2010-03-08 06:48:51 +0000
 Optimizing component lookup for the simple, common case and falling back on regexps otherwise. Noting the optimization in Changes. Also, adding myself to contributors.
 
 r13091 at t0mlaptop (orig r13055):  arcanez | 2010-03-19 18:14:18 +0000
 fix long standing typo
 r13096 at t0mlaptop (orig r13060):  rafl | 2010-03-22 10:30:30 +0000
 It's --help, not -help.
 r13098 at t0mlaptop (orig r13062):  miyagawa | 2010-03-22 11:07:22 +0000
 added cpanm :)
 r13099 at t0mlaptop (orig r13063):  ijw | 2010-03-22 11:30:38 +0000
 Disabled name lookup for server hostname in favour of returning IP address.  Annoyingly, I can't find any actual use of the name in this module (it's passed as SERVER_NAME in the env), but we believe it ends up in the 'Host' header.
 r13100 at t0mlaptop (orig r13064):  rafl | 2010-03-22 12:32:25 +0000
 no tabs. kthx!
 r13118 at t0mlaptop (orig r13082):  rafl | 2010-03-26 16:00:54 +0000
 Make sure to construct Upload objects properly, even if there are multiple Content-Type headers.
 
 Closes RT#55976.
 r13119 at t0mlaptop (orig r13083):  t0m | 2010-03-28 17:43:37 +0100
 Back out 13063. This changes the CGI environment we construct to just be plain wrong, SERVER_NAME is meant to be a name after all. I have a feeling that all of this crap could be simplified, but I don't want to spend a lot of tuits changing it (and possibly breaking things for people with non-obvious behaviour changes like this one) - when those tuits could be spent on Plack stuff so that all this code dies anyway (and we do a major release so breakage can be more reasonable expected / extensively tested for). This is all possibly being _too_ paranoid here, but given the original commit didn't know what was happening / what changed _at all_, I think that's fair..
 r13120 at t0mlaptop (orig r13084):  t0m | 2010-03-28 17:54:36 +0100
 Cache the IP address => hostname lookups which could be performed multiple times to mitigate slow DNS servers. Poor man's replacement for 13063
 r13121 at t0mlaptop (orig r13085):  t0m | 2010-03-28 18:24:18 +0100
 Back out behaviour change in debug logging we don't want, keeping only the addition of 1 line of response info. More refactoring to give hooks to put the behaviour I just removed back from a plugin
 r13122 at t0mlaptop (orig r13086):  t0m | 2010-03-28 19:18:45 +0100
 More splitting up of the response logging methods
 r13123 at t0mlaptop (orig r13087):  t0m | 2010-03-28 19:25:41 +0100
 Make the tables from the log_headers method scale to term size nicely
 r13139 at t0mlaptop (orig r13103):  t0m | 2010-03-29 16:55:39 +0100
 Fail, commit version bump
 r13142 at t0mlaptop (orig r13106):  rafl | 2010-03-29 17:09:05 +0100
 Remove $VERSION hacks.
 
 For future dev releases we'll just use "-TRIAL" in the dist name.
 r13143 at t0mlaptop (orig r13107):  rafl | 2010-03-29 17:19:15 +0100
 We always have a metaclass after setup, right?



Property changes on: Catalyst-Runtime/5.80/branches/refactoring_dispatcher
___________________________________________________________________
Modified: svn:ignore
   - Catalyst-Runtime-*
META.yml
Makefile.old
.gdb_history
pm_to_blib
nytprof.out
blib
inc
Makefile
.*.swp

   + MANIFEST
MANIFEST.bak
Catalyst-Runtime-*
META.yml
Makefile.old
.gdb_history
pm_to_blib
nytprof.out
blib
inc
Makefile
.*.swp

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

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/Changes
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/Changes	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/Changes	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,5 +1,201 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+5.80022 2010-03-28 19:43:01
+
+  New features:
+   - Log an extra line in debug mode with the response status code,
+     the content type and content length if available.
+
+  Refactoring / optimizations:
+   - Display of the end of hit debug messages has been factored out into
+     log_headers, log_request, log_request_headers, log_response,
+     log_response_status_line and log_response_headers methods so that
+     plugins which customise how much information is shown on the debug
+     screen as easy to write.
+   - Make all logging of request and response state get the information from
+     $c->dump_these so that there is a unified point from which to hook
+     in parameter filtering (for example).
+   - $c->model/view/controller have become a lot faster for non-regexp names
+     by using direct hash lookup instead of looping.
+   - IP address => hostname mapping for the server is only done once and cached
+     by Catalyst::Engine::HTTP to somewhat mitigate the problem of people
+     developing on machines pointed at slow DNS servers.
+
+  Bugs fixed:
+    - DispatchType::Index's uri_for_action only returns for actions registered
+      with it (prevents 'index :Path' or similar resolving to the wrong URI)
+    - Make sure to construct Upload objects properly, even if there are
+      multiple Content-Type headers (Closes RT#55976).
+
+5.80021 2010-03-03 23:02:01
+
+  Bug fixed:
+   - $c->uri_for will now escape unsafe characterss in captures
+     ($c->request->captures) and correctly encode utf8 charracters.
+
+5.80020 2010-02-04 06:51:18
+
+  New features:
+    - Allow components to specify additional components to be set up by
+      overriding the expand_modules method. (Oliver Charles)
+
+5.80019 2010-01-29 01:04:09
+
+  Bug fixed:
+   - Calls to $c->uri_for with private paths as strings (e.g.
+     $c->uri_for('controller/action', 'arg1', 'arg2') ) no longer have
+     / encoded to %2F. This is due to $c->uri_for('static', 'css/foo', $bar)
+     which should not be encoded.
+     Calls with an action object (rather than a string), or uri_for action
+     will still encode / in args and captures to %2F
+
+   - The above noted / => %2F encoding in uri_for_action or uri_for with
+     an action object has been fixed to not just encode the first slash in
+     any set of args/captures.
+
+   - nginx and lighttpd FCGI requests with URI encoded sections as the first
+     path part have been fixed to operate correctly.
+
+   - A source of bogus warnings in Catalyst::Component::BUILDARGS has been
+     removed.
+
+  Documentation:
+   - Improve the documentation about -Home and how Catalyst finds the home path
+     for applications.
+   - Various minor typo fixes.
+
+  New features:
+   - Allow passing additional arguments to action constructors.
+
+5.80018 2010-01-12 22:24:20
+
+  Bug fixed:
+   - Call ->canonical on URI derived from $ENV{REQUEST_URI} to get
+     paths correctly decoded. This bug was previously hidden by a bug
+     in HTTP::Request::AsCGI.
+
+  Documentation:
+   - Clarify that uri_for_action works on private paths, with example.
+   - Clarify documentation about debug
+
+  Deprecations:
+   - Saying use Catalyst::Test; (without an application name or () to stop
+     the importer running is now deprecated and will issue a warning.
+     You should be saying use Catalyst::Test ();
+
+5.80017 2010-01-10 02:27:29
+
+  Documentation:
+   - Fix docs for ->forward method when passed a class name - this should
+     be a component name (e.g. View::HTML, not a full class name, like
+     MyApp::View::HTML).
+
+  Bug fixes:
+   - --daemon and -d options to Catalyst::Script::FastCGI are fixed.
+   - Fix the debug dump for applications which use Catalyst::Plugin::Session
+     (RT#52898)
+   - Fix regression in the case where mod_rewrite is being used to rewrite
+     requests into a path below your application base introduced with the
+     %2F related fixes in 5.80014_02.
+   - Do not crash on SIGHUP if Catalyst::Engine::HTTP->run is not passed the
+     argv key in the options hash.
+   - Correctly pass the arguments to Catalyst::Script::Server through to
+     Catalyst::Engine::HTTP->run so that the server can restart itself
+     with the correct options on SIGHUP.
+   - Require new MooseX::MethodAttributes to be compatible with Moose
+     versions >= 0.93_01
+   - Require new MooseX::Role::WithOverloading to be compatible with Moose
+     versions >= 0.93_01
+
+  Cleanups:
+    - Stop suppressing warnings from Class::C3::Adopt::NEXT now that most plugins
+      have been updated to not use NEXT. If you get warnings then please upgrade
+      your components or log a bug with the component author if an upgrade is
+      not available. The Class::C3::Adopt::NEXT documentation contains information
+      about how to suppress the warnings in your application if you need to.
+
+5.80016 2009-12-11 23:23:33
+
+  Bug fixes:
+
+   - Fix slurping a file to work correctly with binary on Win32 in the
+     encoding test controller.
+
+  Bug fixes in the new scripts (for applications which have been upgraded):
+
+   - Allow --restartdirectory as an option for the Server script, for
+     backwards compatibility. (Dave Rolsky)
+   - The --host option for the server script defaulted to localhost, rather
+     than listening on all interfaces, which was the previous default. (Dave
+     Rolsky)
+   - Restore -p option for pid file in the FastCGI server script.
+   - Fix the script environment variables MYAPP_PORT and MYAPP_RELOAD RT#52604
+   - Fix aliasing applications under non-root paths with mod_rewrite in
+     some apache versions where %ENV{SCRIPT_NAME} is set to the real name of
+     the script, by using $ENV{REDIRECT_URL} which contains the non-rewritten
+     URI.
+   - Fix usage display when myapp_create.pl is run with no arguments. RT#52630
+
+  New features:
+
+   - The __MOP__ hash element is suppressed from being dumped fully
+     (and instead stringified) when dumping the error screen to be
+     less packed with information of no use.
+
+  Documentation:
+
+   - Fix Pod nits (RT#52370)
+
+5.80015 2009-12-02 15:13:54
+  Bug fixes:
+   - Fix bug in Catalyst::Engine which would cause a request parsing to end
+     prematurely in the hypothetical case where calling $engine->read returned
+     the single character '0'.
+   - Fix failing tests when combined with new HTTP::Request::AsCGI
+
+  Documentation:
+   - Improved documentation on read and read_chunk methods in Catalyst::Engine.
+   - Fix reversal of SCRIPT_NAME and PATH_INFO in previously correct nginx
+     FastCGI documentation introduced in _02.
+
+5.80014_02 2009-12-01 00:55:23
+  Bug fixes:
+   - Fix reporting the wrong Content-Length if the response body is an
+     upgraded string. Strings mean the same thing whether or not they are
+     upgraded, may get upgraded even after they are encoded, and will
+     produce the same output either way, but bytes::length returns too big
+     values for upgraded strings containing characters >127
+   - Fix t/live_fork.t with bleadperl (RT#52100)
+   - Set $ENV{PATH_INFO} from $ENV{REQUEST_URI} combined with
+     $ENV{SCRIPT_NAME} if possible. This is many web servers always fully
+     decode PATH_INFO including URI reserved characters. This allows us to
+     tell foo%2cbar from foo%252cbar, and fixes issues with %2F in paths
+     being incorrectly decoded, resulting in too many path parts (rather
+     than 1 path part containing a /, on some web servers (at least nginx).
+     (RT#50082)
+   - Require new HTTP::Request::AsCGI so that it fully decodes $ENV{PATH_INFO}
+     in non CGI contexts. (RT#50082)
+
+  Refactoring / cleanups:
+   - NoTabs and Pod tests moved to t/author so that they're not run
+     (and then skipped) normally.
+
+  Documentation:
+    - Fix Pod nits in Catalyst::Response (RT#51818)
+
+5.80014_01 2009-11-22 20:01:23
+
+  Bug fixes:
+   - Filehandle now forced to binmode in CGI and FastCGI engines. This appears
+     to correct some UTF-8 issues, but may break people's code which relies
+     on the old behaviour.
+
+  Refactoring / cleanups:
+   - Plugins which inherit from Catalyst::Controller or Catalyst::Component
+     are deprecated and now issue warnings.
+
+5.80014 2009-11-21 02:51:14
+
    Bug fixes:
     - Require MooseX::MethodAttributes 0.17. This in turn requires new
       MooseX::Types to stop warnings in Moose 0.91, and correctly supports
@@ -9,7 +205,32 @@
     - Improved the suggested fix warning when component resolution uses regex
       fallback for fully qualified component names.
     - Catalyst::Test::local_request sets ->request on the response.
+    - Log flush moved to the end of setup so that roles and plugins which
+      hook setup_finalize can log things and have them appear in application
+      startup, rather than with the first hit.
+    - Require a newer version of LWP to avoid failing tests.
+    - Stop warnings when actions are forwarded to during dispatch.
+    - Remove warnings for using Catalyst::Dispatcher->dispatch_types as this is a
+      valid method to publicly call on the dispatcher.
+    - Args ($c->request->args) and CaptureArgs ($c->request->captrues)
+      passed to $c->uri_for with an action object ($c->action) will now
+      correctly round-trip when args or captures contain / as it is now
+      correctly uri encoded to %2F.
 
+  Documentation:
+    - Document no-args call to $c->uri_for.
+    - Document all top level application configuration parameters.
+    - Clarify how to fix actions in your application class (which is
+      deprecated and causes warnings).
+    - Pod fixes for ContextClosure.
+    - Fix documentation for go/visit to reference captures and arguments
+      in the correct order.
+    - Update $c->forward and $c->state documentation to address scalar
+      context.
+    - Pod fix in Catalyst::Request (RT#51490)
+    - Pod fixes to refer to ::Controller:: rather than ::C:: as the latter
+      is deprecated (RT#51489)
+
   New features:
     - Added disable_component_resolution_regex_fallback config option to
       switch off (deprecated) regex fallback for component resolution.
@@ -17,7 +238,21 @@
       proper PATH_INFO and SCRIPT_NAME processing for non-root applications
     - Enable Catalyst::Utils::home() to find home within Dist::Zilla built
       distributions
+    - Added the Catalyst::Exception::Interface role defining the interface
+      exception classes need to implement.
+    - Added Catalyst::Exception::Basic as a basic implementation of
+      Catalyst::Exception::Interface and made the existing exception classes
+      use it.
 
+  Refactoring / cleanups:
+    - Remove documentation for the case_sensitive setting
+    - Warning is now emitted at application startup if the case_sensitive
+      setting is turned on. This setting is not used by anyone, not
+      believed to be useful and adds unnecessary complexity to controllers
+      and the dispatcher. If you are using this setting and have good reasons
+      why it should stay then you need to be shouting, now.
+    - Writing to $c->req->body now fails as doing this never makes sense.
+
 5.80013 2009-09-17 11:07:04
 
    Bug fixes:
@@ -269,7 +504,7 @@
           B::Hooks::OP::Check::StashChange
         - Fix the unattached chain debug table for endpoints with no
           parents at all.
-        - Turn of test aggregation by default. Only aggregate if the
+        - Turn off test aggregation by default. Only aggregate if the
           AGGREGATE_TESTS environment variable is set and a recent
           Test::Aggregate is available.
         - Bump to MooseX::MethodAttributes 0.09, to gain the

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/Makefile.PL	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/Makefile.PL	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,14 +1,12 @@
 use strict;
 use warnings;
-use inc::Module::Install 0.87;
-{   # Ensure that these get used - yes, M::I loads them for us, but if you're
-    # in author mode and don't have them installed, then the error is tres
-    # cryptic.
-    no warnings 'redefine';
-    use Module::Install::AuthorRequires;
-    use Module::Install::CheckConflicts;
-    use Module::Install::AuthorTests;
-}
+use inc::Module::Install 0.91;
+# Ensure that these get used - yes, M::I loads them for us, but if you're
+# in author mode and don't have them installed, then the error is tres
+# cryptic.
+use Module::Install::AuthorRequires;
+use Module::Install::CheckConflicts;
+use Module::Install::AuthorTests;
 
 perl_version '5.008004';
 
@@ -17,12 +15,13 @@
 
 requires 'List::MoreUtils';
 requires 'namespace::autoclean' => '0.09';
-requires 'namespace::clean';
+requires 'namespace::clean' => '0.13';
 requires 'B::Hooks::EndOfScope' => '0.08';
 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903';
-requires 'Class::MOP' => '0.83';
-requires 'Moose' => '0.90';
-requires 'MooseX::MethodAttributes::Inheritable' => '0.17';
+requires 'Class::MOP' => '0.95';
+requires 'Moose' => '0.93';
+requires 'MooseX::MethodAttributes::Inheritable' => '0.19';
+requires 'MooseX::Role::WithOverloading' => '0.05';
 requires 'Carp';
 requires 'Class::C3::Adopt::NEXT' => '0.07';
 requires 'CGI::Simple::Cookie';
@@ -30,9 +29,9 @@
 requires 'HTML::Entities';
 requires 'HTTP::Body'    => '1.04'; # makes uploadtmp work
 requires 'HTTP::Headers' => '1.64';
-requires 'HTTP::Request';
-requires 'HTTP::Response';
-requires 'HTTP::Request::AsCGI' => '0.8';
+requires 'HTTP::Request' => '5.814';
+requires 'HTTP::Response' => '5.813';
+requires 'HTTP::Request::AsCGI' => '1.0';
 requires 'LWP::UserAgent';
 requires 'Module::Pluggable' => '3.9';
 requires 'Path::Class' => '0.09';
@@ -46,12 +45,14 @@
 requires 'Task::Weaken';
 requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
 requires 'MRO::Compat';
+requires 'MooseX::Getopt' => '0.25';
+requires 'MooseX::Types';
+requires 'MooseX::Types::Common::Numeric';
 requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
 
-recommends 'B::Hooks::OP::Check::StashChange';
-
 test_requires 'Class::Data::Inheritable';
 test_requires 'Test::Exception';
+test_requires 'Test::More' => '0.88';
 
 # aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate and a Test::Simple it works with is available
 if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.35_05')) {
@@ -63,7 +64,8 @@
         grep { $_ ne 't/aggregate.t' }
         map  { glob } qw[t/*.t t/aggregate/*.t];
 }
-author_requires 'CatalystX::LeakChecker', '0.03'; # Skipped if this isn't installed
+author_requires 'CatalystX::LeakChecker', '0.05'; # Skipped if this isn't installed
+author_requires 'File::Copy::Recursive'; # For http server test
 
 author_tests 't/author';
 author_requires(map {; $_ => 0 } qw(
@@ -99,7 +101,8 @@
     you also install the development tools package Catalyst::Devel.
 
         perl -MCPANPLUS -e 'install Catalyst::Devel' # or
-        perl -MCPAN -e 'install Catalyst::Devel'
+        perl -MCPAN -e 'install Catalyst::Devel'     # or
+        cpanm Catalyst::Devel
 
     To get some commonly used plugins, as well as the TT view and DBIC
     model, install Task::Catalyst in the same way.
@@ -110,6 +113,7 @@
 # NOTE - This is the version number of the _incompatible_ code,
 #        not the version number of the fixed version.
 my %conflicts = (
+    'Catalyst::Plugin::SubRequest' => '0.14',
     'Catalyst::Model::Akismet' => '0.02',
     'Catalyst::Component::ACCEPT_CONTEXT' => '0.06',
     'Catalyst::Plugin::ENV' => '9999', # This plugin is just stupid, full stop
@@ -153,7 +157,7 @@
         my $attr = $osx_ver =~ /^10.(5|6)/  ? '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,"; }.
+                                          qq{ echo "You must set the ENV variable $attr to 'true',"; }.
                                           ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
     }
 }

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/TODO
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/TODO	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/TODO	2010-03-31 18:20:10 UTC (rev 13115)
@@ -5,12 +5,6 @@
 
      Test app: http://github.com/bobtfish/catalyst-app-bug-go_chain/tree/master
 
-   - Bricas' Exception blog post
-
-     http://bricas.vox.com/library/post/catalyst-exceptionclass.html
-
-     Broken by recent exception refactoring
-
 # Compatibility warnings to add:
 
   - $self->config should warn as config should only ever be called as a

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Component.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Component.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Component.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -5,6 +5,7 @@
 use Class::MOP::Object;
 use Catalyst::Utils;
 use Class::C3::Adopt::NEXT;
+use Devel::InnerPackage ();
 use MRO::Compat;
 use mro 'c3';
 use Scalar::Util 'blessed';
@@ -84,8 +85,6 @@
         } elsif (Class::MOP::is_class_loaded($_[0]) &&
                 $_[0]->isa('Catalyst') && ref($_[1]) eq 'HASH') {
             $args = $_[1];
-        } elsif ($_[0] == $_[1]) {
-            $args = $_[1];
         } else {
             $args = +{ @_ };
         }
@@ -149,6 +148,11 @@
           . " did not override Catalyst::Component::process" );
 }
 
+sub expand_modules {
+    my ($class, $component) = @_;
+    return Devel::InnerPackage::list_packages( $component );
+}
+
 __PACKAGE__->meta->make_immutable;
 
 1;
@@ -157,7 +161,7 @@
 
 =head1 METHODS
 
-=head2 new($c, $arguments)
+=head2 new($app, $arguments)
 
 Called by COMPONENT to instantiate the component; should return an object
 to be stored in the application's component hash.
@@ -168,9 +172,10 @@
 
 If this method is present (as it is on all Catalyst::Component subclasses,
 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,
+as $app and any config entry on the application for this component (for example,
 in the case of MyApp::Controller::Foo this would be
 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.
@@ -206,6 +211,13 @@
 Merges two hashes together recursively, giving right-hand precedence.
 Alias for the method in L<Catalyst::Utils>.
 
+=head2 $c->expand_modules( $setup_component_config )
+
+Return a list of extra components that this component has created. By default,
+it just looks for a list of inner packages of this component
+
+=cut
+
 =head1 OPTIONAL METHODS
 
 =head2 ACCEPT_CONTEXT($c, @args)

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Controller.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Controller.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -255,9 +255,15 @@
     my $class = (exists $args{attributes}{ActionClass}
                     ? $args{attributes}{ActionClass}[0]
                     : $self->_action_class);
+    Class::MOP::load_class($class);
 
-    Class::MOP::load_class($class);
-    return $class->new( \%args );
+    my $action_args = $self->config->{action_args};
+    my %extra_args = (
+        %{ $action_args->{'*'}           || {} },
+        %{ $action_args->{ $args{name} } || {} },
+    );
+
+    return $class->new({ %extra_args, %args });
 }
 
 sub _parse_attrs {
@@ -440,6 +446,26 @@
 
 Sets 'path_prefix', as described below.
 
+=head2 action_args
+
+Allows you to set constructor arguments on your actions. You can set arguments
+globally (for all actions of the controller) and specifically (for a single
+action). This is particularly useful when using C<ActionRole>s
+(L<Catalyst::Controller::ActionRole>) and custom C<ActionClass>es.
+
+    __PACKAGE__->config(
+        action_args => {
+            '*' => { globalarg1 => 'hello', globalarg2 => 'goodbye' },
+            'specific_action' => { customarg => 'arg1' },
+        },
+     );
+
+In the case above the action class associated with C<specific_action> would get
+passed the following arguments, in addition to the normal action constructor
+arguments, when it is instantiated:
+
+  (globalarg1 => 'hello', globalarg2 => 'goodbye', customarg => 'arg1')
+
 =head1 METHODS
 
 =head2 BUILDARGS ($app, @args)

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/DispatchType/Chained.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/DispatchType/Chained.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/DispatchType/Chained.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -105,7 +105,7 @@
             if (my $cap = $curr->attributes->{CaptureArgs}) {
                 unshift(@parts, (("*") x $cap->[0]));
             }
-            if (my $pp = $curr->attributes->{PartPath}) {
+            if (my $pp = $curr->attributes->{PathPart}) {
                 unshift(@parts, $pp->[0])
                     if (defined $pp->[0] && length $pp->[0]);
             }
@@ -305,7 +305,7 @@
         );
     }
 
-    $action->attributes->{PartPath} = [ $part ];
+    $action->attributes->{PathPart} = [ $part ];
 
     unshift(@{ $children->{$part} ||= [] }, $action);
 
@@ -359,7 +359,7 @@
                 unshift(@parts, splice(@captures, -$cap->[0]));
             }
         }
-        if (my $pp = $curr->attributes->{PartPath}) {
+        if (my $pp = $curr->attributes->{PathPart}) {
             unshift(@parts, $pp->[0])
                 if (defined($pp->[0]) && length($pp->[0]));
         }

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/DispatchType/Index.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/DispatchType/Index.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/DispatchType/Index.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -67,7 +67,7 @@
 sub register {
     my ( $self, $c, $action ) = @_;
 
-    $self->_actions->{ $action->reverse } = $action;
+    $self->_actions->{ $action->reverse } = $action if $action->name eq 'index';
 
     return 1;
 }
@@ -84,7 +84,7 @@
 
     return undef if @$captures;
 
-    return undef unless $action->name eq 'index';
+    return undef unless exists $self->_actions->{ $action->reverse };
 
     return "/".$action->namespace;
 }

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Dispatcher.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Dispatcher.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -153,7 +153,7 @@
         $action = $self->_invoke_as_path( $c, "$command", \@args );
     }
 
-    # go to a component ( "MyApp::*::Foo" or $c->component("...")
+    # go to a component ( "View::Foo" or $c->component("...")
     # - a path or an object)
     unless ($action) {
         my $method = @extra_params ? $extra_params[0] : "process";

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/CGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/CGI.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/CGI.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -85,6 +85,7 @@
     if ( $ENV{SERVER_PORT} == 443 ) {
         $request->secure(1);
     }
+    binmode(STDOUT); # Ensure we are sending bytes.
 }
 
 =head2 $self->prepare_headers($c)
@@ -107,6 +108,8 @@
 
 =cut
 
+# Please don't touch this method without adding tests in
+# t/aggregate/unit_core_engine_cgi-prepare_path.t
 sub prepare_path {
     my ( $self, $c ) = @_;
     local (*ENV) = $self->env || \%ENV;
@@ -114,13 +117,16 @@
     my $scheme = $c->request->secure ? 'https' : 'http';
     my $host      = $ENV{HTTP_HOST}   || $ENV{SERVER_NAME};
     my $port      = $ENV{SERVER_PORT} || 80;
+    my $script_name = $ENV{SCRIPT_NAME};
+    $script_name =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go if $script_name;
+
     my $base_path;
     if ( exists $ENV{REDIRECT_URL} ) {
         $base_path = $ENV{REDIRECT_URL};
         $base_path =~ s/$ENV{PATH_INFO}$//;
     }
     else {
-        $base_path = $ENV{SCRIPT_NAME} || '/';
+        $base_path = $script_name || '/';
     }
 
     # If we are running as a backend proxy, get the true hostname
@@ -142,8 +148,35 @@
         }
     }
 
+    # RFC 3875: "Unlike a URI path, the PATH_INFO is not URL-encoded,
+    # and cannot contain path-segment parameters." This means PATH_INFO
+    # is always decoded, and the script can't distinguish / vs %2F.
+    # See https://issues.apache.org/bugzilla/show_bug.cgi?id=35256
+    # Here we try to resurrect the original encoded URI from REQUEST_URI.
+    my $path_info   = $ENV{PATH_INFO};
+    if (my $req_uri = $ENV{REQUEST_URI}) {
+        $req_uri =~ s/^\Q$base_path\E//;
+        $req_uri =~ s/\?.*$//;
+        if ($req_uri) {
+            # Note that if REQUEST_URI doesn't start with a /, then the user
+            # is probably using mod_rewrite or something to rewrite requests
+            # into a sub-path of their application..
+            # This means that REQUEST_URI needs information from PATH_INFO
+            # prepending to it to be useful, otherwise the sub path which is
+            # being redirected to becomes the app base address which is
+            # incorrect.
+            if (substr($req_uri, 0, 1) ne '/') {
+                my ($match) = $req_uri =~ m|^([^/]+)|;
+                my ($path_info_part) = $path_info =~ m|^(.*?\Q$match\E)|;
+                substr($req_uri, 0, length($match), $path_info_part)
+                    if $path_info_part;
+            }
+            $path_info = $req_uri;
+        }
+    }
+
     # set the request URI
-    my $path = $base_path . ( $ENV{PATH_INFO} || '' );
+    my $path = $base_path . ( $path_info || '' );
     $path =~ s{^/+}{};
 
     # Using URI directly is way too slow, so we construct the URLs manually
@@ -163,7 +196,7 @@
     my $query = $ENV{QUERY_STRING} ? '?' . $ENV{QUERY_STRING} : '';
     my $uri   = $scheme . '://' . $host . '/' . $path . $query;
 
-    $c->request->uri( bless \$uri, $uri_class );
+    $c->request->uri( bless(\$uri, $uri_class)->canonical );
 
     # set the base URI
     # base must end in a slash

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/FastCGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/FastCGI.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/FastCGI.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -297,7 +297,7 @@
 =head3 Standalone server mode
 
     FastCgiExternalServer /tmp/myapp.fcgi -socket /tmp/myapp.socket
-    Alias /myapp/ /tmp/myapp/myapp.fcgi/
+    Alias /myapp/ /tmp/myapp.fcgi/
 
     # Or, run at the root
     Alias / /tmp/myapp.fcgi/
@@ -463,8 +463,8 @@
             fastcgi_param  CONTENT_TYPE       $content_type;
             fastcgi_param  CONTENT_LENGTH     $content_length;
 
+            fastcgi_param  SCRIPT_NAME        /;
             fastcgi_param  PATH_INFO          $fastcgi_script_name;
-            fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
             fastcgi_param  REQUEST_URI        $request_uri;
             fastcgi_param  DOCUMENT_URI       $document_uri;
             fastcgi_param  DOCUMENT_ROOT      $document_root;
@@ -490,14 +490,14 @@
 
 =head3  Non-root configuration
 
-If you properly specify the PATH_INFO and SCRIPT_NAME parameters your 
-application will be accessible at any path.  The SCRIPT_NAME variable is the
+If you properly specify the PATH_INFO and SCRIPT_NAME parameters your
+application will be accessible at any path. The SCRIPT_NAME variable is the
 prefix of your application, and PATH_INFO would be everything in addition.
 
 As an example, if your application is rooted at /myapp, you would configure:
 
-    fastcgi_param  PATH_INFO /myapp/;
-    fastcgi_param  SCRIPT_NAME $fastcgi_script_name;
+    fastcgi_param  SCRIPT_NAME /myapp/;
+    fastcgi_param  PATH_INFO   $fastcgi_script_name;
 
 C<$fastcgi_script_name> would be "/myapp/path/of/the/action".  Catalyst will
 process this accordingly and setup the application base as expected.

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/HTTP.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/HTTP.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine/HTTP.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -339,7 +339,7 @@
         use Config;
         $ENV{PERL5LIB} .= join $Config{path_sep}, @INC;
 
-        exec $^X, $0, @{ $options->{argv} };
+        exec $^X, $0, @{ $options->{argv} || [] };
     }
 
     exit;
@@ -534,13 +534,21 @@
         peeraddr  => $iaddr
             ? ( inet_ntoa($iaddr) || '127.0.0.1' )
             : '127.0.0.1',
-        localname => gethostbyaddr( $localiaddr, AF_INET ) || 'localhost',
+        localname => _gethostbyaddr( $localiaddr ),
         localaddr => inet_ntoa($localiaddr) || '127.0.0.1',
     };
 
     return $data;
 }
 
+{   # If you have a crappy DNS server then these can be slow, so cache 'em
+    my %hostname_cache;
+    sub _gethostbyaddr {
+        my $ip = shift;
+        $hostname_cache{$ip} ||= gethostbyaddr( $ip, AF_INET ) || 'localhost';
+    }
+}
+
 sub _inet_addr { unpack "N*", inet_aton( $_[0] ) }
 
 =head2 options

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Engine.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -108,6 +108,24 @@
 
 =cut
 
+sub _dump_error_page_element {
+    my ($self, $i, $element) = @_;
+    my ($name, $val)  = @{ $element };
+
+    # This is fugly, but the metaclass is _HUGE_ and demands waaay too much
+    # scrolling. Suggestions for more pleasant ways to do this welcome.
+    local $val->{'__MOP__'} = "Stringified: "
+        . $val->{'__MOP__'} if ref $val eq 'HASH' && exists $val->{'__MOP__'};
+
+    my $text = encode_entities( dump( $val ));
+    sprintf <<"EOF", $name, $text;
+<h2><a href="#" onclick="toggleDump('dump_$i'); return false">%s</a></h2>
+<div id="dump_$i">
+    <pre wrap="">%s</pre>
+</div>
+EOF
+}
+
 sub finalize_error {
     my ( $self, $c ) = @_;
 
@@ -138,14 +156,7 @@
         my @infos;
         my $i = 0;
         for my $dump ( $c->dump_these ) {
-            my $name  = $dump->[0];
-            my $value = encode_entities( dump( $dump->[1] ));
-            push @infos, sprintf <<"EOF", $name, $value;
-<h2><a href="#" onclick="toggleDump('dump_$i'); return false">%s</a></h2>
-<div id="dump_$i">
-    <pre wrap="">%s</pre>
-</div>
-EOF
+            push @infos, $self->_dump_error_page_element($i, $dump);
             $i++;
         }
         $infos = join "\n", @infos;
@@ -269,7 +280,8 @@
 </html>
 
 
-    # Trick IE
+    # Trick IE. Old versions of IE would display their own error page instead
+    # of ours if we'd give it less than 512 bytes.
     $c->res->{body} .= ( ' ' x 512 );
 
     # Return 500
@@ -327,7 +339,8 @@
               if exists $appclass->config->{uploadtmp};
         }
 
-        while ( my $buffer = $self->read($c) ) {
+        # Check for definedness as you could read '0'
+        while ( defined ( my $buffer = $self->read($c) ) ) {
             $c->prepare_body_chunk($buffer);
         }
 
@@ -530,7 +543,7 @@
             my $u = Catalyst::Request::Upload->new
               (
                size => $upload->{size},
-               type => $headers->content_type,
+               type => scalar $headers->content_type,
                headers => $headers,
                tempname => $upload->{tempname},
                filename => $upload->{filename},
@@ -566,6 +579,10 @@
 
 =head2 $self->read($c, [$maxlength])
 
+Reads from the input stream by calling C<< $self->read_chunk >>.
+
+Maintains the read_length and read_position counters as data is read.
+
 =cut
 
 sub read {
@@ -583,6 +600,11 @@
     my $readlen = ( $remaining > $maxlength ) ? $maxlength : $remaining;
     my $rc = $self->read_chunk( $c, my $buffer, $readlen );
     if ( defined $rc ) {
+        if (0 == $rc) { # Nothing more to read even though Content-Length
+                        # said there should be. FIXME - Warn in the log here?
+            $self->finalize_read;
+            return;
+        }
         $self->read_position( $self->read_position + $rc );
         return $buffer;
     }
@@ -595,7 +617,8 @@
 =head2 $self->read_chunk($c, $buffer, $length)
 
 Each engine implements read_chunk as its preferred way of reading a chunk
-of data.
+of data. Returns the number of bytes read. A return of 0 indicates that
+there is no more data to be read.
 
 =cut
 

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Basic.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Basic.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Basic.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,107 @@
+package Catalyst::Exception::Basic;
+
+use MooseX::Role::WithOverloading;
+use Carp;
+use namespace::clean -except => 'meta';
+
+with 'Catalyst::Exception::Interface';
+
+has message => (
+    is      => 'ro',
+    isa     => 'Str',
+    default => sub { $! || '' },
+);
+
+sub as_string {
+    my ($self) = @_;
+    return $self->message;
+}
+
+around BUILDARGS => sub {
+    my ($next, $class, @args) = @_;
+    if (@args == 1 && !ref $args[0]) {
+        @args = (message => $args[0]);
+    }
+
+    my $args = $class->$next(@args);
+    $args->{message} ||= $args->{error}
+        if exists $args->{error};
+
+    return $args;
+};
+
+sub throw {
+    my $class = shift;
+    my $error = $class->new(@_);
+    local $Carp::CarpLevel = 1;
+    croak $error;
+}
+
+sub rethrow {
+    my ($self) = @_;
+    croak $self;
+}
+
+1;
+
+=head1 NAME
+
+Catalyst::Exception::Basic - Basic Catalyst Exception Role
+
+=head1 SYNOPSIS
+
+   package My::Exception;
+   use Moose;
+   use namespace::clean -except => 'meta';
+
+   with 'Catalyst::Exception::Basic';
+
+   # Elsewhere..
+   My::Exception->throw( qq/Fatal exception/ );
+
+See also L<Catalyst> and L<Catalyst::Exception>.
+
+=head1 DESCRIPTION
+
+This is the basic Catalyst Exception role which implements all of
+L<Catalyst::Exception::Interface>.
+
+=head1 ATTRIBUTES
+
+=head2 message
+
+Holds the exception message.
+
+=head1 METHODS
+
+=head2 as_string
+
+Stringifies the exception's message attribute.
+Called when the object is stringified by overloading.
+
+=head2 throw( $message )
+
+=head2 throw( message => $message )
+
+=head2 throw( error => $error )
+
+Throws a fatal exception.
+
+=head2 rethrow( $exception )
+
+Rethrows a caught exception.
+
+=head2 meta
+
+Provided by Moose
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Detach.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Detach.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Detach.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -3,7 +3,7 @@
 use Moose;
 use namespace::clean -except => 'meta';
 
-extends 'Catalyst::Exception';
+with 'Catalyst::Exception::Basic';
 
 has '+message' => (
     default => "catalyst_detach\n",
@@ -19,4 +19,34 @@
 
 Catalyst::Exception::Detach - Exception for redispatching using $ctx->detach()
 
+=head1 DESCRIPTION
+
+This is the class for the Catalyst Exception which is thrown then you call
+C<< $c->detach() >>.
+
+This class is not intended to be used directly by users.
+
+=head2 meta
+
+Provided by Moose
+
+=head1 SEE ALSO
+
+=over 4
+
+=item L<Catalyst>
+
+=item L<Catalyst::Exception>
+
+=back
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
 =cut

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Go.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Go.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Go.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -3,7 +3,7 @@
 use Moose;
 use namespace::clean -except => 'meta';
 
-extends 'Catalyst::Exception';
+with 'Catalyst::Exception::Basic';
 
 has '+message' => (
     default => "catalyst_go\n",
@@ -19,4 +19,34 @@
 
 Catalyst::Exception::Go - Exception for redispatching using $ctx->go()
 
+=head1 DESCRIPTION
+
+This is the class for the Catalyst Exception which is thrown then you call
+C<< $c->go() >>.
+
+This class is not intended to be used directly by users.
+
+=head2 meta
+
+Provided by Moose
+
+=head1 SEE ALSO
+
+=over 4
+
+=item L<Catalyst>
+
+=item L<Catalyst::Exception>
+
+=back
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
 =cut

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Interface.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Interface.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception/Interface.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,77 @@
+package Catalyst::Exception::Interface;
+
+use MooseX::Role::WithOverloading;
+use namespace::clean -except => 'meta';
+
+use overload
+    q{""}    => sub { $_[0]->as_string },
+    fallback => 1;
+
+requires qw/as_string throw rethrow/;
+
+1;
+
+__END__
+
+=head1 NAME
+
+Catalyst::Exception::Interface - Role defining the interface for Catalyst exceptions
+
+=head1 SYNOPSIS
+
+   package My::Catalyst::Like::Exception;
+   use Moose;
+   use namespace::clean -except => 'meta';
+
+   with 'Catalyst::Exception::Interface';
+
+   # This comprises the required interface.
+   sub as_string { 'the exception text for stringification' }
+   sub die { shift; die @_ }
+   sub die { shift; die @_ }
+
+=head1 DESCRIPTION
+
+This is a role for the required interface for Catalyst exceptions.
+
+It ensures that all exceptions follow the expected interface,
+and adds overloading for stringification when composed onto a
+class.
+
+Note that if you compose this role onto another role, that role
+must use L<MooseX::Role::WithOverloading>.
+
+=head1 REQUIRED METHODS
+
+=head2 as_string
+
+=head2 throw
+
+=head2 rethrow
+
+=head1 METHODS
+
+=head2 meta
+
+Provided by Moose
+
+=head1 SEE ALSO
+
+=over 4
+
+=item L<Catalyst>
+
+=item L<Catalyst::Exception>
+
+=back
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Exception.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -2,12 +2,6 @@
 
 # XXX: See bottom of file for Exception implementation
 
-package Catalyst::Exception::Base;
-
-use Moose;
-use Carp;
-use namespace::clean -except => 'meta';
-
 =head1 NAME
 
 Catalyst::Exception - Catalyst Exception Class
@@ -32,48 +26,6 @@
 
 Throws a fatal exception.
 
-=cut
-
-has message => (
-    is      => 'ro',
-    isa     => 'Str',
-    default => sub { $! || '' },
-);
-
-use overload
-    q{""}    => \&as_string,
-    fallback => 1;
-
-sub as_string {
-    my ($self) = @_;
-    return $self->message;
-}
-
-around BUILDARGS => sub {
-    my ($next, $class, @args) = @_;
-    if (@args == 1 && !ref $args[0]) {
-        @args = (message => $args[0]);
-    }
-
-    my $args = $class->$next(@args);
-    $args->{message} ||= $args->{error}
-        if exists $args->{error};
-
-    return $args;
-};
-
-sub throw {
-    my $class = shift;
-    my $error = $class->new(@_);
-    local $Carp::CarpLevel = 1;
-    croak $error;
-}
-
-sub rethrow {
-    my ($self) = @_;
-    croak $self;
-}
-
 =head2 meta
 
 Provided by Moose
@@ -89,19 +41,30 @@
 
 =cut
 
-Catalyst::Exception::Base->meta->make_immutable;
+{
+    package Catalyst::Exception::Base;
 
-package Catalyst::Exception;
+    use Moose;
+    use namespace::clean -except => 'meta';
 
-use Moose;
-use namespace::clean -except => 'meta';
+    with 'Catalyst::Exception::Basic';
 
-use vars qw[$CATALYST_EXCEPTION_CLASS];
-
-BEGIN {
-    extends($CATALYST_EXCEPTION_CLASS || 'Catalyst::Exception::Base');
+    __PACKAGE__->meta->make_immutable;
 }
 
-__PACKAGE__->meta->make_immutable;
+{
+    package Catalyst::Exception;
 
+    use Moose;
+    use namespace::clean -except => 'meta';
+
+    use vars qw[$CATALYST_EXCEPTION_CLASS];
+
+    BEGIN {
+        extends($CATALYST_EXCEPTION_CLASS || 'Catalyst::Exception::Base');
+    }
+
+    __PACKAGE__->meta->make_immutable;
+}
+
 1;

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ROADMAP.pod
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ROADMAP.pod	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ROADMAP.pod	2010-03-31 18:20:10 UTC (rev 13115)
@@ -8,11 +8,6 @@
 
 Make sure you get it from there to ensure you have the latest version.
 
-=head2 5.80000 1st Quarter 2009
-
-Next major planned release, ports Catalyst to Moose, and does some refactoring
-to help app/ctx.
-
 =head2 5.81000 
 
 =over

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Request.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Request.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Request.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -110,7 +110,7 @@
 sub body {
   my $self = shift;
   $self->_context->prepare_body();
-  $self->_body(@_) if scalar @_;
+  croak 'body is a reader' if scalar @_;
   return blessed $self->_body ? $self->_body->body : $self->_body;
 }
 
@@ -210,7 +210,7 @@
 
 For example, if your action was
 
-    package MyApp::C::Foo;
+    package MyApp::Controller::Foo;
 
     sub moose : Local {
         ...
@@ -673,14 +673,6 @@
     return $uri;
 }
 
-=head2 $req->user
-
-Returns the currently logged in user. B<Highly deprecated>, do not call,
-this will be removed in version 5.81. To retrieve the currently authenticated
-user, see C<< $c->user >> and C<< $c->user_exists >> in
-L<Catalyst::Plugin::Authentication>. For the C<REMOTE_USER> provided by the
-webserver, see C<< $req->remote_user >> below.
-
 =head2 $req->remote_user
 
 Returns the value of the C<REMOTE_USER> environment variable.

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Response.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Response.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Response.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -65,7 +65,7 @@
 
 =head1 METHODS
 
-=head2 $res->body(<$text|$fh|$iohandle_object)
+=head2 $res->body( $text | $fh | $iohandle_object )
 
     $c->response->body('Catalyst rocks!');
 
@@ -150,7 +150,7 @@
 
 This is a convenience method that sets the Location header to the
 redirect destination, and then sets the response status.  You will
-want to C< return; > or C< $c->detach() > to interrupt the normal
+want to C< return > or C<< $c->detach() >> to interrupt the normal
 processing flow if you want the redirect to occur straight away.
 
 =cut

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Runtime.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Runtime.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Runtime.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -7,10 +7,8 @@
 
 # Remember to update this in Catalyst as well!
 
-our $VERSION='5.80013';
+our $VERSION='5.80022';
 
-$VERSION = eval $VERSION;
-
 =head1 NAME
 
 Catalyst::Runtime - The Catalyst Framework Runtime

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/CGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/CGI.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/CGI.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,34 @@
+package Catalyst::Script::CGI;
+use Moose;
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
+use namespace::autoclean;
+
+with 'Catalyst::ScriptRole';
+
+__PACKAGE__->meta->make_immutable;
+
+=head1 NAME
+
+Catalyst::Script::CGI - The CGI Catalyst Script
+
+=head1 SYNOPSIS
+
+  myapp_cgi.pl [options]
+
+  Options:
+  -h     --help           display this help and exits
+
+=head1 DESCRIPTION
+
+This is a script to run the Catalyst engine specialized for the CGI environment.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Create.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Create.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Create.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,103 @@
+package Catalyst::Script::Create;
+use Moose;
+use MooseX::Types::Moose qw/Bool Str/;
+use namespace::autoclean;
+
+with 'Catalyst::ScriptRole';
+
+has force => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'nonew',
+    isa           => Bool,
+    is            => 'ro',
+    documentation => 'Force new scripts',
+);
+
+has debug => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'd',
+    isa           => Bool,
+    is            => 'ro',
+    documentation => 'Force debug mode',
+);
+
+has mechanize => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'mech',
+    isa           => Bool,
+    is            => 'ro',
+    documentation => 'use WWW::Mechanize',
+);
+
+has helper_class => (
+    isa     => Str,
+    is      => 'ro',
+    builder => '_build_helper_class',
+);
+
+sub _build_helper_class { 'Catalyst::Helper' }
+
+sub run {
+    my ($self) = @_;
+
+    $self->_getopt_full_usage if !$self->ARGV->[0];
+
+    my $helper_class = $self->helper_class;
+    Class::MOP::load_class($helper_class);
+    my $helper = $helper_class->new( { '.newfiles' => !$self->force, mech => $self->mechanize } );
+
+    $self->_getopt_full_usage unless $helper->mk_component( $self->application_name, @ARGV );
+
+}
+
+__PACKAGE__->meta->make_immutable;
+
+=head1 NAME
+
+Catalyst::Script::Create - Create a new Catalyst Component
+
+=head1 SYNOPSIS
+
+ myapp_create.pl [options] model|view|controller name [helper] [options]
+
+ Options:
+   --force        don't create a .new file where a file to be created exists
+   --mechanize    use Test::WWW::Mechanize::Catalyst for tests if available
+   --help         display this help and exits
+
+ Examples:
+   myapp_create.pl controller My::Controller
+   myapp_create.pl controller My::Controller BindLex
+   myapp_create.pl -mechanize controller My::Controller
+   myapp_create.pl view My::View
+   myapp_create.pl view MyView TT
+   myapp_create.pl view TT TT
+   myapp_create.pl model My::Model
+   myapp_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
+   dbi:SQLite:/tmp/my.db
+   myapp_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
+   dbi:Pg:dbname=foo root 4321
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Create a new Catalyst Component.
+
+Existing component files are not overwritten.  If any of the component files
+to be created already exist the file will be written with a '.new' suffix.
+This behavior can be suppressed with the C<--force> option.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/FastCGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/FastCGI.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/FastCGI.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,113 @@
+package Catalyst::Script::FastCGI;
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
+use Moose;
+use MooseX::Types::Moose qw/Str Bool Int/;
+use namespace::autoclean;
+
+with 'Catalyst::ScriptRole';
+
+has listen => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'l',
+    isa           => Str,
+    is            => 'ro',
+    documentation => 'Specify a listening port/socket',
+);
+
+has pidfile => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => [qw/pid p/],
+    isa           => Str,
+    is            => 'ro',
+    documentation => 'Specify a pidfile',
+);
+
+has daemon => (
+    traits        => [qw(Getopt)],
+    isa           => Bool,
+    is            => 'ro',
+    cmd_aliases   => [qw/d detach/], # Eww, detach is here as we fucked it up.. Deliberately not documented
+    documentation => 'Daemonize (go into the background)',
+);
+
+has manager => (
+    traits        => [qw(Getopt)],
+    isa           => Str,
+    is            => 'ro',
+    cmd_aliases   => 'M',
+    documentation => 'Use a different FastCGI process manager class',
+);
+
+has keeperr => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'e',
+    isa           => Bool,
+    is            => 'ro',
+    documentation => 'Log STDERR',
+);
+
+has nproc => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'n',
+    isa           => Int,
+    is            => 'ro',
+    documentation => 'Specify a number of child processes',
+);
+
+sub _application_args {
+    my ($self) = shift;
+    return (
+        $self->listen,
+        {
+            nproc   => $self->nproc,
+            pidfile => $self->pidfile,
+            manager => $self->manager,
+            detach  => $self->daemon,
+            keep_stderr => $self->keeperr,
+        }
+    );
+}
+
+__PACKAGE__->meta->make_immutable;
+
+=head1 NAME
+
+Catalyst::Script::FastCGI - The FastCGI Catalyst Script
+
+=head1 SYNOPSIS
+
+  myapp_fastcgi.pl [options]
+
+ Options:
+   -? --help      display this help and exits
+   -l --listen    Socket path to listen on
+                  (defaults to standard input)
+                  can be HOST:PORT, :PORT or a
+                  filesystem path
+   -n --nproc     specify number of processes to keep
+                  to serve requests (defaults to 1,
+                  requires -listen)
+   -p --pidfile   specify filename for pid file
+                  (requires -listen)
+   -d --daemon    daemonize (requires -listen)
+   -M --manager   specify alternate process manager
+                  (FCGI::ProcManager sub-class)
+                  or empty string to disable
+   -e --keeperr   send error messages to STDOUT, not
+                  to the webserver
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as fastcgi.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Server.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Server.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Server.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,258 @@
+package Catalyst::Script::Server;
+
+BEGIN {
+    $ENV{CATALYST_ENGINE} ||= 'HTTP';
+    require Catalyst::Engine::HTTP;
+}
+
+use Moose;
+use MooseX::Types::Common::Numeric qw/PositiveInt/;
+use MooseX::Types::Moose qw/ArrayRef Str Bool Int RegexpRef/;
+use Catalyst::Utils;
+use namespace::autoclean;
+
+with 'Catalyst::ScriptRole';
+
+__PACKAGE__->meta->get_attribute('help')->cmd_aliases('?');
+
+has debug => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'd',
+    isa           => Bool,
+    is            => 'ro',
+    documentation => q{Force debug mode},
+);
+
+has host => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'h',
+    isa           => Str,
+    is            => 'ro',
+    # N.B. undef (the default) means we bind on all interfaces on the host.
+    documentation => 'Specify a hostname or IP on this host for the server to bind to',
+);
+
+has fork => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'f',
+    isa           => Bool,
+    is            => 'ro',
+    default       => 0,
+    documentation => 'Fork the server to be able to serve multiple requests at once',
+);
+
+has port => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'p',
+    isa           => PositiveInt,
+    is            => 'ro',
+    default       => sub {
+        Catalyst::Utils::env_value(shift->application_name, 'port') || 3000
+    },
+    documentation => 'Specify a different listening port (to the default port 3000)',
+);
+
+has pidfile => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'pid',
+    isa           => Str,
+    is            => 'ro',
+    documentation => 'Specify a pidfile',
+);
+
+has keepalive => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'k',
+    isa           => Bool,
+    is            => 'ro',
+    default       => 0,
+    documentation => 'Support keepalive',
+);
+
+has background => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'bg',
+    isa           => Bool,
+    is            => 'ro',
+    default       => 0,
+    documentation => 'Run in the background',
+);
+
+has restart => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'r',
+    isa           => Bool,
+    is            => 'ro',
+    default       => sub {
+        Catalyst::Utils::env_value(shift->application_name, 'reload') || 0;
+    },
+    documentation => 'use Catalyst::Restarter to detect code changes and restart the application',
+);
+
+has restart_directory => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => [ 'rdir', 'restartdirectory' ],
+    isa           => ArrayRef[Str],
+    is            => 'ro',
+    documentation => 'Restarter directory to watch',
+    predicate     => '_has_restart_directory',
+);
+
+has restart_delay => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'rd',
+    isa           => Int,
+    is            => 'ro',
+    documentation => 'Set a restart delay',
+    predicate     => '_has_restart_delay',
+);
+
+{
+    use Moose::Util::TypeConstraints;
+
+    my $tc = subtype as RegexpRef;
+    coerce $tc, from Str, via { qr/$_/ };
+
+    MooseX::Getopt::OptionTypeMap->add_option_type_to_map($tc => '=s');
+
+    has restart_regex => (
+        traits        => [qw(Getopt)],
+        cmd_aliases   => 'rr',
+        isa           => $tc,
+        coerce        => 1,
+        is            => 'ro',
+        documentation => 'Restart regex',
+        predicate     => '_has_restart_regex',
+    );
+}
+
+has follow_symlinks => (
+    traits        => [qw(Getopt)],
+    cmd_aliases   => 'sym',
+    isa           => Bool,
+    is            => 'ro',
+    default       => 0,
+    documentation => 'Follow symbolic links',
+    predicate     => '_has_follow_symlinks',
+);
+
+sub _restarter_args {
+    my $self = shift;
+
+    return (
+        argv => $self->ARGV,
+        start_sub => sub { $self->_run_application },
+        ($self->_has_follow_symlinks   ? (follow_symlinks => $self->follow_symlinks)   : ()),
+        ($self->_has_restart_delay     ? (sleep_interval  => $self->restart_delay)     : ()),
+        ($self->_has_restart_directory ? (directories     => $self->restart_directory) : ()),
+        ($self->_has_restart_regex     ? (filter          => $self->restart_regex)     : ()),
+    );
+}
+
+sub run {
+    my $self = shift;
+
+    local $ENV{CATALYST_DEBUG} = 1
+        if $self->debug;
+
+    if ( $self->restart ) {
+        die "Cannot run in the background and also watch for changed files.\n"
+            if $self->background;
+
+        # If we load this here, then in the case of a restarter, it does not
+        # need to be reloaded for each restart.
+        require Catalyst;
+
+        # If this isn't done, then the Catalyst::Devel tests for the restarter
+        # fail.
+        $| = 1 if $ENV{HARNESS_ACTIVE};
+
+        require Catalyst::Restarter;
+
+        my $subclass = Catalyst::Restarter->pick_subclass;
+
+        my $restarter = $subclass->new(
+            $self->_restarter_args()
+        );
+
+        $restarter->run_and_watch;
+    }
+    else {
+        $self->_run_application;
+    }
+
+
+}
+
+sub _application_args {
+    my ($self) = shift;
+    return (
+        $self->port,
+        $self->host,
+        {
+           argv => $self->ARGV,
+           map { $_ => $self->$_ } qw/
+                fork
+                keepalive
+                background
+                pidfile
+                keepalive
+                follow_symlinks
+            /,
+        },
+    );
+}
+
+__PACKAGE__->meta->make_immutable;
+
+1;
+
+=head1 NAME
+
+Catalyst::Script::Server - Catalyst test server
+
+=head1 SYNOPSIS
+
+ myapp_server.pl [options]
+
+ Options:
+   -d     --debug          force debug mode
+   -f     --fork           handle each request in a new process
+                      (defaults to false)
+          --help           display this help and exits
+   -h     --host           host (defaults to all)
+   -p     --port           port (defaults to 3000)
+   -k     --keepalive      enable keep-alive connections
+   -r     --restart        restart when files get modified
+                       (defaults to false)
+   --rd   --restart_delay  delay between file checks
+                      (ignored if you have Linux::Inotify2 installed)
+   --rr   --restart_regex  regex match files that trigger
+                      a restart when modified
+                      (defaults to '\.yml$|\.yaml$|\.conf|\.pm$')
+   --rdir --restart_directory  the directory to search for
+                      modified files, can be set mulitple times
+                      (defaults to '[SCRIPT_DIR]/..')
+   --sym  --follow_symlinks   follow symlinks in search directories
+                      (defaults to false. this is a no-op on Win32)
+   --bg   --background        run the process in the background
+   --pid  --pidfile           specify filename for pid file
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst test server for this application.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Test.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Test.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Script/Test.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,43 @@
+package Catalyst::Script::Test;
+use Moose;
+use Catalyst::Test ();
+use namespace::autoclean;
+
+with 'Catalyst::ScriptRole';
+
+sub run {
+    my $self = shift;
+
+    Catalyst::Test->import($self->application_name);
+
+    print request($self->ARGV->[0])->content  . "\n";
+}
+
+
+__PACKAGE__->meta->make_immutable;
+
+=head1 NAME
+
+Catalyst::Script::Test - Test Catalyst application on the command line
+
+=head1 SYNOPSIS
+
+  myapp_test.pl [options] /path
+
+  Options:
+  -h     --help           display this help and exits
+
+=head1 DESCRIPTION
+
+Script to perform a test hit against your application and display the output.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ScriptRole.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ScriptRole.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ScriptRole.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,112 @@
+package Catalyst::ScriptRole;
+use Moose::Role;
+use MooseX::Types::Moose qw/Str Bool/;
+use Pod::Usage;
+use MooseX::Getopt;
+use namespace::autoclean;
+
+with 'MooseX::Getopt' => {
+    excludes => [qw/
+        _getopt_spec_warnings
+        _getopt_spec_exception
+        _getopt_full_usage
+    /],
+};
+
+has application_name => (
+    traits   => ['NoGetopt'],
+    isa      => Str,
+    is       => 'ro',
+    required => 1,
+);
+
+has help => (
+    traits        => ['Getopt'],
+    isa           => Bool,
+    is            => 'ro',
+    documentation => 'Display this help and exit',
+    cmd_aliases   => ['?', 'h'],
+);
+
+sub _getopt_spec_exception {}
+
+sub _getopt_spec_warnings {
+    shift;
+    warn @_;
+}
+
+sub _getopt_full_usage {
+    my $self = shift;
+    pod2usage();
+    exit 0;
+}
+
+before run => sub {
+    my $self = shift;
+    $self->_getopt_full_usage if $self->help;
+};
+
+sub run {
+    my $self = shift;
+    $self->_run_application;
+}
+
+sub _application_args {
+    ()
+}
+
+sub _run_application {
+    my $self = shift;
+    my $app = $self->application_name;
+    Class::MOP::load_class($app);
+    $app->run($self->_application_args);
+}
+
+1;
+
+=head1 NAME
+
+Catalyst::ScriptRole - Common functionality for Catalyst scripts.
+
+=head1 SYNOPSIS
+
+    package MyApp::Script::Foo;
+    use Moose;
+    use namespace::autoclean;
+
+    with 'Catalyst::ScriptRole';
+
+    sub _application_args { ... }
+
+=head1 DESCRIPTION
+
+Role with the common functionality of Catalyst scripts.
+
+=head1 METHODS
+
+=head2 run
+
+The method invoked to run the application.
+
+=head1 ATTRIBUTES
+
+=head2 application_name
+
+The name of the application class, e.g. MyApp
+
+=head1 SEE ALSO
+
+L<Catalyst>
+
+L<MooseX::Getopt>
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ScriptRunner.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ScriptRunner.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/ScriptRunner.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,56 @@
+package Catalyst::ScriptRunner;
+use Moose;
+use FindBin;
+use lib;
+use File::Spec;
+use namespace::autoclean;
+
+sub run {
+    my ($self, $class, $scriptclass) = @_;
+    my $classtoload = "${class}::Script::$scriptclass";
+
+    lib->import(File::Spec->catdir($FindBin::Bin, '..', 'lib'));
+
+    unless ( eval { Class::MOP::load_class($classtoload) } ) {
+        warn("Could not load $classtoload - falling back to Catalyst::Script::$scriptclass : $@\n")
+            if $@ !~ /Can't locate/;
+        $classtoload = "Catalyst::Script::$scriptclass";
+        Class::MOP::load_class($classtoload);
+    }
+    $classtoload->new_with_options( application_name => $class )->run;
+}
+
+__PACKAGE__->meta->make_immutable;
+
+=head1 NAME
+
+Catalyst::ScriptRunner - The Catalyst Framework script runner
+
+=head1 SYNOPSIS
+
+    # Will run MyApp::Script::Server if it exists, otherwise
+    # will run Catalyst::Script::Server.
+    Catalyst::ScriptRunner->run('MyApp', 'Server');
+
+=head1 DESCRIPTION
+
+This class is responsible for running scripts, either in the application specific namespace
+(e.g. C<MyApp::Script::Server>), or the Catalyst namespace (e.g. C<Catalyst::Script::Server>)
+
+=head1 METHODS
+
+=head2 run ($application_class, $scriptclass)
+
+Called with two parameters, the application classs (e.g. MyApp)
+and the script class, (i.e. one of Server/FastCGI/CGI/Create/Test)
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Test.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Test.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Test.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -103,6 +103,12 @@
 
     sub import {
         my ($self, $class, $opts) = @_;
+        Carp::carp(
+qq{Importing Catalyst::Test without an application name is deprecated:\n
+Instead of saying: use Catalyst::Test;
+say: use Catalyst::Test (); # If you don't want to import a test app right now.
+or say: use Catalyst::Test 'MyApp'; # If you do want to import a test app.\n\n})
+        unless $class;
         $import->($self, '-all' => { class => $class });
         $opts = {} unless ref $opts eq 'HASH';
         $default_host = $opts->{default_host} if exists $opts->{default_host};

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Upgrading.pod
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Upgrading.pod	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Upgrading.pod	2010-03-31 18:20:10 UTC (rev 13115)
@@ -217,7 +217,7 @@
 
 Using this now causes infinite recursion between MyApp::setup and
 Catalyst::setup, due to other backwards compatibility issues related to how
-plugin setup works. Moose method modifiers like C<< before|after|around 'setup
+plugin setup works. Moose method modifiers like C<< before|after|around setup
 => sub { ... }; >> also will not operate correctly on the setup method.
 
 The right way to do it is this:

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Utils.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Utils.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst/Utils.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -124,7 +124,7 @@
 Returns a tempdir for a class. If create is true it will try to create the path.
 
     My::App becomes /tmp/my/app
-    My::App::C::Foo::Bar becomes /tmp/my/app/c/foo/bar
+    My::App::Controller::Foo::Bar becomes /tmp/my/app/c/foo/bar
 
 =cut
 

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/lib/Catalyst.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -4,7 +4,6 @@
 use Moose::Meta::Class ();
 extends 'Catalyst::Component';
 use Moose::Util qw/find_meta/;
-use bytes;
 use B::Hooks::EndOfScope ();
 use Catalyst::Exception;
 use Catalyst::Exception::Detach;
@@ -79,15 +78,8 @@
 
 # Remember to update this in Catalyst::Runtime as well!
 
-our $VERSION = '5.80013';
+our $VERSION = '5.80022';
 
-{
-    my $dev_version = $VERSION =~ /_\d{2}$/;
-    *_IS_DEVELOPMENT_VERSION = sub () { $dev_version };
-}
-
-$VERSION = eval $VERSION;
-
 sub import {
     my ( $class, @arguments ) = @_;
 
@@ -98,11 +90,6 @@
     my $caller = caller();
     return if $caller eq 'main';
 
-    # Kill Adopt::NEXT warnings if we're a non-RC version
-    unless (_IS_DEVELOPMENT_VERSION()) {
-        Class::C3::Adopt::NEXT->unimport(qr/^Catalyst::/);
-    }
-
     my $meta = Moose::Meta::Class->initialize($caller);
     unless ( $caller->isa('Catalyst') ) {
         my @superclasses = ($meta->superclasses, $class, 'Catalyst::Controller');
@@ -255,6 +242,9 @@
 settings override the application, with <MYAPP>_DEBUG having the highest
 priority.
 
+This sets the log level to 'debug' and enables full debug output on the
+error screen. If you only want the latter, see L<< $c->debug >>.
+
 =head2 -Engine
 
 Forces Catalyst to use a specific engine. Omit the
@@ -274,6 +264,14 @@
 the name will be replaced with underscores, e.g. MyApp::Web should use
 MYAPP_WEB_HOME. If both variables are set, the MYAPP_HOME one will be used.
 
+If none of these are set, Catalyst will attempt to automatically detect the
+home directory. If you are working in a development envirnoment, Catalyst
+will try and find the directory containing either Makefile.PL, Build.PL or
+dist.ini. If the application has been installed into the system (i.e.
+you have done C<make install>), then Catalyst will use the path to your
+application module, without the .pm extension (ie, /foo/MyApp if your
+application was installed at /foo/MyApp.pm)
+
 =head2 -Log
 
     use Catalyst '-Log=warn,fatal,error';
@@ -333,8 +331,8 @@
 
     my $foodata = $c->forward('/foo');
     $c->forward('index');
-    $c->forward(qw/MyApp::Model::DBIC::Foo do_stuff/);
-    $c->forward('MyApp::View::TT');
+    $c->forward(qw/Model::DBIC::Foo do_stuff/);
+    $c->forward('View::TT');
 
 Note that L<< forward|/"$c->forward( $action [, \@arguments ] )" >> implies
 an C<< eval { } >> around the call (actually
@@ -343,22 +341,22 @@
 need to do something like:
 
     $c->forward('foo');
-    die $c->error if $c->error;
+    die join "\n", @{ $c->error } if @{ $c->error };
 
 Or make sure to always return true values from your actions and write
 your code like this:
 
     $c->forward('foo') || return;
-    
+
 Another note is that C<< $c->forward >> always returns a scalar because it
 actually returns $c->state which operates in a scalar context.
 Thus, something like:
 
     return @array;
-    
-in an action that is forwarded to is going to return a scalar, 
+
+in an action that is forwarded to is going to return a scalar,
 i.e. how many items are in that array, which is probably not what you want.
-If you need to return an array then return a reference to it, 
+If you need to return an array then return a reference to it,
 or stash it like so:
 
     $c->stash->{array} = \@array;
@@ -418,9 +416,9 @@
 
 =head2 $c->go( $class, $method, [, \@captures, \@arguments ] )
 
-The relationship between C<go> and 
+The relationship between C<go> and
 L<< visit|/"$c->visit( $action [, \@captures, \@arguments ] )" >> is the same as
-the relationship between 
+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,
@@ -505,7 +503,7 @@
 
 =head2 $c->state
 
-Contains the return value of the last executed action.   
+Contains the return value of the last executed action.
 Note that << $c->state >> operates in a scalar context which means that all
 values it returns are scalar.
 
@@ -639,7 +637,13 @@
 sub controller {
     my ( $c, $name, @args ) = @_;
 
+    my $appclass = ref($c) || $c;
     if( $name ) {
+        unless ( ref($name) ) { # Direct component hash lookup to avoid costly regexps
+            my $comps = $c->components;
+            my $check = $appclass."::Controller::".$name;
+            return $c->_filter_component( $comps->{$check}, @args ) if exists $comps->{$check};
+        }
         my @result = $c->_comp_search_prefixes( $name, qw/Controller C/ );
         return map { $c->_filter_component( $_, @args ) } @result if ref $name;
         return $c->_filter_component( $result[ 0 ], @args );
@@ -673,6 +677,11 @@
     my ( $c, $name, @args ) = @_;
     my $appclass = ref($c) || $c;
     if( $name ) {
+        unless ( ref($name) ) { # Direct component hash lookup to avoid costly regexps
+            my $comps = $c->components;
+            my $check = $appclass."::Model::".$name;
+            return $c->_filter_component( $comps->{$check}, @args ) if exists $comps->{$check};
+        }
         my @result = $c->_comp_search_prefixes( $name, qw/Model M/ );
         return map { $c->_filter_component( $_, @args ) } @result if ref $name;
         return $c->_filter_component( $result[ 0 ], @args );
@@ -727,6 +736,11 @@
 
     my $appclass = ref($c) || $c;
     if( $name ) {
+        unless ( ref($name) ) { # Direct component hash lookup to avoid costly regexps
+            my $comps = $c->components;
+            my $check = $appclass."::View::".$name;
+            return $c->_filter_component( $comps->{$check}, @args ) if exists $comps->{$check};
+        }
         my @result = $c->_comp_search_prefixes( $name, qw/View V/ );
         return map { $c->_filter_component( $_, @args ) } @result if ref $name;
         return $c->_filter_component( $result[ 0 ], @args );
@@ -803,7 +817,7 @@
 If Catalyst can't find a component by name, it will fallback to regex
 matching by default. To disable this behaviour set
 disable_component_resolution_regex_fallback to a true value.
-    
+
     __PACKAGE__->config( disable_component_resolution_regex_fallback => 1 );
 
 =cut
@@ -935,6 +949,8 @@
 
 =back
 
+The first three also set the log level to 'debug'.
+
 Calling C<< $c->debug(1) >> has no effect.
 
 =cut
@@ -1145,7 +1161,6 @@
         my $name = $class->config->{name} || 'Application';
         $class->log->info("$name powered by Catalyst $Catalyst::VERSION");
     }
-    $class->log->_flush() if $class->log->can('_flush');
 
     # Make sure that the application class becomes immutable at this point,
     B::Hooks::EndOfScope::on_scope_end {
@@ -1170,27 +1185,33 @@
         ) unless $meta->is_immutable;
     };
 
+    if ($class->config->{case_sensitive}) {
+        $class->log->warn($class . "->config->{case_sensitive} is set.");
+        $class->log->warn("This setting is deprecated and planned to be removed in Catalyst 5.81.");
+    }
+
     $class->setup_finalize;
+    # Should be the last thing we do so that user things hooking
+    # setup_finalize can log..
+    $class->log->_flush() if $class->log->can('_flush');
+    return 1; # Explicit return true as people have __PACKAGE__->setup as the last thing in their class. HATE.
 }
 
-
 =head2 $app->setup_finalize
 
-A hook to attach modifiers to.
-Using C<< after setup => sub{}; >> doesn't work, because of quirky things done for plugin setup.
-Also better than C< setup_finished(); >, as that is a getter method.
+A hook to attach modifiers to. This method does not do anything except set the
+C<setup_finished> accessor.
 
-    sub setup_finalize {
+Applying method modifiers to the C<setup> method doesn't work, because of quirky thingsdone for plugin setup.
 
+Example:
+
+    after setup_finalize => sub {
         my $app = shift;
 
-        ## do stuff, i.e., determine a primary key column for sessions stored in a DB
+        ## do stuff here..
+    };
 
-        $app->next::method(@_);
-
-
-    }
-
 =cut
 
 sub setup_finalize {
@@ -1198,7 +1219,7 @@
     $class->setup_finished(1);
 }
 
-=head2 $c->uri_for( $path, @args?, \%query_values? )
+=head2 $c->uri_for( $path?, @args?, \%query_values? )
 
 =head2 $c->uri_for( $action, \@captures?, @args?, \%query_values? )
 
@@ -1206,6 +1227,10 @@
 provided path, and the additional arguments and query parameters provided.
 When used as a string, provides a textual URI.
 
+If no arguments are provided, the URI for the current action is returned.
+To return the current action and also provide @args, use
+C<< $c->uri_for( $c->action, @args ) >>.
+
 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
@@ -1246,10 +1271,31 @@
         $path .= '/';
     }
 
+    undef($path) if (defined $path && $path eq '');
+
+    my $params =
+      ( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} );
+
+    carp "uri_for called with undef argument" if grep { ! defined $_ } @args;
+    foreach my $arg (@args) {
+        utf8::encode($arg) if utf8::is_utf8($arg);
+    }
+    s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args;
+    if (blessed $path) { # Action object only.
+        s|/|%2F|g for @args;
+    }
+
     if ( blessed($path) ) { # action object
-        my $captures = ( scalar @args && ref $args[0] eq 'ARRAY'
-                         ? shift(@args)
-                         : [] );
+        my $captures = [ map { s|/|%2F|g; $_; }
+                        ( scalar @args && ref $args[0] eq 'ARRAY'
+                         ? @{ shift(@args) }
+                         : ()) ];
+
+        foreach my $capture (@$captures) {
+            utf8::encode($capture) if utf8::is_utf8($capture);
+            $capture =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go;
+        }
+
         my $action = $path;
         $path = $c->dispatcher->uri_for_action($action, $captures);
         if (not defined $path) {
@@ -1262,12 +1308,6 @@
 
     undef($path) if (defined $path && $path eq '');
 
-    my $params =
-      ( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} );
-
-    carp "uri_for called with undef argument" if grep { ! defined $_ } @args;
-    s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args;
-
     unshift(@args, $path);
 
     unless (defined $path && $path =~ s!^/!!) { # in-place strip
@@ -1327,6 +1367,20 @@
 You can also pass in a Catalyst::Action object, in which case it is passed to
 C<< $c->uri_for >>.
 
+Note that although the path looks like a URI that dispatches to the wanted action, it is not a URI, but an internal path to that action.
+
+For example, if the action looks like:
+
+ package MyApp::Controller::Users;
+
+ sub lst : Path('the-list') {}
+
+You can use:
+
+ $c->uri_for_action('/users/lst')
+
+and it will create the URI /users/the-list.
+
 =back
 
 =cut
@@ -1459,7 +1513,7 @@
                     <a href="http://cpansearch.perl.org/search?query=Catalyst%3A%3AModel%3A%3A&amp;mode=all">models</a>, and
                     <a href="http://cpansearch.perl.org/search?query=Catalyst%3A%3AView%3A%3A&amp;mode=all">views</a>;
                     they can save you a lot of work.</p>
-                    <pre><code>script/${prefix}_create.pl -help</code></pre>
+                    <pre><code>script/${prefix}_create.pl --help</code></pre>
                     <p>Also, be sure to check out the vast and growing
                     collection of <a href="http://search.cpan.org/search?query=Catalyst">plugins for Catalyst on CPAN</a>;
                     you are likely to find what you need there.
@@ -1702,6 +1756,8 @@
         $c->finalize_body;
     }
 
+    $c->log_response;
+
     if ($c->use_stats) {
         my $elapsed = sprintf '%f', $c->stats->elapsed;
         my $av = $elapsed == 0 ? '??' : sprintf '%.3f', 1 / $elapsed;
@@ -1779,7 +1835,7 @@
         }
         else {
             # everything should be bytes at this point, but just in case
-            $response->content_length( bytes::length( $response->body ) );
+            $response->content_length( length( $response->body ) );
         }
     }
 
@@ -1926,8 +1982,7 @@
     $path       = '/' unless length $path;
     my $address = $c->req->address || '';
 
-    $c->log->debug(qq/"$method" request for "$path" from "$address"/)
-      if $c->debug;
+    $c->log_request;
 
     $c->prepare_action;
 
@@ -1957,17 +2012,6 @@
     $c->engine->prepare_body( $c, @_ );
     $c->prepare_parameters;
     $c->prepare_uploads;
-
-    if ( $c->debug && keys %{ $c->req->body_parameters } ) {
-        my $t = Text::SimpleTable->new( [ 35, 'Parameter' ], [ 36, 'Value' ] );
-        for my $key ( sort keys %{ $c->req->body_parameters } ) {
-            my $param = $c->req->body_parameters->{$key};
-            my $value = defined($param) ? $param : '';
-            $t->row( $key,
-                ref $value eq 'ARRAY' ? ( join ', ', @$value ) : $value );
-        }
-        $c->log->debug( "Body Parameters are:\n" . $t->draw );
-    }
 }
 
 =head2 $c->prepare_body_chunk( $chunk )
@@ -2051,55 +2095,156 @@
     my $c = shift;
 
     $c->engine->prepare_query_parameters( $c, @_ );
+}
 
-    if ( $c->debug && keys %{ $c->request->query_parameters } ) {
-        my $t = Text::SimpleTable->new( [ 35, 'Parameter' ], [ 36, 'Value' ] );
-        for my $key ( sort keys %{ $c->req->query_parameters } ) {
-            my $param = $c->req->query_parameters->{$key};
-            my $value = defined($param) ? $param : '';
-            $t->row( $key,
-                ref $value eq 'ARRAY' ? ( join ', ', @$value ) : $value );
-        }
-        $c->log->debug( "Query Parameters are:\n" . $t->draw );
+=head2 $c->log_request
+
+Writes information about the request to the debug logs.  This includes:
+
+=over 4
+
+=item * Request method, path, and remote IP address
+
+=item * Query keywords (see L<Catalyst::Request/query_keywords>)
+
+=item * Request parameters
+
+=item * File uploads
+
+=back
+
+=cut
+
+sub log_request {
+    my $c = shift;
+
+    return unless $c->debug;
+
+    my($dump) = grep {$_->[0] eq 'Request' } $c->dump_these;
+    my $request = $dump->[1];
+
+    my ( $method, $path, $address ) = ( $request->method, $request->path, $request->address );
+    $method ||= '';
+    $path = '/' unless length $path;
+    $address ||= '';
+    $c->log->debug(qq/"$method" request for "$path" from "$address"/);
+
+    $c->log_request_headers($request->headers);
+
+    if ( my $keywords = $request->query_keywords ) {
+        $c->log->debug("Query keywords are: $keywords");
     }
+
+    $c->log_request_parameters( query => $request->query_parameters, body => $request->body_parameters );
+
+    $c->log_request_uploads($request);
 }
 
-=head2 $c->prepare_read
+=head2 $c->log_response
 
-Prepares the input for reading.
+Writes information about the response to the debug logs by calling
+C<< $c->log_response_status_line >> and C<< $c->log_response_headers >>.
 
 =cut
 
-sub prepare_read { my $c = shift; $c->engine->prepare_read( $c, @_ ) }
+sub log_response {
+    my $c = shift;
 
-=head2 $c->prepare_request
+    return unless $c->debug;
 
-Prepares the engine request.
+    my($dump) = grep {$_->[0] eq 'Response' } $c->dump_these;
+    my $response = $dump->[1];
 
+    $c->log_response_status_line($response);
+    $c->log_response_headers($response->headers);
+}
+
+=head2 $c->log_response_status_line($response)
+
+Writes one line of information about the response to the debug logs.  This includes:
+
+=over 4
+
+=item * Response status code
+
+=item * Content-Type header (if present)
+
+=item * Content-Length header (if present)
+
+=back
+
 =cut
 
-sub prepare_request { my $c = shift; $c->engine->prepare_request( $c, @_ ) }
+sub log_response_status_line {
+    my ($c, $response) = @_;
 
-=head2 $c->prepare_uploads
+    $c->log->debug(
+        sprintf(
+            'Response Code: %s; Content-Type: %s; Content-Length: %s',
+            $response->status                            || 'unknown',
+            $response->headers->header('Content-Type')   || 'unknown',
+            $response->headers->header('Content-Length') || 'unknown'
+        )
+    );
+}
 
-Prepares uploads.
+=head2 $c->log_response_headers($headers);
 
+Hook method which can be wrapped by plugins to log the responseheaders.
+No-op in the default implementation.
+
 =cut
 
-sub prepare_uploads {
-    my $c = shift;
+sub log_response_headers {}
 
-    $c->engine->prepare_uploads( $c, @_ );
+=head2 $c->log_request_parameters( query => {}, body => {} )
 
-    if ( $c->debug && keys %{ $c->request->uploads } ) {
+Logs request parameters to debug logs
+
+=cut
+
+sub log_request_parameters {
+    my $c          = shift;
+    my %all_params = @_;
+
+    return unless $c->debug;
+
+    my $column_width = Catalyst::Utils::term_width() - 44;
+    foreach my $type (qw(query body)) {
+        my $params = $all_params{$type};
+        next if ! keys %$params;
+        my $t = Text::SimpleTable->new( [ 35, 'Parameter' ], [ $column_width, 'Value' ] );
+        for my $key ( sort keys %$params ) {
+            my $param = $params->{$key};
+            my $value = defined($param) ? $param : '';
+            $t->row( $key, ref $value eq 'ARRAY' ? ( join ', ', @$value ) : $value );
+        }
+        $c->log->debug( ucfirst($type) . " Parameters are:\n" . $t->draw );
+    }
+}
+
+=head2 $c->log_request_uploads
+
+Logs file uploads included in the request to the debug logs.
+The parameter name, filename, file type, and file size are all included in
+the debug logs.
+
+=cut
+
+sub log_request_uploads {
+    my $c = shift;
+    my $request = shift;
+    return unless $c->debug;
+    my $uploads = $request->uploads;
+    if ( keys %$uploads ) {
         my $t = Text::SimpleTable->new(
             [ 12, 'Parameter' ],
             [ 26, 'Filename' ],
             [ 18, 'Type' ],
             [ 9,  'Size' ]
         );
-        for my $key ( sort keys %{ $c->request->uploads } ) {
-            my $upload = $c->request->uploads->{$key};
+        for my $key ( sort keys %$uploads ) {
+            my $upload = $uploads->{$key};
             for my $u ( ref $upload eq 'ARRAY' ? @{$upload} : ($upload) ) {
                 $t->row( $key, $u->filename, $u->type, $u->size );
             }
@@ -2108,6 +2253,68 @@
     }
 }
 
+=head2 $c->log_request_headers($headers);
+
+Hook method which can be wrapped by plugins to log the request headers.
+No-op in the default implementation.
+
+=cut
+
+sub log_request_headers {}
+
+=head2 $c->log_headers($type => $headers)
+
+Logs L<HTTP::Headers> (either request or response) to the debug logs.
+
+=cut
+
+sub log_headers {
+    my $c       = shift;
+    my $type    = shift;
+    my $headers = shift;    # an HTTP::Headers instance
+
+    return unless $c->debug;
+
+    my $column_width = Catalyst::Utils::term_width() - 28;
+    my $t = Text::SimpleTable->new( [ 15, 'Header Name' ], [ $column_width, 'Value' ] );
+    $headers->scan(
+        sub {
+            my ( $name, $value ) = @_;
+            $t->row( $name, $value );
+        }
+    );
+    $c->log->debug( ucfirst($type) . " Headers:\n" . $t->draw );
+}
+
+
+=head2 $c->prepare_read
+
+Prepares the input for reading.
+
+=cut
+
+sub prepare_read { my $c = shift; $c->engine->prepare_read( $c, @_ ) }
+
+=head2 $c->prepare_request
+
+Prepares the engine request.
+
+=cut
+
+sub prepare_request { my $c = shift; $c->engine->prepare_request( $c, @_ ) }
+
+=head2 $c->prepare_uploads
+
+Prepares uploads.
+
+=cut
+
+sub prepare_uploads {
+    my $c = shift;
+
+    $c->engine->prepare_uploads( $c, @_ );
+}
+
 =head2 $c->prepare_write
 
 Prepares the output for writing.
@@ -2208,8 +2415,11 @@
     }
 
     for my $component (@comps) {
-        $class->components->{ $component } = $class->setup_component($component);
-        for my $component ($class->expand_component_module( $component, $config )) {
+        my $instance = $class->components->{ $component } = $class->setup_component($component);
+        my @expanded_components = $instance->can('expand_modules')
+            ? $instance->expand_modules( $component, $config )
+            : $class->expand_component_module( $component, $config );
+        for my $component (@expanded_components) {
             next if $comps{$component};
             $class->_controller_init_base_classes($component); # Also cover inner packages
             $class->components->{ $component } = $class->setup_component($component);
@@ -2573,16 +2783,12 @@
         my $class = ref $proto || $proto;
 
         Class::MOP::load_class( $plugin );
-
+        $class->log->warn( "$plugin inherits from 'Catalyst::Component' - this is decated and will not work in 5.81" )
+            if $plugin->isa( 'Catalyst::Component' );
         $proto->_plugins->{$plugin} = 1;
         unless ($instant) {
-            no strict 'refs';
-            if ( my $meta = Class::MOP::get_metaclass_by_name($class) ) {
-              my @superclasses = ($plugin, $meta->superclasses );
-              $meta->superclasses(@superclasses);
-            } else {
-              unshift @{"$class\::ISA"}, $plugin;
-            }
+            my $meta = Class::MOP::get_metaclass_by_name($class);
+            $meta->superclasses($plugin, $meta->superclasses);
         }
         return $class;
     }
@@ -2672,19 +2878,14 @@
 
 =item *
 
-C<case_sensitive> - Makes private paths case sensitive. See L</CASE SENSITIVITY>.
+C<default_model> - The default model picked if you say C<< $c->model >>. See L<< /$c->model($name) >>.
 
 =item *
 
-C<default_model> - The default model picked if you say C<< $c->model >>. See L</$c->model($name)>.
+C<default_view> - The default view to be rendered or returned when C<< $c->view >> is called. See L<< /$c->view($name) >>.
 
 =item *
 
-C<default_view> - The default view to be rendered or returned when C<< $c->view >>. See L</$c->view($name)>.
-is called.
-
-=item *
-
 C<disable_component_resolution_regex_fallback> - Turns
 off the deprecated component resolution functionality so
 that if any of the component methods (e.g. C<< $c->controller('Foo') >>)
@@ -2743,16 +2944,6 @@
 
     MyApp->config(show_internal_actions => 1);
 
-=head1 CASE SENSITIVITY
-
-By default Catalyst is not case sensitive, so C<MyApp::C::FOO::Bar> is
-mapped to C</foo/bar>. You can activate case sensitivity with a config
-parameter.
-
-    MyApp->config(case_sensitive => 1);
-
-This causes C<MyApp::C::Foo::Bar> to map to C</Foo/Bar>.
-
 =head1 ON-DEMAND PARSER
 
 The request body is usually parsed at the beginning of a request,
@@ -2892,6 +3083,8 @@
 
 David E. Wheeler
 
+dhoss: Devin Austin <dhoss at cpan.org>
+
 dkubb: Dan Kubb <dan.kubb-cpan at onautopilot.com>
 
 Drew Taylor
@@ -2954,6 +3147,8 @@
 
 obra: Jesse Vincent
 
+Octavian Rasnita
+
 omega: Andreas Marienborg
 
 Oleg Kostyuk <cub.uanic at gmail.com>
@@ -2968,6 +3163,8 @@
 
 sky: Arthur Bergman
 
+szbalint: Balint Szilakszi <szbalint at cpan.org>
+
 t0m: Tomas Doran <bobtfish at bobtfish.net>
 
 Ulf Edvinsson

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/script/catalyst.pl
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/script/catalyst.pl	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/script/catalyst.pl	2010-03-31 18:20:10 UTC (rev 13115)
@@ -41,9 +41,10 @@
         '.newfiles' => !$force,
         'makefile'  => $makefile,
         'scripts'   => $scripts,
-        'short'     => 0, # FIXME - to be removed.
+        name => $ARGV[0],
     }
 );
+# Pass $ARGV[0] for compatibility with old ::Devel
 pod2usage(1) unless $helper->mk_app( $ARGV[0] );
 
 1;

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/02pod.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/02pod.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/02pod.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,7 +0,0 @@
-use Test::More;
-
-eval "use Test::Pod 1.14";
-plan skip_all => 'Test::Pod 1.14 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD} || -e 'inc/.author';
-
-all_pod_files_ok();

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/03podcoverage.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/03podcoverage.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/03podcoverage.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,13 +0,0 @@
-use Test::More;
-
-eval "use Pod::Coverage 0.19";
-plan skip_all => 'Pod::Coverage 0.19 required' if $@;
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD} || -e 'inc/.author';
-
-all_pod_coverage_ok(
-  { 
-    also_private => ['BUILD']
-  }
-);

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/04critic.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/04critic.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/04critic.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,21 +0,0 @@
-use strict;
-use warnings;
-
-use File::Spec;
-use FindBin ();
-use Test::More;
-
-if ( !-e "$FindBin::Bin/../MANIFEST.SKIP" ) {
-    plan skip_all => 'Critic test only for developers.';
-}
-else {
-    eval { require Test::NoTabs };
-    if ( $@ ) {
-        plan tests => 1;
-        fail( 'You must install Test::NoTabs to run 04critic.t' );
-        exit;
-    }
-}
-
-Test::NoTabs->import;
-all_perl_files_ok(qw/lib/);

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/c3_appclass_bug.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/c3_appclass_bug.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/c3_appclass_bug.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/c3_appclass_bug.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,30 @@
+use strict;
+use Test::More tests => 1;
+
+{
+    package TestPlugin;
+    use strict;
+
+    sub setup {
+        shift->maybe::next::method(@_);
+    }
+}
+{
+    package TestAppC3ErrorUseMoose;
+    use Moose;
+
+    use Catalyst::Runtime 5.80;
+
+    use base qw/Catalyst/;
+    use Catalyst qw/
+        +TestPlugin
+    /;
+}
+
+use Test::Exception;
+lives_ok {
+    TestAppC3ErrorUseMoose->setup();
+} 'No C3 error';
+
+1;
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/c3_mro.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/c3_mro.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/c3_mro.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/c3_mro.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,38 @@
+use strict;
+use warnings;
+
+use Test::More;
+require Catalyst;
+require Module::Pluggable::Object;
+use MRO::Compat;
+
+# Get a list of all Catalyst:: packages in blib via M::P::O
+my @cat_mods;
+{
+  # problem with @INC on win32, see:
+  # http://rt.cpan.org/Ticket/Display.html?id=26452
+  if ($^O eq 'MSWin32') { require Win32; Win32::GetCwd(); }
+
+  local @INC = grep {/blib/} @INC;
+  @cat_mods = (
+    'Catalyst',
+    Module::Pluggable::Object->new(search_path => ['Catalyst'])->plugins,
+  );
+}
+
+# plan one test per found package name
+plan tests => scalar @cat_mods;
+
+# Try to calculate the C3 MRO for each package
+#
+# In the case that the initial require fails (as in
+# Catalyst::Engine::FastCGI when FCGI is not installed),
+# the calculateMRO eval will not error out, which is
+# effectively a test skip.
+#
+foreach my $cat_mod (@cat_mods) {
+  eval " require $cat_mod ";
+  eval { mro::get_linear_isa($cat_mod, 'c3') };
+  ok(!$@, "calculateMRO for $cat_mod: $@");
+}
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/caf_backcompat.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/caf_backcompat.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/caf_backcompat.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/caf_backcompat.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,28 @@
+use strict;
+use warnings;
+use Test::More;
+use Test::Exception;
+use Class::MOP ();
+use Moose::Util ();
+
+# List of everything which used Class::Accessor::Fast in 5.70.
+my @modules = qw/
+    Catalyst::Action
+    Catalyst::ActionContainer
+    Catalyst::Component
+    Catalyst::Dispatcher
+    Catalyst::DispatchType
+    Catalyst::Engine
+    Catalyst::Log
+    Catalyst::Request::Upload
+    Catalyst::Request
+    Catalyst::Response
+/;
+
+plan tests => scalar @modules;
+
+foreach my $module (@modules) {
+    Class::MOP::load_class($module);
+    ok Moose::Util::does_role($module => 'MooseX::Emulate::Class::Accessor::Fast'),
+        "$module has Class::Accessor::Fast back-compat";
+}

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/catalyst_test_utf8.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/catalyst_test_utf8.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/catalyst_test_utf8.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,27 @@
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+
+use Test::More;
+# "binmode STDOUT, ':utf8'" is insufficient, see http://code.google.com/p/test-more/issues/detail?id=46#c1
+binmode Test::More->builder->output, ":utf8";
+binmode Test::More->builder->failure_output, ":utf8";
+
+use Catalyst::Test 'TestAppEncoding';
+
+plan skip_all => 'This test does not run live'
+    if $ENV{CATALYST_SERVER};
+
+{   
+    # Test for https://rt.cpan.org/Ticket/Display.html?id=53678
+    # Catalyst::Test::get currently returns the raw octets, but it
+    # would be more useful if it decoded the content based on the
+    # Content-Type charset, as Test::WWW::Mechanize::Catalyst does
+    use utf8;
+    my $body = get('/utf8_non_ascii_content');
+    utf8::decode($body);
+    is $body, 'ʇsʎlɐʇɐɔ', 'Catalyst::Test::get returned content correctly UTF-8 encoded';
+}
+
+done_testing;

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/custom_live_component_controller_action_auto_doublebug.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_live_component_controller_action_auto_doublebug.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/custom_live_component_controller_action_auto_doublebug.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/custom_live_component_controller_action_auto_doublebug.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,48 @@
+#!perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+our $iters;
+
+BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
+
+use Test::More tests => 3*$iters;
+use Catalyst::Test 'TestAppDoubleAutoBug';
+
+if ( $ENV{CAT_BENCHMARK} ) {
+    require Benchmark;
+    Benchmark::timethis( $iters, \&run_tests );
+}
+else {
+    for ( 1 .. $iters ) {
+        run_tests();
+    }
+}
+
+sub run_tests {
+    SKIP:
+    {
+        if ( $ENV{CATALYST_SERVER} ) {
+            skip 'Using remote server', 3;
+        }
+
+        {
+            my @expected = qw[
+                TestAppDoubleAutoBug::Controller::Root->auto
+                TestAppDoubleAutoBug::Controller::Root->default
+                TestAppDoubleAutoBug::Controller::Root->end
+            ];
+
+            my $expected = join( ", ", @expected );
+
+            ok( my $response = request('http://localhost/action/auto/one'), 'auto + local' );
+            is( $response->header('X-Catalyst-Executed'),
+                $expected, 'Executed actions' );
+            is( $response->content, 'default, auto=1', 'Content OK' );
+        }
+    }
+}

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/custom_live_path_bug.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_live_path_bug.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/custom_live_path_bug.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/custom_live_path_bug.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,39 @@
+#!perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+our $iters;
+
+BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
+
+use Test::More tests => 2*$iters;
+use Catalyst::Test 'TestAppPathBug';
+
+if ( $ENV{CAT_BENCHMARK} ) {
+    require Benchmark;
+    Benchmark::timethis( $iters, \&run_tests );
+}
+else {
+    for ( 1 .. $iters ) {
+        run_tests();
+    }
+}
+
+sub run_tests {
+    SKIP:
+    {
+        if ( $ENV{CATALYST_SERVER} ) {
+            skip 'Using remote server', 2;
+        }
+
+        {
+            my $expected = 'This is the foo method.';
+            ok( my $response = request('http://localhost/'), 'response ok' );
+            is( $response->content, $expected, 'Content OK' );
+        }
+    }
+}

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/deprecated_test_import.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/deprecated_test_import.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/deprecated_test_import.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Catalyst::Test ();
+
+my $warn;
+{
+    local $SIG{__WARN__} = sub { $warn = shift; };
+    Catalyst::Test->import();
+}
+ok $warn;
+like $warn, qr/deprecated/;
+
+done_testing;
+

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/error_page_dump.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/error_page_dump.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/error_page_dump.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,15 @@
+use strict;
+use warnings;
+use Test::More;
+use Test::Exception;
+
+use Catalyst::Engine;
+
+my $m = sub { Catalyst::Engine->_dump_error_page_element(@_) };
+
+lives_ok { $m->('Scalar' => ['foo' => 'bar']) };
+lives_ok { $m->('Array' => ['foo' => []]) };
+lives_ok { $m->('Hash' => ['foo' => {}]) }; 
+
+done_testing;
+

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_component_controller_action_action.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_component_controller_action_action.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_component_controller_action_action.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -10,7 +10,7 @@
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 42 * $iters;
+use Test::More;
 use Catalyst::Test 'TestApp';
 
 if ( $ENV{CAT_BENCHMARK} ) {
@@ -147,4 +147,25 @@
         );
     }
 
+    {
+        ok( my $response = request('http://localhost/action_action_seven'),
+            'Request' );
+        ok( $response->is_success, 'Response Successful 2xx' );
+        is( $response->content_type, 'text/plain', 'Response Content-Type' );
+        is( $response->header('X-Catalyst-Action'),
+            'action_action_seven', 'Test Action' );
+        is(
+            $response->header('X-Test-Class'),
+            'TestApp::Controller::Action::Action',
+            'Test Class'
+        );
+        is( $response->header('X-TestExtraArgsAction'), '42,23', 'Extra args get passed to action contstructor' );
+        like(
+            $response->content,
+            qr/^bless\( .* 'Catalyst::Request' \)$/s,
+            'Content is a serialized Catalyst::Request'
+        );
+    }
 }
+
+done_testing;

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_component_controller_action_chained.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_component_controller_action_chained.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_component_controller_action_chained.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -10,7 +10,7 @@
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 148*$iters;
+use Test::More;
 use Catalyst::Test 'TestApp';
 
 if ( $ENV{CAT_BENCHMARK} ) {
@@ -908,6 +908,51 @@
         is( $response->content => 'a; anchor.html', 'Content OK' );
     }
 
+    # CaptureArgs(1) PathPart('...') should win over CaptureArgs(2) PathPart('')
+    {
+        my @expected = qw[
+          TestApp::Controller::Action::Chained->begin
+          TestApp::Controller::Action::Chained::CaptureArgs->base
+          TestApp::Controller::Action::Chained::CaptureArgs->one_arg
+          TestApp::Controller::Action::Chained::CaptureArgs->edit_one_arg
+          TestApp::Controller::Action::Chained::CaptureArgs->end
+        ];
+
+        my $expected = join( ", ", @expected );
+
+        # should dispatch to /base/one_args/edit_one_arg
+        ok( my $response = request('http://localhost/captureargs/one/edit'),
+            'Correct arg order ran' );
+        TODO: {
+        local $TODO = 'Known bug';
+        is( $response->header('X-Catalyst-Executed'),
+            $expected, 'Executed actions' );
+        is( $response->content, 'base; one_arg; edit_one_arg', 'Content OK' );
+        }
+    }
+
+    #  PathPart('...') Args(1) should win over CaptureArgs(2) PathPart('')
+    {
+        my @expected = qw[
+          TestApp::Controller::Action::Chained->begin
+          TestApp::Controller::Action::Chained::CaptureArgs->base
+          TestApp::Controller::Action::Chained::CaptureArgs->test_one_arg
+          TestApp::Controller::Action::Chained::CaptureArgs->end
+        ];
+
+        my $expected = join( ", ", @expected );
+
+        # should dispatch to /base/test_one_arg
+        ok( my $response = request('http://localhost/captureargs/test/one'),
+            'Correct pathpart/arg ran' );
+        TODO: {
+        local $TODO = 'Known bug';
+        is( $response->header('X-Catalyst-Executed'),
+            $expected, 'Executed actions' );
+        is( $response->content, 'base; test_plus_arg; one;', 'Content OK' );
+        }
+    }
+
     #
     #   Args(0) should win over Args() if we actually have no arguments.
     {
@@ -1018,5 +1063,33 @@
             'request with URI-encoded arg' );
         like( $content, qr{foo/bar;\z}, 'args decoded' );
     }
+
+    # Test round tripping, specifically the / character %2F in uri_for:
+    # not being able to feed it back action + captureargs and args into uri for
+    # and result in the original request uri is a major piece of suck ;)
+    foreach my $thing (
+        ['foo', 'bar'],
+        ['foo%2Fbar', 'baz'],
+        ['foo', 'bar%2Fbaz'],
+        ['foo%2Fbar', 'baz%2Fquux'],
+        ['foo%2Fbar', 'baz%2Fquux', { foo => 'bar', 'baz' => 'quux%2Ffrood'}],
+        ['foo%2Fbar', 'baz%2Fquux', { foo => 'bar', 'baz%2Ffnoo' => 'quux%2Ffrood'}],
+        ['h%C3%BCtte', 'h%C3%BCtte', { test => 'h%C3%BCtte' } ],
+    ) {
+        my $path = '/chained/roundtrip_urifor/' .
+            $thing->[0] . '/' . $thing->[1];
+        $path .= '?' . join('&',
+            map { $_ .'='. $thing->[2]->{$_}}
+            sort keys %{$thing->[2]}) if $thing->[2];
+        ok( my $content =
+            get('http://localhost/' . $path),
+            'request ' . $path . ' ok');
+        # Just check that the path matches, as who the hell knows or cares
+        # where the app is based (live tests etc)
+        ok( index($content, $path) > 1, 'uri can round trip through uri_for' )
+            or diag("Expected $path, got $content");
+    }
 }
 
+done_testing;
+

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_engine_request_escaped_path.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_engine_request_escaped_path.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/live_engine_request_escaped_path.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -13,7 +13,7 @@
 
 This test exposes a problem in the handling of PATH_INFO in C::Engine::CGI (and
 other engines) where Catalyst does not un-escape the request correctly.
-If a request is URL-encoded then Catalyst fails to decode the request 
+If a request is URL-encoded then Catalyst fails to decode the request
 and thus will try and match actions using the URL-encoded value.
 
 Can NOT use Catalyst::Test as it uses HTTP::Request::AsCGI which does
@@ -31,11 +31,11 @@
 @@ -157,6 +157,8 @@
      my $query = $ENV{QUERY_STRING} ? '?' . $ENV{QUERY_STRING} : '';
      my $uri   = $scheme . '://' . $host . '/' . $path . $query;
- 
+
 +    $uri = URI->new( $uri )->canonical;
 +
      $c->request->uri( bless \$uri, $uri_class );
- 
+
      # set the base URI
 
 =cut
@@ -54,6 +54,7 @@
 }
 
 # test that request with URL-escaped code works.
+{
     my $request = Catalyst::Utils::request( 'http://localhost/args/param%73/one/two' );
     my $cgi     = HTTP::Request::AsCGI->new( $request, %ENV )->setup;
 
@@ -65,8 +66,6 @@
     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' );
 }

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/meta_method_unneeded.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/meta_method_unneeded.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/meta_method_unneeded.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/meta_method_unneeded.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+use Test::More tests => 1;
+use Test::Exception;
+use Carp ();
+
+# Doing various silly things, like for example
+# use CGI qw/:standard/ in your conrtoller / app
+# will overwrite your meta method, therefore Catalyst
+# can't depend on it being there correctly.
+
+# This is/was demonstrated by Catalyst::Controller::WrapCGI
+# and Catalyst::Plugin::Cache::Curried
+
+use Catalyst::Test 'TestAppWithMeta';
+
+ok( request('/')->is_success );
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_actions.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_actions.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_actions.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_actions.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -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/];
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_config.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_config.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_config.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_config.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,91 @@
+## ============================================================================
+## Test to make sure that subclassed controllers (catalyst controllers
+## that inherit from a custom base catalyst controller) don't experienc
+## any namespace collision in the values under config.
+## ============================================================================
+
+use Test::More tests => 9;
+
+use strict;
+use warnings;
+
+use_ok('Catalyst');
+
+## ----------------------------------------------------------------------------
+## First We define a base controller that inherits from Catalyst::Controller
+## We add something to the config that we expect all children classes to
+## be able to find.
+## ----------------------------------------------------------------------------
+
+{
+    package base_controller;
+
+    use base 'Catalyst::Controller';
+
+    __PACKAGE__->config( base_key   => 'base_value' );
+}
+
+## ----------------------------------------------------------------------------
+## Next we instantiate two classes that inherit from the base controller.  We
+## Add some local config information to these.
+## ----------------------------------------------------------------------------
+
+{
+    package controller_a;
+
+    use base 'base_controller';
+
+    __PACKAGE__->config( key_a => 'value_a' );
+}
+
+
+{
+    package controller_b;
+
+    use base 'base_controller';
+
+    __PACKAGE__->config->{key_b} = 'value_b';
+}
+
+## Okay, we expect that the base controller has a config with one key
+## and that the two children controllers inherit that config key and then
+## add one more.  So the base controller has one config value and the two
+## children each have two.
+
+## ----------------------------------------------------------------------------
+## THE TESTS.  Basically we first check to make sure that all the children of
+## the base_controller properly inherit the {base_key => 'base_value'} info
+## and that each of the children also has its local config data and that none
+## of the classes have data that is unexpected.
+## ----------------------------------------------------------------------------
+
+
+# First round, does everything have what we expect to find? If these tests fail there is something
+# wrong with the way config is storing its information.
+
+ok( base_controller->config->{base_key} eq 'base_value', 'base_controller has expected config value for "base_key"') or
+ diag('"base_key" defined as "'.base_controller->config->{base_key}.'" and not "base_value" in config');
+
+ok( controller_a->config->{base_key} eq 'base_value', 'controller_a has expected config value for "base_key"') or
+ diag('"base_key" defined as "'.controller_a->config->{base_key}.'" and not "base_value" in config');
+
+ok( controller_a->config->{key_a} eq 'value_a', 'controller_a has expected config value for "key_a"') or
+ diag('"key_a" defined as "'.controller_a->config->{key_a}.'" and not "value_a" in config');
+
+ok( controller_b->config->{base_key} eq 'base_value', 'controller_b has expected config value for "base_key"') or
+ diag('"base_key" defined as "'.controller_b->config->{base_key}.'" and not "base_value" in config');
+
+ok( controller_b->config->{key_b} eq 'value_b', 'controller_b has expected config value for "key_b"') or
+ diag('"key_b" defined as "'.controller_b->config->{key_b}.'" and not "value_b" in config');
+
+# second round, does each controller have the expected number of config values? If this test fails there is
+# probably some data collision between the controllers.
+
+ok( scalar(keys %{base_controller->config}) == 1, 'base_controller has the expected number of config values') or
+ diag("base_controller should have 1 config value, but it has ".scalar(keys %{base_controller->config}));
+
+ok( scalar(keys %{controller_a->config}) == 2, 'controller_a has the expected number of config values') or
+ diag("controller_a  should have 2 config value, but it has ".scalar(keys %{base_controller->config}));
+
+ok( scalar(keys %{controller_b->config}) == 2, 'controller_b has the expected number of config values') or
+ diag("controller_a should have 2 config value, but it has ".scalar(keys %{base_controller->config}));

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_namespace.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_namespace.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_namespace.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_controller_namespace.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,24 @@
+use strict;
+use warnings;
+
+use Test::More tests => 2;
+
+BEGIN {
+  package MyApp::Controller::Foo;
+
+  use base qw/Catalyst::Controller/;
+
+  package MyApp::Controller::Root;
+
+  use base qw/Catalyst::Controller/;
+
+  __PACKAGE__->config(namespace => '');
+
+  package Stub;
+
+  sub config { {} };
+}
+
+is(MyApp::Controller::Foo->action_namespace('Stub'), 'foo');
+
+is(MyApp::Controller::Root->action_namespace('Stub'), '');

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_action.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_action.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_action.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_action.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -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');

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_classdata.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_classdata.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_classdata.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_classdata.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,106 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use Scalar::Util qw/refaddr blessed/;
+use Test::More tests => 37;
+
+{
+  package ClassDataTest;
+  use Moose;
+  with 'Catalyst::ClassData';
+
+  package ClassDataTest2;
+  use Moose;
+  extends 'ClassDataTest';
+
+}
+
+  my $scalar = '100';
+  my $arrayref = [];
+  my $hashref = {};
+  my $scalarref = \$scalar;
+  my $coderef = sub { "beep" };
+
+  my $scalar2 = '200';
+  my $arrayref2 = [];
+  my $hashref2 = {};
+  my $scalarref2 = \$scalar2;
+  my $coderef2 = sub { "beep" };
+
+  my $scalar3 = '300';
+  my $arrayref3 = [];
+  my $hashref3 = {};
+  my $scalarref3 = \$scalar3;
+  my $coderef3 = sub { "beep" };
+
+
+my @accessors = qw/_arrayref _hashref _scalarref _coderef _scalar/;
+ClassDataTest->mk_classdata($_) for @accessors;
+can_ok('ClassDataTest', @accessors);
+
+ClassDataTest2->mk_classdata("beep", "meep");
+is(ClassDataTest2->beep, "meep");
+
+ClassDataTest->_arrayref($arrayref);
+ClassDataTest->_hashref($hashref);
+ClassDataTest->_scalarref($scalarref);
+ClassDataTest->_coderef($coderef);
+ClassDataTest->_scalar($scalar);
+
+is(ref(ClassDataTest->_arrayref), 'ARRAY');
+is(ref(ClassDataTest->_hashref), 'HASH');
+is(ref(ClassDataTest->_scalarref), 'SCALAR');
+is(ref(ClassDataTest->_coderef), 'CODE');
+ok( !ref(ClassDataTest->_scalar) );
+is(refaddr(ClassDataTest->_arrayref), refaddr($arrayref));
+is(refaddr(ClassDataTest->_hashref), refaddr($hashref));
+is(refaddr(ClassDataTest->_scalarref), refaddr($scalarref));
+is(refaddr(ClassDataTest->_coderef), refaddr($coderef));
+is(ClassDataTest->_scalar, $scalar);
+
+
+is(ref(ClassDataTest2->_arrayref), 'ARRAY');
+is(ref(ClassDataTest2->_hashref), 'HASH');
+is(ref(ClassDataTest2->_scalarref), 'SCALAR');
+is(ref(ClassDataTest2->_coderef), 'CODE');
+ok( !ref(ClassDataTest2->_scalar) );
+is(refaddr(ClassDataTest2->_arrayref), refaddr($arrayref));
+is(refaddr(ClassDataTest2->_hashref), refaddr($hashref));
+is(refaddr(ClassDataTest2->_scalarref), refaddr($scalarref));
+is(refaddr(ClassDataTest2->_coderef), refaddr($coderef));
+is(ClassDataTest2->_scalar, $scalar);
+
+ClassDataTest2->_arrayref($arrayref2);
+ClassDataTest2->_hashref($hashref2);
+ClassDataTest2->_scalarref($scalarref2);
+ClassDataTest2->_coderef($coderef2);
+ClassDataTest2->_scalar($scalar2);
+
+is(refaddr(ClassDataTest2->_arrayref), refaddr($arrayref2));
+is(refaddr(ClassDataTest2->_hashref), refaddr($hashref2));
+is(refaddr(ClassDataTest2->_scalarref), refaddr($scalarref2));
+is(refaddr(ClassDataTest2->_coderef), refaddr($coderef2));
+is(ClassDataTest2->_scalar, $scalar2);
+
+is(refaddr(ClassDataTest->_arrayref), refaddr($arrayref));
+is(refaddr(ClassDataTest->_hashref), refaddr($hashref));
+is(refaddr(ClassDataTest->_scalarref), refaddr($scalarref));
+is(refaddr(ClassDataTest->_coderef), refaddr($coderef));
+is(ClassDataTest->_scalar, $scalar);
+
+ClassDataTest->_arrayref($arrayref3);
+ClassDataTest->_hashref($hashref3);
+ClassDataTest->_scalarref($scalarref3);
+ClassDataTest->_coderef($coderef3);
+ClassDataTest->_scalar($scalar3);
+
+is(refaddr(ClassDataTest->_arrayref), refaddr($arrayref3));
+is(refaddr(ClassDataTest->_hashref), refaddr($hashref3));
+is(refaddr(ClassDataTest->_scalarref), refaddr($scalarref3));
+is(refaddr(ClassDataTest->_coderef), refaddr($coderef3));
+is(ClassDataTest->_scalar, $scalar3);
+
+my $i = bless {}, 'ClassDataTest';
+$i->_scalar('foo');
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,93 @@
+use Test::More tests => 22;
+use strict;
+use warnings;
+
+use_ok('Catalyst');
+
+my @complist = map { "MyApp::$_"; } qw/C::Controller M::Model V::View/;
+
+{
+  package MyApp;
+
+  use base qw/Catalyst/;
+
+  __PACKAGE__->components({ map { ($_, $_) } @complist });
+
+  # this is so $c->log->warn will work
+  __PACKAGE__->setup_log;
+}
+
+is(MyApp->comp('MyApp::V::View'), 'MyApp::V::View', 'Explicit return ok');
+
+is(MyApp->comp('C::Controller'), 'MyApp::C::Controller', 'Two-part return ok');
+
+is(MyApp->comp('Model'), 'MyApp::M::Model', 'Single part return ok');
+
+is_deeply([ MyApp->comp() ], \@complist, 'Empty return ok');
+
+# Is this desired behaviour?
+is_deeply([ MyApp->comp('Foo') ], \@complist, 'Fallthrough return ok');
+
+# regexp behavior
+{
+    is_deeply( [ MyApp->comp( qr{Model} ) ], [ 'MyApp::M::Model'], 'regexp ok' );
+    is_deeply( [ MyApp->comp('MyApp::V::View$') ], [ 'MyApp::V::View' ], 'Explicit return ok');
+    is_deeply( [ MyApp->comp('MyApp::C::Controller$') ], [ 'MyApp::C::Controller' ], 'Explicit return ok');
+    is_deeply( [ MyApp->comp('MyApp::M::Model$') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
+
+    # a couple other varieties for regexp fallback
+    is_deeply( [ MyApp->comp('M::Model') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
+
+    {
+        my $warnings = 0;
+        no warnings 'redefine';
+        local *Catalyst::Log::warn = sub { $warnings++ };
+
+        is_deeply( [ MyApp->comp('::M::Model') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
+        ok( $warnings, 'regexp fallback warnings' );
+
+        $warnings = 0;
+        is_deeply( [ MyApp->comp('Mode') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
+        ok( $warnings, 'regexp fallback warnings' );
+
+        $warnings = 0;
+        is(MyApp->comp('::M::'), 'MyApp::M::Model', 'Regex return ok');
+        ok( $warnings, 'regexp fallback for comp() warns' );
+    }
+
+}
+
+# multiple returns
+{
+    my @expected = sort qw( MyApp::C::Controller MyApp::M::Model );
+    my @got = sort MyApp->comp( qr{::[MC]::} );
+    is_deeply( \@got, \@expected, 'multiple results from regexp ok' );
+}
+
+# failed search
+{
+    is_deeply( scalar MyApp->comp( qr{DNE} ), 0, 'no results for failed search' );
+}
+
+
+#checking @args passed to ACCEPT_CONTEXT
+{
+    my $args;
+
+    {
+        no warnings 'once';
+        *MyApp::M::Model::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
+    }
+
+    my $c = bless {}, 'MyApp';
+
+    $c->component('MyApp::M::Model', qw/foo bar/);
+    is_deeply($args, [qw/foo bar/], 'args passed to ACCEPT_CONTEXT ok');
+
+    $c->component('M::Model', qw/foo2 bar2/);
+    is_deeply($args, [qw/foo2 bar2/], 'args passed to ACCEPT_CONTEXT ok');
+
+    $c->component('Mode', qw/foo3 bar3/);
+    is_deeply($args, [qw/foo3 bar3/], 'args passed to ACCEPT_CONTEXT ok');
+}
+

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_generating.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_generating.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_generating.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,10 @@
+use Test::More tests => 3;
+use strict;
+use warnings;
+
+use lib 't/lib';
+use TestApp;
+
+ok(TestApp->model('Generating'), 'knows about generating model');
+ok(TestApp->model('Generated'), 'knows about the generated model');
+is(TestApp->model('Generated')->foo, 'foo', 'can operate on generated model');

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_loading.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component_loading.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_loading.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_loading.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,235 @@
+# 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
+# One test for components in inner packages
+use Test::More tests => 2 + 6 * 24 + 8 + 1;
+
+use strict;
+use warnings;
+
+use File::Spec;
+use File::Path;
+
+my $libdir = 'test_trash';
+local @INC = @INC;
+unshift(@INC, $libdir);
+
+my $appclass = 'TestComponents';
+my @components = (
+    { type => 'Controller', prefix => 'C', name => 'Bar' },
+    { type => 'Controller', prefix => 'C', name => 'Foo::Bar' },
+    { type => 'Controller', prefix => 'C', name => 'Foo::Foo::Bar' },
+    { type => 'Controller', prefix => 'C', name => 'Foo::Foo::Foo::Bar' },
+    { type => 'Controller', prefix => 'Controller', name => 'Bar::Bar::Bar::Foo' },
+    { type => 'Controller', prefix => 'Controller', name => 'Bar::Bar::Foo' },
+    { type => 'Controller', prefix => 'Controller', name => 'Bar::Foo' },
+    { type => 'Controller', prefix => 'Controller', name => 'Foo' },
+    { type => 'Model', prefix => 'M', name => 'Bar' },
+    { type => 'Model', prefix => 'M', name => 'Foo::Bar' },
+    { type => 'Model', prefix => 'M', name => 'Foo::Foo::Bar' },
+    { type => 'Model', prefix => 'M', name => 'Foo::Foo::Foo::Bar' },
+    { type => 'Model', prefix => 'Model', name => 'Bar::Bar::Bar::Foo' },
+    { type => 'Model', prefix => 'Model', name => 'Bar::Bar::Foo' },
+    { type => 'Model', prefix => 'Model', name => 'Bar::Foo' },
+    { type => 'Model', prefix => 'Model', name => 'Foo' },
+    { type => 'View', prefix => 'V', name => 'Bar' },
+    { type => 'View', prefix => 'V', name => 'Foo::Bar' },
+    { type => 'View', prefix => 'V', name => 'Foo::Foo::Bar' },
+    { type => 'View', prefix => 'V', name => 'Foo::Foo::Foo::Bar' },
+    { type => 'View', prefix => 'View', name => 'Bar::Bar::Bar::Foo' },
+    { type => 'View', prefix => 'View', name => 'Bar::Bar::Foo' },
+    { type => 'View', prefix => 'View', name => 'Bar::Foo' },
+    { type => 'View', prefix => 'View', name => 'Foo' },
+);
+
+sub write_component_file {
+  my ($dir_list, $module_name, $content) = @_;
+
+  my $dir  = File::Spec->catdir(@$dir_list);
+  my $file = File::Spec->catfile($dir, $module_name . '.pm');
+
+  mkpath(join(q{/}, @$dir_list) );
+  open(my $fh, '>', $file) or die "Could not open file $file for writing: $!";
+  print $fh $content;
+  close $fh;
+}
+
+sub make_component_file {
+    my ($libdir, $appclass, $type, $prefix, $name) = @_;
+
+    my $compbase = "Catalyst::${type}";
+    my $fullname = "${appclass}::${prefix}::${name}";
+    my @namedirs = split(/::/, $name);
+    my $name_final = pop(@namedirs);
+    my @dir_list = ($libdir, $appclass, $prefix, @namedirs);
+
+    write_component_file(\@dir_list, $name_final, <<EOF);
+package $fullname;
+use MRO::Compat;
+use base '$compbase';
+sub COMPONENT {
+    my \$self = shift->next::method(\@_);
+    no strict 'refs';
+    *{\__PACKAGE__ . "::whoami"} = sub { return \__PACKAGE__; };
+    \$self;
+}
+1;
+
+EOF
+}
+
+foreach my $component (@components) {
+    make_component_file(
+        $libdir,
+        $appclass,
+        $component->{type},
+        $component->{prefix},
+        $component->{name},
+    );
+}
+
+my $shut_up_deprecated_warnings = q{
+    __PACKAGE__->log(Catalyst::Log->new('fatal'));
+};
+
+eval "package $appclass; use Catalyst; $shut_up_deprecated_warnings __PACKAGE__->setup";
+
+can_ok( $appclass, 'components');
+
+my $complist = $appclass->components;
+
+# the +1 below is for the app class itself
+is(scalar keys %$complist, 24+1, "Correct number of components loaded");
+
+foreach (keys %$complist) {
+
+    # Skip the component which happens to be the app itself
+    next if $_ eq $appclass;
+
+    my $instance = $appclass->component($_);
+    isa_ok($instance, $_);
+    can_ok($instance, 'whoami');
+    is($instance->whoami, $_);
+
+    if($_ =~ /^${appclass}::(?:V|View)::(.*)/) {
+        my $moniker = $1;
+        isa_ok($instance, 'Catalyst::View');
+        can_ok($appclass->view($moniker), 'whoami');
+        is($appclass->view($moniker)->whoami, $_);
+    }
+    elsif($_ =~ /^${appclass}::(?:M|Model)::(.*)/) {
+        my $moniker = $1;
+        isa_ok($instance, 'Catalyst::Model');
+        can_ok($appclass->model($moniker), 'whoami');
+        is($appclass->model($moniker)->whoami, $_);
+    }
+    elsif($_ =~ /^${appclass}::(?:C|Controller)::(.*)/) {
+        my $moniker = $1;
+        isa_ok($instance, 'Catalyst::Controller');
+        can_ok($appclass->controller($moniker), 'whoami');
+        is($appclass->controller($moniker)->whoami, $_);
+    }
+    else {
+        die "Something is wrong with this test, this should"
+            . " have been unreachable";
+    }
+}
+
+rmtree($libdir);
+
+# test extra component loading options
+
+$appclass = 'ExtraOptions';
+push @components, { type => 'View', prefix => 'Extra', name => 'Foo' };
+
+foreach my $component (@components) {
+    make_component_file(
+        $libdir,
+        $appclass,
+        $component->{type},
+        $component->{prefix},
+        $component->{name},
+    );
+}
+
+eval qq(
+package $appclass;
+use Catalyst;
+$shut_up_deprecated_warnings
+__PACKAGE__->config->{ setup_components } = {
+    search_extra => [ '::Extra' ],
+    except       => [ "${appclass}::Controller::Foo" ]
+};
+__PACKAGE__->setup;
+);
+
+can_ok( $appclass, 'components');
+
+$complist = $appclass->components;
+
+is(scalar keys %$complist, 24+1, "Correct number of components loaded");
+
+ok( !exists $complist->{ "${appclass}::Controller::Foo" }, 'Controller::Foo was skipped' );
+ok( exists $complist->{ "${appclass}::Extra::Foo" }, 'Extra::Foo was loaded' );
+
+rmtree($libdir);
+
+$appclass = "ComponentOnce";
+
+write_component_file([$libdir, $appclass, 'Model'], 'TopLevel', <<EOF);
+package ${appclass}::Model::TopLevel;
+use base 'Catalyst::Model';
+sub COMPONENT {
+
+    my \$self = shift->next::method(\@_);
+    no strict 'refs';
+    *{\__PACKAGE__ . "::whoami"} = sub { return \__PACKAGE__; };
+    *${appclass}::Model::TopLevel::GENERATED::ACCEPT_CONTEXT = sub {
+        return bless {}, 'FooBarBazQuux';
+    };
+    \$self;
+}
+
+package ${appclass}::Model::TopLevel::Nested;
+
+sub COMPONENT { die "COMPONENT called in the wrong order!"; }
+
+1;
+
+EOF
+
+write_component_file([$libdir, $appclass, 'Model', 'TopLevel'], 'Nested', <<EOF);
+package ${appclass}::Model::TopLevel::Nested;
+use base 'Catalyst::Model';
+
+my \$called=0;
+no warnings 'redefine';
+sub COMPONENT { \$called++;return shift->next::method(\@_); }
+sub called { return \$called };
+1;
+
+EOF
+
+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);

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_mro.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component_mro.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_mro.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_component_mro.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,29 @@
+use Test::More tests => 1;
+use strict;
+use warnings;
+
+{
+  package MyApp::Component;
+  use Test::More;
+
+  sub COMPONENT {
+    fail 'This no longer gets dispatched to';
+  }
+
+  package MyApp::MyComponent;
+
+  use base 'Catalyst::Component', 'MyApp::Component';
+
+}
+
+my $warn = '';
+{
+  local $SIG{__WARN__} = sub {
+    $warn .= $_[0];
+  };
+  MyApp::MyComponent->COMPONENT('MyApp');
+}
+
+like($warn, qr/after Catalyst::Component in MyApp::Component/,
+    'correct warning thrown');
+

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_cgi-prepare_path.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_cgi-prepare_path.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_cgi-prepare_path.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,113 @@
+use strict;
+use warnings;
+use Test::More;
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+use TestApp;
+use Catalyst::Engine::CGI;
+
+# mod_rewrite to app root for non / based app
+{
+    my $r = get_req (
+        REDIRECT_URL => '/comics/',
+        SCRIPT_NAME => '/comics/dispatch.cgi',
+        REQUEST_URI => '/comics/',
+    );
+    is ''.$r->uri, 'http://www.foo.com/comics/';
+    is ''.$r->base, 'http://www.foo.com/comics/';
+}
+
+# mod_rewrite to sub path under app root for non / based app
+{
+    my $r = get_req (
+        PATH_INFO  => '/foo/bar.gif',
+        REDIRECT_URL => '/comics/foo/bar.gif',
+        SCRIPT_NAME => '/comics/dispatch.cgi',
+        REQUEST_URI => '/comics/foo/bar.gif',
+    );
+    is ''.$r->uri, 'http://www.foo.com/comics/foo/bar.gif';
+    is ''.$r->base, 'http://www.foo.com/comics/';
+}
+
+# Standard CGI hit for non / based app
+{
+    my $r = get_req (
+        PATH_INFO => '/static/css/blueprint/screen.css',
+        SCRIPT_NAME => '/~bobtfish/Gitalist/script/gitalist.cgi',
+        REQUEST_URI => '/~bobtfish/Gitalist/script/gitalist.cgi/static/css/blueprint/screen.css',
+    );
+    is ''.$r->uri, 'http://www.foo.com/~bobtfish/Gitalist/script/gitalist.cgi/static/css/blueprint/screen.css';
+    is ''.$r->base, 'http://www.foo.com/~bobtfish/Gitalist/script/gitalist.cgi/';
+}
+# / %2F %252F escaping case.
+{
+    my $r = get_req (
+        PATH_INFO => '/%2F/%2F',
+        SCRIPT_NAME => '/~bobtfish/Gitalist/script/gitalist.cgi',
+        REQUEST_URI => '/~bobtfish/Gitalist/script/gitalist.cgi/%252F/%252F',
+    );
+    is ''.$r->uri, 'http://www.foo.com/~bobtfish/Gitalist/script/gitalist.cgi/%252F/%252F';
+    is ''.$r->base, 'http://www.foo.com/~bobtfish/Gitalist/script/gitalist.cgi/';
+}
+
+# Using rewrite rules to ask for a sub-path in your app.
+# E.g. RewriteRule ^(.*)$ /path/to/fastcgi/domainprofi.fcgi/iframeredirect$1 [L,NS]
+{
+    my $r = get_req (
+        PATH_INFO => '/iframeredirect/info',
+        SCRIPT_NAME => '',
+        REQUEST_URI => '/info',
+    );
+    is ''.$r->uri, 'http://www.foo.com/iframeredirect/info';
+    is ''.$r->base, 'http://www.foo.com/';
+}
+
+# nginx example from espent with path /"foo"
+{
+    my $r = get_req (
+        PATH_INFO => '"foo"',
+        SCRIPT_NAME => '/',
+        REQUEST_URI => '/%22foo%22',
+    );
+    is ''.$r->path, '%22foo%22';
+    is ''.$r->uri, 'http://www.foo.com/%22foo%22';
+    is ''.$r->base, 'http://www.foo.com/';
+}
+
+# nginx example from espent with path /"foo" and the app based at /oslobilder
+{
+    my $r = get_req (
+        PATH_INFO => 'oslobilder/"foo"',
+        SCRIPT_NAME => '/oslobilder/',
+        REQUEST_URI => '/oslobilder/%22foo%22',
+    );
+    is ''.$r->path, '%22foo%22';
+    is ''.$r->uri, 'http://www.foo.com/oslobilder/%22foo%22';
+    is ''.$r->base, 'http://www.foo.com/oslobilder/';
+}
+
+
+
+
+# FIXME - Test proxy logic
+#       - Test query string
+#       - Test non standard port numbers
+#       - Test // in PATH_INFO
+#       - Test scheme (secure request on port 80)
+
+sub get_req {
+    my %template = (
+        HTTP_HOST => 'www.foo.com',
+        PATH_INFO => '/',
+    );
+
+    local %ENV = (%template, @_);
+
+    my $i = TestApp->new;
+    $i->engine(Catalyst::Engine::CGI->new);
+    $i->engine->prepare_path($i);
+    return $i->req;
+}
+
+done_testing;
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_fixenv-iis6.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_engine_fixenv-iis6.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_fixenv-iis6.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_fixenv-iis6.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,62 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use FCGI";
+plan skip_all => 'FCGI required' if $@;
+
+plan tests => 2;
+
+require Catalyst::Engine::FastCGI;
+
+my %env = (
+    'SCRIPT_NAME' => '/koo/blurb',
+    'PATH_INFO' => '/koo/blurb',
+    'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
+    'REQUEST_METHOD' => 'GET',
+    'SCRIPT_FILENAME' => 'C:\\Foo\\script\\blurb',
+    'INSTANCE_META_PATH' => '/LM/W3SVC/793536',
+    'SERVER_SOFTWARE' => 'Microsoft-IIS/6.0',
+    'AUTH_PASSWORD' => '',
+    'AUTH_TYPE' => '',
+    'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows; U; Windows NT 5.2; de; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 (.NET CLR 3.5.30729)',
+    'REMOTE_PORT' => '1281',
+    'QUERY_STRING' => '',
+    'URL' => '/koo/blurb',
+    'HTTP_ACCEPT_LANGUAGE' => 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3',
+    'FCGI_ROLE' => 'RESPONDER',
+    'HTTP_KEEP_ALIVE' => '300',
+    'CONTENT_TYPE' => '',
+    'LOCAL_ADDR' => '127.0.0.1',
+    'GATEWAY_INTERFACE' => 'CGI/1.1',
+    'HTTPS' => 'off',
+    'DOCUMENT_ROOT' => 'C:\\Foo\\script',
+    'REMOTE_HOST' => '127.0.0.1',
+    'PATH_TRANSLATED' => 'C:\\Foo\\script\\blurb',
+    'APPL_PHYSICAL_PATH' => 'C:\\Foo\\script\\',
+    'SERVER_NAME' => '127.0.0.1',
+    'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
+    'HTTP_CONNECTION' => 'keep-alive',
+    'INSTANCE_ID' => '793536',
+    'CONTENT_LENGTH' => '0',
+    'AUTH_USER' => '',
+    'APPL_MD_PATH' => '/LM/W3SVC/793536/Root/koo',
+    'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
+    'REMOTE_USER' => '',
+    'SERVER_PORT_SECURE' => '0',
+    'SERVER_PORT' => 83,
+    'REMOTE_ADDR' => '127.0.0.1',
+    'SERVER_PROTOCOL' => 'HTTP/1.1',
+    'REQUEST_URI' => '/koo/blurb',
+    'APP_POOL_ID' => 'DefaultAppPool',
+    'HTTP_HOST' => '127.0.0.1:83'
+);
+
+Catalyst::Engine::FastCGI->_fix_env(\%env);
+
+is($env{PATH_INFO}, '//blurb', 'check PATH_INFO');
+is($env{SCRIPT_NAME}, '/koo', 'check SCRIPT_NAME');
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_fixenv-lighttpd.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_engine_fixenv-lighttpd.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_fixenv-lighttpd.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_engine_fixenv-lighttpd.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,46 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use FCGI";
+plan skip_all => 'FCGI required' if $@;
+
+plan tests => 2;
+
+require Catalyst::Engine::FastCGI;
+
+my %env = (
+    'SCRIPT_NAME'          => '/bar',
+    'SERVER_NAME'          => 'localhost:8000',
+    'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
+    'HTTP_CONNECTION'      => 'keep-alive',
+    'PATH_INFO'            => '',
+    'HTTP_ACCEPT'          => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
+    'REQUEST_METHOD'       => 'GET',
+    'SCRIPT_FILENAME'      => '/tmp/Foo/root/bar',
+    'HTTP_ACCEPT_CHARSET'  => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
+    'SERVER_SOFTWARE'      => 'lighttpd/1.4.15',
+    'QUERY_STRING'         => '',
+    'REMOTE_PORT'          => '22207',
+    'SERVER_PORT'          => 8000,
+    'REDIRECT_STATUS'      => '200',
+    'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5',
+    'REMOTE_ADDR'          => '127.0.0.1',
+    'FCGI_ROLE'            => 'RESPONDER',
+    'HTTP_KEEP_ALIVE'      => '300',
+    'SERVER_PROTOCOL'      => 'HTTP/1.1',
+    'REQUEST_URI'          => '/bar',
+    'GATEWAY_INTERFACE'    => 'CGI/1.1',
+    'SERVER_ADDR'          => '127.0.0.1',
+    'DOCUMENT_ROOT'        => '/tmp/Foo/root',
+    'HTTP_HOST'            => 'localhost:8000',
+);
+
+Catalyst::Engine::FastCGI->_fix_env(\%env);
+
+is($env{PATH_INFO}, '/bar', 'check PATH_INFO');
+ok(!exists($env{SCRIPT_NAME}), 'check SCRIPT_NAME');
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_log.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_log.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_log.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_log.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,69 @@
+use strict;
+use warnings;
+
+use Test::More tests => 22;
+
+use Catalyst::Log;
+
+local *Catalyst::Log::_send_to_log;
+local our @MESSAGES;
+{
+    no warnings 'redefine';
+    *Catalyst::Log::_send_to_log = sub {
+        my $self = shift;
+        push @MESSAGES, @_;
+    };
+}
+
+my $LOG = 'Catalyst::Log';
+
+can_ok $LOG, 'new';
+ok my $log = $LOG->new, '... and creating a new log object should succeed';
+isa_ok $log, $LOG, '... and the object it returns';
+
+can_ok $log, 'is_info';
+ok $log->is_info, '... and the default behavior is to allow info messages';
+
+can_ok $log, 'info';
+ok $log->info('hello there!'),
+    '... passing it an info message should succeed';
+
+can_ok $log, "_flush";
+$log->_flush;
+ok @MESSAGES, '... and flushing the log should succeed';
+is scalar @MESSAGES, 1, '... with one log message';
+like $MESSAGES[0], qr/^\[info\] hello there!$/,
+    '... which should match the format we expect';
+
+{
+
+    package Catalyst::Log::Subclass;
+    use base qw/Catalyst::Log/;
+
+    sub _send_to_log {
+        my $self = shift;
+        push @MESSAGES, '---';
+        push @MESSAGES, @_;
+    }
+}
+
+my $SUBCLASS = 'Catalyst::Log::Subclass';
+can_ok $SUBCLASS, 'new';
+ok $log = Catalyst::Log::Subclass->new,
+    '... and the log subclass constructor shoudl return a new object';
+isa_ok $log, $SUBCLASS, '... and the object it returns';
+isa_ok $log, $LOG,      '... and it also';
+
+can_ok $log, 'info';
+ok $log->info('hi there!'),
+    '... passing it an info message should succeed';
+
+can_ok $log, "_flush";
+ at MESSAGES = (); # clear the message log
+$log->_flush;
+ok @MESSAGES, '... and flushing the log should succeed';
+is scalar @MESSAGES, 2, '... with two log messages';
+is $MESSAGES[0], '---', '... with the first one being our new data';
+like $MESSAGES[1], qr/^\[info\] hi there!$/,
+    '... which should match the format we expect';
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_merge_config_hashes.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_merge_config_hashes.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_merge_config_hashes.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_merge_config_hashes.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,43 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+my @tests = (
+    {
+        given   => [ { a => 1 }, { b => 1 } ],
+        expects => { a => 1, b => 1 }
+    },
+    {
+        given   => [ { a => 1 }, { a => { b => 1 } } ],
+        expects => { a => { b => 1 } }
+    },
+    {
+        given   => [ { a => { b => 1 } }, { a => 1 } ],
+        expects => { a => 1 }
+    },
+    {
+        given   => [ { a => 1 }, { a => [ 1 ] } ],
+        expects => { a => [ 1 ] }
+    },
+    {
+        given   => [ { a => [ 1 ] }, { a => 1 } ],
+        expects => { a => 1 }
+    },
+    {
+        given   => [ { a => { b => 1 } }, { a => { b => 2 } } ],
+        expects => { a => { b => 2 } }
+    },
+    {
+        given   => [ { a => { b => 1 } }, { a => { c => 1 } } ],
+        expects => { a => { b => 1, c => 1 } }
+    },
+);
+
+plan tests => scalar @tests;
+
+use Catalyst::Component;
+
+for my $test ( @ tests ) {
+    is_deeply( Catalyst::Component->merge_config_hashes( @{ $test->{ given } } ), $test->{ expects } );
+}

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_mvc.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_mvc.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_mvc.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,227 @@
+use Test::More tests => 51;
+use strict;
+use warnings;
+
+use_ok('Catalyst');
+
+my @complist =
+  map { "MyMVCTestApp::$_"; }
+  qw/C::Controller M::Model V::View Controller::C Model::M View::V Controller::Model::Dummy::Model Model::Dummy::Model/;
+
+{
+
+    package MyMVCTestApp;
+
+    use base qw/Catalyst/;
+
+    __PACKAGE__->components( { map { ( ref($_)||$_ , $_ ) } @complist } );
+
+    my $thingie={};
+    bless $thingie, 'Some::Test::Object';
+    __PACKAGE__->components->{'MyMVCTestApp::Model::Test::Object'} = $thingie;
+
+    # allow $c->log->warn to work
+    __PACKAGE__->setup_log;
+}
+
+is( MyMVCTestApp->view('View'), 'MyMVCTestApp::V::View', 'V::View ok' );
+
+is( MyMVCTestApp->controller('Controller'),
+    'MyMVCTestApp::C::Controller', 'C::Controller ok' );
+
+is( MyMVCTestApp->model('Model'), 'MyMVCTestApp::M::Model', 'M::Model ok' );
+
+is( MyMVCTestApp->model('Dummy::Model'), 'MyMVCTestApp::Model::Dummy::Model', 'Model::Dummy::Model ok' );
+
+isa_ok( MyMVCTestApp->model('Test::Object'), 'Some::Test::Object', 'Test::Object ok' );
+
+is( MyMVCTestApp->controller('Model::Dummy::Model'), 'MyMVCTestApp::Controller::Model::Dummy::Model', 'Controller::Model::Dummy::Model ok' );
+
+is( MyMVCTestApp->view('V'), 'MyMVCTestApp::View::V', 'View::V ok' );
+
+is( MyMVCTestApp->controller('C'), 'MyMVCTestApp::Controller::C', 'Controller::C ok' );
+
+is( MyMVCTestApp->model('M'), 'MyMVCTestApp::Model::M', 'Model::M ok' );
+
+# failed search
+{
+    is( MyMVCTestApp->model('DNE'), undef, 'undef for invalid search' );
+}
+
+is_deeply( [ sort MyMVCTestApp->views ],
+           [ qw/V View/ ],
+           'views ok' );
+
+is_deeply( [ sort MyMVCTestApp->controllers ],
+           [ qw/C Controller Model::Dummy::Model/ ],
+           'controllers ok');
+
+is_deeply( [ sort MyMVCTestApp->models ],
+           [ qw/Dummy::Model M Model Test::Object/ ],
+           'models ok');
+
+{
+    my $warnings = 0;
+    no warnings 'redefine';
+    local *Catalyst::Log::warn = sub { $warnings++ };
+
+    like (MyMVCTestApp->view , qr/^MyMVCTestApp\::(V|View)\::/ , 'view() with no defaults returns *something*');
+    ok( $warnings, 'view() w/o a default is random, warnings thrown' );
+}
+
+is ( bless ({stash=>{current_view=>'V'}}, 'MyMVCTestApp')->view , 'MyMVCTestApp::View::V', 'current_view ok');
+
+my $view = bless {} , 'MyMVCTestApp::View::V';
+is ( bless ({stash=>{current_view_instance=> $view }}, 'MyMVCTestApp')->view , $view, 'current_view_instance ok');
+
+is ( bless ({stash=>{current_view_instance=> $view, current_view=>'MyMVCTestApp::V::View' }}, 'MyMVCTestApp')->view , $view,
+  'current_view_instance precedes current_view ok');
+
+{
+    my $warnings = 0;
+    no warnings 'redefine';
+    local *Catalyst::Log::warn = sub { $warnings++ };
+
+    ok( my $model = MyMVCTestApp->model );
+
+    ok( (($model =~ /^MyMVCTestApp\::(M|Model)\::/) ||
+        $model->isa('Some::Test::Object')),
+        'model() with no defaults returns *something*' );
+
+    ok( $warnings, 'model() w/o a default is random, warnings thrown' );
+}
+
+is ( bless ({stash=>{current_model=>'M'}}, 'MyMVCTestApp')->model , 'MyMVCTestApp::Model::M', 'current_model ok');
+
+my $model = bless {} , 'MyMVCTestApp::Model::M';
+is ( bless ({stash=>{current_model_instance=> $model }}, 'MyMVCTestApp')->model , $model, 'current_model_instance ok');
+
+is ( bless ({stash=>{current_model_instance=> $model, current_model=>'MyMVCTestApp::M::Model' }}, 'MyMVCTestApp')->model , $model,
+  'current_model_instance precedes current_model ok');
+
+MyMVCTestApp->config->{default_view} = 'V';
+is ( bless ({stash=>{}}, 'MyMVCTestApp')->view , 'MyMVCTestApp::View::V', 'default_view ok');
+is ( MyMVCTestApp->view , 'MyMVCTestApp::View::V', 'default_view in class method ok');
+
+MyMVCTestApp->config->{default_model} = 'M';
+is ( bless ({stash=>{}}, 'MyMVCTestApp')->model , 'MyMVCTestApp::Model::M', 'default_model ok');
+is ( MyMVCTestApp->model , 'MyMVCTestApp::Model::M', 'default_model in class method ok');
+
+# regexp behavior tests
+{
+    # is_deeply is used because regexp behavior means list context
+    is_deeply( [ MyMVCTestApp->view( qr{^V[ie]+w$} ) ], [ 'MyMVCTestApp::V::View' ], 'regexp view ok' );
+    is_deeply( [ MyMVCTestApp->controller( qr{Dummy\::Model$} ) ], [ 'MyMVCTestApp::Controller::Model::Dummy::Model' ], 'regexp controller ok' );
+    is_deeply( [ MyMVCTestApp->model( qr{Dum{2}y} ) ], [ 'MyMVCTestApp::Model::Dummy::Model' ], 'regexp model ok' );
+
+    # object w/ qr{}
+    is_deeply( [ MyMVCTestApp->model( qr{Test} ) ], [ MyMVCTestApp->components->{'MyMVCTestApp::Model::Test::Object'} ], 'Object returned' );
+
+    {
+        my $warnings = 0;
+        no warnings 'redefine';
+        local *Catalyst::Log::warn = sub { $warnings++ };
+
+        # object w/ regexp fallback
+        is_deeply( [ MyMVCTestApp->model( 'Test' ) ], [ MyMVCTestApp->components->{'MyMVCTestApp::Model::Test::Object'} ], 'Object returned' );
+        ok( $warnings, 'regexp fallback warnings' );
+    }
+
+    is_deeply( [ MyMVCTestApp->view('MyMVCTestApp::V::View$') ], [ 'MyMVCTestApp::V::View' ], 'Explicit return ok');
+    is_deeply( [ MyMVCTestApp->controller('MyMVCTestApp::C::Controller$') ], [ 'MyMVCTestApp::C::Controller' ], 'Explicit return ok');
+    is_deeply( [ MyMVCTestApp->model('MyMVCTestApp::M::Model$') ], [ 'MyMVCTestApp::M::Model' ], 'Explicit return ok');
+}
+
+{
+    my @expected = qw( MyMVCTestApp::C::Controller MyMVCTestApp::Controller::C );
+    is_deeply( [ sort MyMVCTestApp->controller( qr{^C} ) ], \@expected, 'multiple controller returns from regexp search' );
+}
+
+{
+    my @expected = qw( MyMVCTestApp::V::View MyMVCTestApp::View::V );
+    is_deeply( [ sort MyMVCTestApp->view( qr{^V} ) ], \@expected, 'multiple view returns from regexp search' );
+}
+
+{
+    my @expected = qw( MyMVCTestApp::M::Model MyMVCTestApp::Model::M );
+    is_deeply( [ sort MyMVCTestApp->model( qr{^M} ) ], \@expected, 'multiple model returns from regexp search' );
+}
+
+# failed search
+{
+    is( scalar MyMVCTestApp->controller( qr{DNE} ), 0, '0 results for failed search' );
+}
+
+#checking @args passed to ACCEPT_CONTEXT
+{
+    my $args;
+
+    {
+        no warnings 'once';
+        *MyMVCTestApp::Model::M::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
+        *MyMVCTestApp::View::V::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
+    }
+
+    my $c = bless {}, 'MyMVCTestApp';
+
+    # test accept-context with class rather than instance
+    MyMVCTestApp->model('M', qw/foo bar/);
+    is_deeply($args, [qw/foo bar/], 'MyMVCTestApp->model args passed to ACCEPT_CONTEXT ok');
+
+
+    $c->model('M', qw/foo bar/);
+    is_deeply($args, [qw/foo bar/], '$c->model args passed to ACCEPT_CONTEXT ok');
+
+    my $x = $c->view('V', qw/foo2 bar2/);
+    is_deeply($args, [qw/foo2 bar2/], '$c->view args passed to ACCEPT_CONTEXT ok');
+
+    # regexp fallback
+    $c->view('::View::V', qw/foo3 bar3/);
+    is_deeply($args, [qw/foo3 bar3/], 'args passed to ACCEPT_CONTEXT ok');
+
+
+}
+
+{
+    my $warn = '';
+    no warnings 'redefine';
+    local *Catalyst::Log::warn = sub { $warn .= $_[1] };
+
+    is_deeply (MyMVCTestApp->controller('MyMVCTestApp::Controller::C'),
+        MyMVCTestApp->components->{'MyMVCTestApp::Controller::C'},
+        'controller by fully qualified name ok');
+
+    # You probably meant $c->controller('C') instead of $c->controller({'MyMVCTestApp::Controller::C'})
+    my ($suggested_comp_name, $orig_comp_name) = $warn =~ /You probably meant (.*) instead of (.*) /;
+    isnt($suggested_comp_name, $orig_comp_name, 'suggested fix in warning for fully qualified component names makes sense' );
+}
+
+{
+    package MyApp::WithoutRegexFallback;
+
+    use base qw/Catalyst/;
+
+    __PACKAGE__->config( { disable_component_resolution_regex_fallback => 1 } );
+
+    __PACKAGE__->components( { map { ( ref($_)||$_ , $_ ) }
+        qw/MyApp::WithoutRegexFallback::Controller::Another::Foo/ } );
+
+    # allow $c->log->warn to work
+    __PACKAGE__->setup_log;
+}
+
+{
+    # test if non-regex component retrieval still works
+    is( MyApp::WithoutRegexFallback->controller('Another::Foo'),
+        'MyApp::WithoutRegexFallback::Controller::Another::Foo', 'controller Another::Foo found');
+}
+
+{
+    my $warnings = 0;
+    no warnings 'redefine';
+    local *Catalyst::Log::warn = sub { $warnings++ };
+
+    # try to get nonexisting object w/o regexp fallback
+    is( MyApp::WithoutRegexFallback->controller('Foo'), undef, 'no controller Foo found');
+    ok( !$warnings, 'no regexp fallback warnings' );
+}

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_path_to.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_path_to.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_path_to.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_path_to.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,39 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+my %non_unix = (
+    MacOS   => 1,
+    MSWin32 => 1,
+    os2     => 1,
+    VMS     => 1,
+    epoc    => 1,
+    NetWare => 1,
+    dos     => 1,
+    cygwin  => 1
+);
+
+my $os = $non_unix{$^O} ? $^O : 'Unix';
+
+if(  $os ne 'Unix' ) {
+    plan skip_all => 'tests require Unix';
+}
+else {
+    plan tests => 3;
+}
+
+use_ok('Catalyst');
+
+my $context = 'Catalyst';
+
+my $config = Catalyst->config;
+
+$config->{home} = '/home/sri/my-app/';
+
+is( Catalyst::path_to( $context, 'foo' ), '/home/sri/my-app/foo', 'Unix path' );
+
+$config->{home} = '/Users/sri/myapp/';
+
+is( Catalyst::path_to( $context, 'foo', 'bar' ),
+    '/Users/sri/myapp/foo/bar', 'deep Unix path' );

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_plugin.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_plugin.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_plugin.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_plugin.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,63 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 24;
+
+use lib 't/lib';
+
+{
+
+    package Faux::Plugin;
+
+    sub new { bless { count => 1 }, shift }
+    sub count { shift->{count}++ }
+}
+
+my $warnings = 0;
+
+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++;
+                return;
+            }
+            die "Caught unexpected warning: " . $_[1];
+        },
+    },
+)->new_object;
+PluginTestApp->log($logger);
+
+use Catalyst::Test qw/PluginTestApp/;
+
+ok( get("/compile_time_plugins"), "get ok" );
+is( $warnings, 0, 'no warnings' );
+# FIXME - Run time plugin support is insane, and should be removed
+#         for Catalyst 5.9
+ok( get("/run_time_plugins"),     "get ok" );
+
+local $ENV{CATALYST_DEBUG} = 0;
+
+is( $warnings, 1, '1 warning' );
+
+use_ok 'TestApp';
+my @expected = qw(
+  Catalyst::Plugin::Test::Errors
+  Catalyst::Plugin::Test::Headers
+  Catalyst::Plugin::Test::Inline
+  Catalyst::Plugin::Test::MangleDollarUnderScore
+  Catalyst::Plugin::Test::Plugin
+  TestApp::Plugin::AddDispatchTypes
+  TestApp::Plugin::FullyQualified
+);
+
+# Faux::Plugin is no longer reported
+is_deeply [ TestApp->registered_plugins ], \@expected,
+  'registered_plugins() should only report the plugins for the current class';
+

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_cgi.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_cgi.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_cgi.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+
+use Test::More;
+use Test::Exception;
+
+use Catalyst::Script::CGI;
+
+local @ARGV;
+lives_ok {
+    Catalyst::Script::CGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
+} "new_with_options";
+shift @TestAppToTestScripts::RUN_ARGS;
+is_deeply \@TestAppToTestScripts::RUN_ARGS, [], "no args";
+
+done_testing;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_create.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_create.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_create.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,75 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use Test::Exception;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+
+{
+    package TestCreateScript;
+    use Moose;
+    extends 'Catalyst::Script::Create';
+    our $help;
+    sub _getopt_full_usage { $help++ }
+}
+
+{
+    package TestHelperClass;
+    use Moose;
+
+    has 'newfiles' => ( is => 'ro', init_arg => '.newfiles' );
+    has 'mech' => ( is => 'ro' );
+    our @ARGS;
+    our %p;
+    sub mk_component {
+        my $self = shift;
+        @ARGS = @_;
+        %p = ( '.newfiles' => $self->newfiles, mech => $self->mech);
+        return $self->_mk_component_return;
+    }
+    sub _mk_component_return { 1 }
+}
+{
+    package TestHelperClass::False;
+    use Moose;
+    extends 'TestHelperClass';
+    sub _mk_component_return { 0 }
+}
+
+{
+    local $TestCreateScript::help;
+    local @ARGV;
+    lives_ok {
+        TestCreateScript->new_with_options(application_name => 'TestAppToTestScripts', helper_class => 'TestHelperClass')->run;
+    } "no argv";
+    ok $TestCreateScript::help, 'Exited with usage info';
+}
+{
+    local $TestCreateScript::help;
+    local @ARGV = 'foo';
+    local @TestHelperClass::ARGS;
+    local %TestHelperClass::p;
+    lives_ok {
+        TestCreateScript->new_with_options(application_name => 'TestAppToTestScripts', helper_class => 'TestHelperClass')->run;
+    } "with argv";
+    ok !$TestCreateScript::help, 'Did not exit with usage into';
+    is_deeply \@TestHelperClass::ARGS, ['TestAppToTestScripts', 'foo'], 'Args correct';
+    is_deeply \%TestHelperClass::p, { '.newfiles' => 1, mech => undef }, 'Params correct';
+}
+
+{
+    local $TestCreateScript::help;
+    local @ARGV = 'foo';
+    local @TestHelperClass::ARGS;
+    local %TestHelperClass::p;
+    lives_ok {
+        TestCreateScript->new_with_options(application_name => 'TestAppToTestScripts', helper_class => 'TestHelperClass::False')->run;
+    } "with argv";
+    ok $TestCreateScript::help, 'Did exit with usage into as mk_component returned false';
+    is_deeply \@TestHelperClass::ARGS, ['TestAppToTestScripts', 'foo'], 'Args correct';
+    is_deeply \%TestHelperClass::p, { '.newfiles' => 1, mech => undef }, 'Params correct';
+}
+
+done_testing;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_fastcgi.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_fastcgi.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_fastcgi.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,67 @@
+use strict;
+use warnings;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+
+use Test::More;
+use Test::Exception;
+
+use Catalyst::Script::FastCGI;
+
+my $testopts;
+
+# Test default (no opts/args behaviour)
+testOption( [ qw// ], [undef, opthash()] );
+
+# listen socket
+testOption( [ qw|-l /tmp/foo| ], ['/tmp/foo', opthash()] );
+testOption( [ qw/-l 127.0.0.1:3000/ ], ['127.0.0.1:3000', opthash()] );
+
+#daemonize           -d --daemon
+testOption( [ qw/-d/ ], [undef, opthash(detach => 1)] );
+testOption( [ qw/--daemon/ ], [undef, opthash(detach => 1)] );
+
+# pidfile        -pidfile -p                 --pid --pidfile
+testOption( [ qw/--pidfile cat.pid/ ], [undef, opthash(pidfile => 'cat.pid')] );
+testOption( [ qw/--pid cat.pid/ ], [undef, opthash(pidfile => 'cat.pid')] );
+testOption( [ qw/-p cat.pid/ ], [undef, opthash(pidfile => 'cat.pid')] );
+
+# manager
+testOption( [ qw/--manager foo::bar/ ], [undef, opthash(manager => 'foo::bar')] );
+testOption( [ qw/-M foo::bar/ ], [undef, opthash(manager => 'foo::bar')] );
+
+# keeperr
+testOption( [ qw/--keeperr/ ], [undef, opthash(keep_stderr => 1)] );
+testOption( [ qw/-e/ ], [undef, opthash(keep_stderr => 1)] );
+
+# nproc
+testOption( [ qw/--nproc 6/ ], [undef, opthash(nproc => 6)] );
+testOption( [ qw/--n 6/ ], [undef, opthash(nproc => 6)] );
+
+done_testing;
+
+sub testOption {
+    my ($argstring, $resultarray) = @_;
+
+    local @ARGV = @$argstring;
+    local @TestAppToTestScripts::RUN_ARGS;
+    lives_ok {
+        Catalyst::Script::FastCGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
+    } "new_with_options";
+    # First element of RUN_ARGS will be the script name, which we don't care about
+    shift @TestAppToTestScripts::RUN_ARGS;
+    is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison";
+}
+
+# Returns the hash expected when no flags are passed
+sub opthash {
+    return {
+        pidfile => undef,
+        keep_stderr => undef,
+        detach => undef,
+        nproc => undef,
+        manager => undef,
+        @_,
+    };
+}

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_help.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_help.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_help.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,31 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use Test::Exception;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+
+{
+    package TestHelpScript;
+    use Moose;
+    with 'Catalyst::ScriptRole';
+    our $help;
+    sub _getopt_full_usage { $help++ }
+}
+
+test('-h');
+test('--help');
+test('-?');
+
+sub test {
+    local $TestHelpScript::help;
+    local @ARGV = (@_);
+    lives_ok {
+        TestHelpScript->new_with_options(application_name => 'TestAppToTestScripts')->run;
+    } 'Lives';
+    ok $TestHelpScript::help, 'Got help';
+}
+
+done_testing;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_server.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_server.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_server.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,137 @@
+use strict;
+use warnings;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+
+use Test::More;
+use Test::Exception;
+
+use Catalyst::Script::Server;
+
+my $testopts;
+
+# Test default (no opts/args behaviour)
+# Note undef for host means we bind to all interfaces.
+testOption( [ qw// ], ['3000', undef, opthash()] );
+
+# Old version supports long format opts with either one or two dashes.  New version only supports two.
+#                Old                       New
+# help           -? -help --help           -? --help
+# debug          -d -debug --debug         -d --debug
+# host           -host --host              --host
+testOption( [ qw/--host testhost/ ], ['3000', 'testhost', opthash()] );
+testOption( [ qw/-h testhost/ ], ['3000', 'testhost', opthash()] );
+
+# port           -p -port --port           -l --listen
+testOption( [ qw/-p 3001/ ], ['3001', undef, opthash()] );
+testOption( [ qw/--port 3001/ ], ['3001', undef, opthash()] );
+{
+    local $ENV{TESTAPPTOTESTSCRIPTS_PORT} = 5000;
+    testOption( [ qw// ], [5000, undef, opthash()] );
+}
+{
+    local $ENV{CATALYST_PORT} = 5000;
+    testOption( [ qw// ], [5000, undef, opthash()] );
+}
+
+# fork           -f -fork --fork           -f --fork
+testOption( [ qw/--fork/ ], ['3000', undef, opthash(fork => 1)] );
+testOption( [ qw/-f/ ], ['3000', undef, opthash(fork => 1)] );
+
+# pidfile        -pidfile                  --pid --pidfile
+testOption( [ qw/--pidfile cat.pid/ ], ['3000', undef, opthash(pidfile => "cat.pid")] );
+testOption( [ qw/--pid cat.pid/ ], ['3000', undef, opthash(pidfile => "cat.pid")] );
+
+# keepalive      -k -keepalive --keepalive -k --keepalive
+testOption( [ qw/-k/ ], ['3000', undef, opthash(keepalive => 1)] );
+testOption( [ qw/--keepalive/ ], ['3000', undef, opthash(keepalive => 1)] );
+
+# symlinks       -follow_symlinks          --sym --follow_symlinks
+testOption( [ qw/--follow_symlinks/ ], ['3000', undef, opthash(follow_symlinks => 1)] );
+testOption( [ qw/--sym/ ], ['3000', undef, opthash(follow_symlinks => 1)] );
+
+# background     -background               --bg --background
+testOption( [ qw/--background/ ], ['3000', undef, opthash(background => 1)] );
+testOption( [ qw/--bg/ ], ['3000', undef, opthash(background => 1)] );
+
+# restart        -r -restart --restart     -R --restart
+testRestart( ['-r'], restartopthash() );
+{
+    local $ENV{TESTAPPTOTESTSCRIPTS_RELOAD} = 1;
+    testRestart( [], restartopthash() );
+}
+{
+    local $ENV{CATALYST_RELOAD} = 1;
+    testRestart( [], restartopthash() );
+}
+
+# restart dly    -rd -restartdelay         --rd --restart_delay
+testRestart( ['-r', '--rd', 30], restartopthash(sleep_interval => 30) );
+testRestart( ['-r', '--restart_delay', 30], restartopthash(sleep_interval => 30) );
+
+# restart dir    -restartdirectory         --rdir --restart_directory
+testRestart( ['-r', '--rdir', 'root'], restartopthash(directories => ['root']) );
+testRestart( ['-r', '--rdir', 'root', '--rdir', 'lib'], restartopthash(directories => ['root', 'lib']) );
+testRestart( ['-r', '--restart_directory', 'root'], restartopthash(directories => ['root']) );
+
+# restart regex  -rr -restartregex         --rr --restart_regex
+testRestart( ['-r', '--rr', 'foo'], restartopthash(filter => qr/foo/) );
+testRestart( ['-r', '--restart_regex', 'foo'], restartopthash(filter => qr/foo/) );
+
+done_testing;
+
+sub testOption {
+    my ($argstring, $resultarray) = @_;
+    my $app = _build_testapp($argstring);
+    lives_ok {
+        $app->run;
+    };
+    # First element of RUN_ARGS will be the script name, which we don't care about
+    shift @TestAppToTestScripts::RUN_ARGS;
+    # Mangle argv into the options..
+    $resultarray->[-1]->{argv} = $argstring;
+    is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison " . join(' ', @$argstring);
+}
+
+sub testRestart {
+    my ($argstring, $resultarray) = @_;
+    my $app = _build_testapp($argstring);
+    ok $app->restart, 'App is in restart mode';
+    my $args = {$app->_restarter_args};
+    is_deeply delete $args->{argv}, $argstring, 'argv is arg string';
+    is ref(delete $args->{start_sub}), 'CODE', 'Closure to start app present';
+    is_deeply $args, $resultarray, "is_deeply comparison of restarter args " . join(' ', @$argstring);
+}
+
+sub _build_testapp {
+    my ($argstring, $resultarray) = @_;
+
+    local @ARGV = @$argstring;
+    local @TestAppToTestScripts::RUN_ARGS;
+    my $i;
+    lives_ok {
+        $i = Catalyst::Script::Server->new_with_options(application_name => 'TestAppToTestScripts');
+    } "new_with_options " . join(' ', @$argstring);;
+    ok $i;
+    return $i;
+}
+
+# Returns the hash expected when no flags are passed
+sub opthash {
+    return {
+        'pidfile' => undef,
+        'fork' => 0,
+        'follow_symlinks' => 0,
+        'background' => 0,
+        'keepalive' => 0,
+        @_,
+    };
+}
+
+sub restartopthash {
+    return {
+        follow_symlinks => 0,
+        @_,
+    };
+}

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_test.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_test.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_script_test.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,54 @@
+use strict;
+use warnings;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+
+use Test::More;
+use Test::Exception;
+
+use Catalyst::Script::Test;
+use File::Temp qw/tempfile/;
+use IO::Handle;
+
+is run_test('/'), "root index\n", 'correct content printed';
+is run_test('/moose/get_attribute'), "42\n", 'Correct content printed for non root action';
+
+done_testing;
+
+sub run_test {
+    my $url = shift;
+
+    my ($fh, $fn) = tempfile();
+
+    binmode( $fh );
+    binmode( STDOUT );
+
+    {
+        local @ARGV = ($url);
+        my $i;
+        lives_ok {
+            $i = Catalyst::Script::Test->new_with_options(application_name => 'TestApp');
+        } "new_with_options";
+        ok $i;
+        my $saved;
+        open( $saved, '<&'. STDIN->fileno )
+              or croak("Can't dup stdin: $!");
+        open( STDOUT, '>&='. $fh->fileno )
+            or croak("Can't open stdout: $!");
+        eval { $i->run };
+        ok !$@, 'Ran ok';
+
+        STDOUT->flush
+            or croak("Can't flush stdout: $!");
+
+        open( STDOUT, '>&'. fileno($saved) )
+            or croak("Can't restore stdout: $!");
+    }
+
+    my $data = do { my $fh; open($fh, '<', $fn) or die $!; local $/; <$fh>; };
+    $fh = undef;
+    unlink $fn if -r $fn;
+
+    return $data;
+}

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_scriptrunner.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_scriptrunner.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_scriptrunner.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,24 @@
+use strict;
+use warnings;
+use Test::More;
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+
+use_ok('Catalyst::ScriptRunner');
+
+is Catalyst::ScriptRunner->run('ScriptTestApp', 'Foo'), 'ScriptTestApp::Script::Foo',
+    'Script existing only in app';
+is Catalyst::ScriptRunner->run('ScriptTestApp', 'Bar'), 'ScriptTestApp::Script::Bar',
+    'Script existing in both app and Catalyst - prefers app';
+is Catalyst::ScriptRunner->run('ScriptTestApp', 'Baz'), 'Catalyst::Script::Baz',
+    'Script existing only in Catalyst';
+# +1 test for the params passed to new_with_options in t/lib/Catalyst/Script/Baz.pm
+{
+    my $warnings = '';
+    local $SIG{__WARN__} = sub { $warnings .= shift };
+    is 'Catalyst::Script::CompileTest', Catalyst::ScriptRunner->run('ScriptTestApp', 'CompileTest');
+    like $warnings, qr/Does not compile/;
+    like $warnings, qr/Could not load ScriptTestApp::Script::CompileTest - falling back to Catalyst::Script::CompileTest/;
+}
+
+done_testing;

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,88 @@
+use strict;
+use warnings;
+use Class::MOP::Class;
+use Catalyst::Runtime;
+
+use Test::More tests => 29;
+
+{
+    # Silence the log.
+    my $meta = Catalyst::Log->meta;
+    $meta->make_mutable;
+    $meta->remove_method('_send_to_log');
+    $meta->add_method('_send_to_log', sub {});
+}
+
+sub build_test_app_with_setup {
+    my ($name, @flags) = @_;
+    my $flags = '(' . join(', ', map { "'".$_."'" } @flags) . ')';
+    $flags = '' if $flags eq '()';
+    eval qq{
+        package $name;
+        use Catalyst $flags;
+        $name->setup;
+    };
+    die $@ if $@;
+    return $name;
+}
+
+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('TestAppMyTestDebug', '-Debug');
+
+    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';
+    ok $log->is_error, 'Errors should be enabled';
+    ok $log->is_fatal, 'Fatal errors should be enabled';
+    ok $log->is_info, 'Info should be enabled';
+    ok $log->is_debug, 'Debugging should be enabled';
+    ok $app->debug, 'debug method should return true';
+}
+
+{
+    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';
+    isa_ok $log, 'Catalyst::Log', 'It should be a Catalyst::Log object';
+    ok $log->is_warn, 'Warnings should be enabled';
+    ok $log->is_error, 'Errors should be enabled';
+    ok $log->is_fatal, 'Fatal errors should be enabled';
+    ok !$log->is_info, 'Info should be disabled';
+    ok !$log->is_debug, 'Debugging should be disabled';
+    ok !$c->debug, 'Catalyst debugging is off';
+}
+{
+    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';
+    isa_ok $log, 'Catalyst::Log', 'It should be a Catalyst::Log object';
+    ok $log->is_warn, 'Warnings should be enabled';
+    ok $log->is_error, 'Errors should be enabled';
+    ok $log->is_fatal, 'Fatal errors should be enabled';
+    ok $log->is_info, 'Info should be enabled';
+    ok $log->is_debug, 'Debugging should be enabled';
+    ok !$c->debug, 'Catalyst debugging turned off';
+}
+my $log_meta = Class::MOP::Class->create_anon_class(
+    methods => { map { $_ => sub { 0 } } qw/debug error fatal info warn/ },
+);
+{
+    package TestAppWithOwnLogger;
+    use base qw/Catalyst/;
+    __PACKAGE__->log($log_meta->new_object);
+    __PACKAGE__->setup('-Debug');
+}
+
+ok my $c = TestAppWithOwnLogger->new, 'Get with own logger app object';
+ok $c->debug, '$c->debug is true';
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup_log.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup_log.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup_log.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup_log.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,100 @@
+use strict;
+use warnings;
+
+use Test::More tests => 30;
+use Test::Exception;
+
+use Catalyst ();
+
+sub mock_app {
+    my $name = shift;
+    my $meta = Moose->init_meta( for_class => $name );
+    $meta->superclasses('Catalyst');
+    return $meta->name;
+}
+
+sub test_log_object {
+    my ($log, %expected) = @_;
+    foreach my $level (keys %expected) {
+        my $method_name = "is_$level";
+        if ($expected{$level}) {
+            ok( $log->$method_name(), "Level $level on" );
+        }
+        else {
+            ok( !$log->$method_name(), "Level $level off" );
+        }
+    }
+}
+
+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('TestAppParseLogLevels');
+    $app->setup_log('error,warn');
+    ok !$app->debug, 'Not in debug mode';
+    test_log_object($app->log,
+        fatal => 1,
+        error => 1,
+        warn => 1,
+        info => 0,
+        debug => 0,
+    );
+}
+{
+    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,
+        fatal => 1,
+        error => 1,
+        warn => 1,
+        info => 1,
+        debug => 1,
+    );
+}
+{
+    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,
+        fatal => 1,
+        error => 1,
+        warn => 1,
+        info => 0,
+        debug => 0,
+    );
+}
+{
+    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
+    test_log_object($app->log,
+        fatal => 1,
+        error => 1,
+        warn => 1,
+        info => 1,
+        debug => 1,
+    );
+}
+{
+    my $app = mock_app('TestAppLogDebugOnly');
+    $app->setup_log('debug');
+    ok $app->debug, 'In debug mode';
+    test_log_object($app->log,
+        fatal => 1,
+        error => 1,
+        warn => 1,
+        info => 1,
+        debug => 1,
+    );
+}

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup_stats.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup_stats.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup_stats.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_setup_stats.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,70 @@
+use strict;
+use warnings;
+
+use Test::More tests => 5;
+use Class::MOP::Class;
+
+use Catalyst ();
+
+local our %log_messages; # TODO - Test log messages as expected.
+my $mock_log = Class::MOP::Class->create_anon_class(
+    methods => {
+        map { my $level = $_;
+            $level => sub {
+                $log_messages{$level} ||= [];
+                push(@{ $log_messages{$level} }, $_[1]);
+            },
+        }
+        qw/debug info warn error fatal/,
+    },
+)->new_object;
+
+sub mock_app {
+    my $name = shift;
+    my $mock_log = shift;
+    %log_messages = (); # Flatten log messages.
+    my $meta = Moose->init_meta( for_class => $name );
+    $meta->superclasses('Catalyst');
+    $meta->add_method('log', sub { $mock_log });
+    return $meta->name;
+}
+
+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('TestAppNoStats', $mock_log);
+    $app->setup_stats();
+    ok !$app->use_stats, 'stats off by default';
+}
+{
+    my $app = mock_app('TestAppStats', $mock_log);
+    $app->setup_stats(1);
+    ok $app->use_stats, 'stats on if you say >setup_stats(1)';
+}
+{
+    my $app = mock_app('TestAppStatsDebugTurnsStatsOn', $mock_log);
+    $app->meta->add_method('debug' => sub { 1 });
+    $app->setup_stats();
+    ok $app->use_stats, 'debug on turns stats on';
+}
+{
+    local %ENV = %ENV;
+    $ENV{CATALYST_STATS} = 1;
+    my $app = mock_app('TestAppStatsEnvSet', $mock_log);
+    $app->setup_stats();
+    ok $app->use_stats, 'ENV turns stats on';
+}
+{
+    local %ENV = %ENV;
+    $ENV{CATALYST_STATS} = 0;
+    my $app = mock_app('TestAppStatsEnvUnset', $mock_log);
+    $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)';
+}
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_uri_for.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,175 @@
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$FindBin::Bin/../lib";
+use Test::More;
+use URI;
+
+use_ok('TestApp');
+
+my $request = Catalyst::Request->new( {
+                base => URI->new('http://127.0.0.1/foo')
+              } );
+my $dispatcher = TestApp->dispatcher;
+my $context = TestApp->new( {
+                request => $request,
+                namespace => 'yada',
+              } );
+
+is(
+    Catalyst::uri_for( $context, '/bar/baz' )->as_string,
+    'http://127.0.0.1/foo/bar/baz',
+    'URI for absolute path'
+);
+
+is(
+    Catalyst::uri_for( $context, 'bar/baz' )->as_string,
+    'http://127.0.0.1/foo/yada/bar/baz',
+    'URI for relative path'
+);
+
+is(
+    Catalyst::uri_for( $context, '', 'arg1', 'arg2' )->as_string,
+    'http://127.0.0.1/foo/yada/arg1/arg2',
+    'URI for undef action with args'
+);
+
+
+is( Catalyst::uri_for( $context, '../quux' )->as_string,
+    'http://127.0.0.1/foo/quux', 'URI for relative dot path' );
+
+is(
+    Catalyst::uri_for( $context, 'quux', { param1 => 'value1' } )->as_string,
+    'http://127.0.0.1/foo/yada/quux?param1=value1',
+    'URI for undef action with query params'
+);
+
+is (Catalyst::uri_for( $context, '/bar/wibble?' )->as_string,
+   'http://127.0.0.1/foo/bar/wibble%3F', 'Question Mark gets encoded'
+);
+
+is( Catalyst::uri_for( $context, qw/bar wibble?/, 'with space' )->as_string,
+    'http://127.0.0.1/foo/yada/bar/wibble%3F/with%20space', 'Space gets encoded'
+);
+
+is(
+    Catalyst::uri_for( $context, '/bar', 'with+plus', { 'also' => 'with+plus' })->as_string,
+    'http://127.0.0.1/foo/bar/with+plus?also=with%2Bplus',
+    'Plus is not encoded'
+);
+
+# test with utf-8
+is(
+    Catalyst::uri_for( $context, 'quux', { param1 => "\x{2620}" } )->as_string,
+    'http://127.0.0.1/foo/yada/quux?param1=%E2%98%A0',
+    'URI for undef action with query params in unicode'
+);
+is(
+    Catalyst::uri_for( $context, 'quux', { 'param:1' => "foo" } )->as_string,
+    'http://127.0.0.1/foo/yada/quux?param%3A1=foo',
+    'URI for undef action with query params in unicode'
+);
+
+# test with object
+is(
+    Catalyst::uri_for( $context, 'quux', { param1 => $request->base } )->as_string,
+    'http://127.0.0.1/foo/yada/quux?param1=http%3A%2F%2F127.0.0.1%2Ffoo',
+    'URI for undef action with query param as object'
+);
+
+$request->base( URI->new('http://localhost:3000/') );
+$request->match( 'orderentry/contract' );
+is(
+    Catalyst::uri_for( $context, '/Orderentry/saveContract' )->as_string,
+    'http://localhost:3000/Orderentry/saveContract',
+    'URI for absolute path'
+);
+
+{
+    $request->base( URI->new('http://127.0.0.1/') );
+
+    $context->namespace('');
+
+    is( Catalyst::uri_for( $context, '/bar/baz' )->as_string,
+        'http://127.0.0.1/bar/baz', 'URI with no base or match' );
+
+    # test "0" as the path
+    is( Catalyst::uri_for( $context, qw/0 foo/ )->as_string,
+        'http://127.0.0.1/0/foo', '0 as path is ok'
+    );
+
+}
+
+# test with undef -- no warnings should be thrown
+{
+    my $warnings = 0;
+    local $SIG{__WARN__} = sub { $warnings++ };
+
+    Catalyst::uri_for( $context, '/bar/baz', { foo => undef } )->as_string,
+    is( $warnings, 0, "no warnings emitted" );
+}
+
+# Test with parameters '/', 'foo', 'bar' - should not generate a //
+is( Catalyst::uri_for( $context, qw| / foo bar | )->as_string,
+    'http://127.0.0.1/foo/bar', 'uri is /foo/bar, not //foo/bar'
+);
+
+TODO: {
+    local $TODO = 'RFCs are for people who, erm - fix this test..';
+    # Test rfc3986 reserved characters.  These characters should all be escaped
+    # according to the RFC, but it is a very big feature change so I've removed it
+    no warnings; # Yes, everything in qw is sane
+    is(
+        Catalyst::uri_for( $context, qw|! * ' ( ) ; : @ & = $ / ? % # [ ] ,|, )->as_string,
+        'http://127.0.0.1/%21/%2A/%27/%2B/%29/%3B/%3A/%40/%26/%3D/%24/%2C/%2F/%3F/%25/%23/%5B/%5D',
+        'rfc 3986 reserved characters'
+    );
+
+    # jshirley bug - why the hell does only one of these get encoded
+    #                has been like this forever however.
+    is(
+        Catalyst::uri_for( $context, qw|{1} {2}| )->as_string,
+        'http://127.0.0.1/{1}/{2}',
+        'not-escaping unreserved characters'
+    );
+}
+
+# make sure caller's query parameter hash isn't messed up
+{
+    my $query_params_base = {test => "one two",
+                             bar  => ["foo baz", "bar"]};
+    my $query_params_test = {test => "one two",
+                             bar  => ["foo baz", "bar"]};
+    Catalyst::uri_for($context, '/bar/baz', $query_params_test);
+    is_deeply($query_params_base, $query_params_test,
+              "uri_for() doesn't mess up query parameter hash in the caller");
+}
+
+
+{
+    my $path_action = $dispatcher->get_action_by_path(
+                       '/action/path/six'
+                     );
+
+    # 5.80018 is only encoding the first of the / in the arg.
+    is(
+        Catalyst::uri_for( $context, $path_action, 'foo/bar/baz' )->as_string,
+        'http://127.0.0.1/action/path/six/foo%2Fbar%2Fbaz',
+        'Escape all forward slashes in args as %2F'
+    );
+}
+
+{
+    my $index_not_private = $dispatcher->get_action_by_path(
+                             '/action/chained/argsorder/index'
+                            );
+
+    is(
+      Catalyst::uri_for( $context, $index_not_private )->as_string,
+      'http://127.0.0.1/argsorder',
+      'Return non-DispatchType::Index path for index action with args'
+    );
+}
+
+done_testing;
+

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for_action.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for_action.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for_action.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -21,6 +21,8 @@
                        '/class_forward_test_method'
                      );
 
+warn $dispatcher->uri_for_action($private_action);
+
 ok(!defined($dispatcher->uri_for_action($private_action)),
    "Private action returns undef for URI");
 

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for_multibytechar.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for_multibytechar.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_for_multibytechar.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,10 +1,9 @@
 use strict;
 use warnings;
-
 use FindBin;
 use lib "$FindBin::Bin/../lib";
 
-use Test::More tests => 5;
+use Test::More;
 
 use_ok('TestApp');
 
@@ -33,3 +32,19 @@
 # multibyte with utf8 string
 is($context->uri_for('/', { name => "\x{6751}\x{702c}\x{5927}\x{8f14}" }), $uri_with_multibyte, 'uri_for with utf8 string query');
 is($context->req->uri_with({ name => "\x{6751}\x{702c}\x{5927}\x{8f14}" }), $uri_with_multibyte, 'uri_with with utf8 string query');
+
+# multibyte captures and args
+my $action = $context->controller('Action::Chained')
+    ->action_for('roundtrip_urifor_end');
+
+{
+use utf8;
+
+is($context->uri_for($action, ['hütte'], 'hütte', {
+    test => 'hütte'
+}),
+'http://127.0.0.1/chained/roundtrip_urifor/h%C3%BCtte/h%C3%BCtte?test=h%C3%BCtte',
+'uri_for with utf8 captures and args');
+}
+
+done_testing;

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_with.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_uri_with.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_with.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_core_uri_with.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,69 @@
+use strict;
+use warnings;
+
+use Test::More tests => 10;
+use URI;
+
+use_ok('Catalyst::Request');
+
+my $request = Catalyst::Request->new( {
+                uri => URI->new('http://127.0.0.1/foo/bar/baz')
+              } );
+
+is(
+    $request->uri_with({}),
+    'http://127.0.0.1/foo/bar/baz',
+    'URI for absolute path'
+);
+
+is(
+    $request->uri_with({ foo => 'bar' }),
+    'http://127.0.0.1/foo/bar/baz?foo=bar',
+    'URI adds param'
+);
+
+my $request2 = Catalyst::Request->new( {
+                uri => URI->new('http://127.0.0.1/foo/bar/baz?bar=gorch')
+              } );
+is(
+    $request2->uri_with({}),
+    'http://127.0.0.1/foo/bar/baz?bar=gorch',
+    'URI retains param'
+);
+
+is(
+    $request2->uri_with({ me => 'awesome' }),
+    'http://127.0.0.1/foo/bar/baz?bar=gorch&me=awesome',
+    'URI retains param and adds new'
+);
+
+is(
+    $request2->uri_with({ bar => undef }),
+    'http://127.0.0.1/foo/bar/baz',
+    'URI loses param when explicitly undef'
+);
+
+is(
+    $request2->uri_with({ bar => 'snort' }),
+    'http://127.0.0.1/foo/bar/baz?bar=snort',
+    'URI changes param'
+);
+
+is(
+    $request2->uri_with({ bar => [ 'snort', 'ewok' ] }),
+    'http://127.0.0.1/foo/bar/baz?bar=snort&bar=ewok',
+    'overwrite mode URI appends arrayref param'
+);
+
+is(
+    $request2->uri_with({ bar => 'snort' }, { mode => 'append' }),
+    'http://127.0.0.1/foo/bar/baz?bar=gorch&bar=snort',
+    'append mode URI appends param'
+);
+
+is(
+    $request2->uri_with({ bar => [ 'snort', 'ewok' ] }, { mode => 'append' }),
+    'http://127.0.0.1/foo/bar/baz?bar=gorch&bar=snort&bar=ewok',
+    'append mode URI appends arrayref param'
+);
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_dispatcher_requestargs_restore.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_dispatcher_requestargs_restore.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_dispatcher_requestargs_restore.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_dispatcher_requestargs_restore.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,21 @@
+# Insane test case for the behavior needed by Plugin::Auhorization::ACL
+
+# We have to localise $c->request->{arguments} in
+# Catalyst::Dispatcher::_do_forward, rather than using save and restore,
+# as otherwise, the calling $c->detach on an action which says
+# die $Catalyst:DETACH causes the request arguments to not get restored,
+# and therefore sub gorch gets the wrong string $frozjob parameter.
+
+# Please feel free to break this behavior once a sane hook for safely
+# 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.
+
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+use Catalyst::Test 'ACLTestApp';
+use Test::More tests => 1;
+
+request('http://localhost/gorch/wozzle');

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_load_catalyst_test.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_load_catalyst_test.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_load_catalyst_test.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_load_catalyst_test.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,156 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+use Catalyst::Utils;
+use HTTP::Request::Common;
+use Test::Exception;
+
+my $Class   = 'Catalyst::Test';
+my $App     = 'TestApp';
+my $Pkg     = __PACKAGE__;
+my $Url     = 'http://localhost/';
+my $Content = "root index";
+
+my %Meth    = (
+    $Pkg    => [qw|get request ctx_request|],          # exported
+    $Class  => [qw|local_request remote_request|],  # not exported
+);
+
+### make sure we're not trying to connect to a remote host -- these are local tests
+local $ENV{CATALYST_SERVER};
+
+use Catalyst::Test ();
+
+### check available methods
+{   ### turn of redefine warnings, we'll get new subs exported
+    ### XXX 'no warnings' and 'local $^W' wont work as warnings are turned on in
+    ### test.pm, so trap them for now --kane
+    {   local $SIG{__WARN__} = sub {};
+        ok( $Class->import,     "Argumentless import for methods only" );
+    }
+
+    while( my($class, $meths) = each %Meth ) {
+        for my $meth ( @$meths ) { SKIP: {
+
+            ### method available?
+            can_ok( $class,     $meth );
+
+            ### only for exported methods
+            skip "Error tests only for exported methods", 2 unless $class eq $Pkg;
+
+            ### check error conditions
+            eval { $class->can($meth)->( $Url ) };
+            ok( $@,             "   $meth without app gives error" );
+            like( $@, qr/$Class/,
+                                "       Error filled with expected content for '$meth'" );
+        } }
+    }
+}
+
+### simple tests for exported methods
+{   ### turn of redefine warnings, we'll get new subs exported
+    ### XXX 'no warnings' and 'local $^W' wont work as warnings are turned on in
+    ### test.pm, so trap them for now --kane
+    {   local $SIG{__WARN__} = sub {};
+        ok( $Class->import( $App ),
+                                "Loading $Class for App $App" );
+    }
+
+    ### test exported methods again
+    for my $meth ( @{ $Meth{$Pkg} } ) { SKIP: {
+
+        ### do a call, we should get a result and perhaps a $c if it's 'ctx_request';
+        my ($res, $c) = eval { $Pkg->can($meth)->( $Url ) };
+
+        ok( 1,                  "   Called $Pkg->$meth( $Url )" );
+        ok( !$@,                "       No critical error $@" );
+        ok( $res,               "       Result obtained" );
+
+        ### get the content as a string, to make sure we got what we expected
+        my $res_as_string = $meth eq 'get' ? $res : $res->content;
+        is( $res_as_string, $Content,
+                                "           Content as expected: $res_as_string" );
+
+        ### some tests for 'ctx_request'
+        skip "Context tests skipped for '$meth'", 6 unless $meth eq 'ctx_request';
+
+        ok( $c,                 "           Context object returned" );
+        isa_ok( $c, $App,       "               Object" );
+        is( $c->request->uri, $Url,
+                                "               Url recorded in request" );
+        is( $c->response->body, $Content,
+                                "               Content recorded in response" );
+        ok( $c->stash,          "               Stash accessible" );
+        ok( $c->action,         "               Action object accessible" );
+        ok( $res->request,      "               Response has request object" );
+        lives_and { is( $res->request->uri, $Url) }
+                                "               Request object has correct url";
+    } }
+}
+
+### perl5.8.8 + cat 5.80's Cat::Test->ctx_request didn't return $c the 2nd
+### time it was invoked. Without tracking the bug down all the way, it was
+### clearly related to the Moose'ification of Cat::Test and a scoping issue
+### with a 'my'd variable. Since the same code works fine in 5.10, a bug in
+### either Moose or perl 5.8 is suspected.
+{   ok( 1,                      "Testing consistency of ctx_request()" );
+    for( 1..2 ) {
+        my($res, $c) = ctx_request( $Url );
+        ok( $c,                 "   Call $_: Context object returned" );
+    }
+}
+
+# FIXME - These vhosts in tests tests should be somewhere else...
+
+sub customize { Catalyst::Test::_customize_request(@_) }
+
+{
+    my $req = Catalyst::Utils::request('/dummy');
+    customize( $req );
+    is( $req->header('Host'), undef, 'normal request is unmodified' );
+}
+
+{
+    my $req = Catalyst::Utils::request('/dummy');
+    customize( $req, { host => 'customized.com' } );
+    like( $req->header('Host'), qr/customized.com/, 'request is customizable via opts hash' );
+}
+
+{
+    my $req = Catalyst::Utils::request('/dummy');
+    local $Catalyst::Test::default_host = 'localized.com';
+    customize( $req );
+    like( $req->header('Host'), qr/localized.com/, 'request is customizable via package var' );
+}
+
+{
+    my $req = Catalyst::Utils::request('/dummy');
+    local $Catalyst::Test::default_host = 'localized.com';
+    customize( $req, { host => 'customized.com' } );
+    like( $req->header('Host'), qr/customized.com/, 'opts hash takes precedence over package var' );
+}
+
+{
+    my $req = Catalyst::Utils::request('/dummy');
+    local $Catalyst::Test::default_host = 'localized.com';
+    customize( $req, { host => '' } );
+    is( $req->header('Host'), undef, 'default value can be temporarily cleared via opts hash' );
+}
+
+# Back compat test, extra args used to be ignored, now a hashref of options.
+use_ok('Catalyst::Test', 'TestApp', 'foobar');
+
+# Back compat test, ensure that request ignores anything which isn't a hash.
+lives_ok {
+    request(GET('/dummy'), 'foo');
+} 'scalar additional param to request method ignored';
+lives_ok {
+    request(GET('/dummy'), []);
+} 'array additional param to request method ignored';
+
+done_testing;

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_extend_non_moose_controller.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_extend_non_moose_controller.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_extend_non_moose_controller.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_extend_non_moose_controller.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,20 @@
+use Catalyst ();
+
+{
+    package TestApp;
+    use base qw/Catalyst/;
+}
+{
+    package TestApp::Controller::Base;
+    use base qw/Catalyst::Controller/;
+}
+{
+    package TestApp::Controller::Other;
+    use Moose;
+    use Test::More tests => 1;
+    use Test::Exception;
+    lives_ok {
+        extends 'TestApp::Controller::Base';
+    };
+}
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_non_moose.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_non_moose.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_non_moose.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_non_moose.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,7 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use lib 't/lib';
+use Test::More tests => 1;
+use_ok('TestAppMetaCompat');
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_non_moose_controller.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_non_moose_controller.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_non_moose_controller.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_metaclass_compat_non_moose_controller.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,19 @@
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+use Test::More tests => 1;
+use Test::Exception;
+use TestAppNonMooseController;
+
+# Metaclass init order causes fail.
+# There are TODO tests in Moose for this, see
+# f2391d17574eff81d911b97be15ea51080500003
+# after which the evil kludge in core can die in a fire.
+
+lives_ok {
+    TestAppNonMooseController::ControllerBase->get_action_methods
+} 'Base class->get_action_methods ok when sub class initialized first';
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_response.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_response.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_response.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_response.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More tests => 6;
+
+use_ok('Catalyst::Response');
+
+my $res = Catalyst::Response->new;
+
+# test aliasing of res->code for res->status
+$res->code(500);
+is($res->code, 500, 'code sets itself');
+is($res->status, 500, 'code sets status');
+$res->status(501);
+is($res->code, 501, 'status sets code');
+is($res->body, '', "default response body ''");
+$res->body(undef);
+is($res->body, '', "response body '' after assigned undef");
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_env_value.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_env_value.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_env_value.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_env_value.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,44 @@
+use strict;
+use warnings;
+
+use Test::More tests => 4;
+
+use Catalyst::Utils;
+
+##############################################################################
+### No env vars defined
+##############################################################################
+{
+    ok( !Catalyst::Utils::env_value( 'MyApp', 'Key' ),
+        'No env values defined returns false'
+    );
+}
+
+##############################################################################
+### App env var defined
+##############################################################################
+{
+    $ENV{'MYAPP2_KEY'} = 'Env value 2';
+    is( Catalyst::Utils::env_value( 'MyApp2', 'Key' ),
+        'Env value 2', 'Got the right value from the application var' );
+}
+
+##############################################################################
+### Catalyst env var defined
+##############################################################################
+{
+    $ENV{'CATALYST_KEY'} = 'Env value 3';
+    is( Catalyst::Utils::env_value( 'MyApp3', 'Key' ),
+        'Env value 3', 'Got the right value from the catalyst var' );
+}
+
+##############################################################################
+### Catalyst and Application env vars defined
+##############################################################################
+{
+    $ENV{'CATALYST_KEY'} = 'Env value bad';
+    $ENV{'MYAPP4_KEY'}   = 'Env value 4';
+    is( Catalyst::Utils::env_value( 'MyApp4', 'Key' ),
+        'Env value 4', 'Got the right value from the application var' );
+}
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_prefix.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_prefix.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_prefix.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_prefix.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 8;
+
+use lib "t/lib";
+
+use Catalyst::Utils;
+
+is( Catalyst::Utils::class2prefix('MyApp::V::Foo::Bar'), 'foo/bar', 'class2prefix works with M/V/C' );
+
+is( Catalyst::Utils::class2prefix('MyApp::Controller::Foo::Bar'), 'foo/bar', 'class2prefix works with Model/View/Controller' );
+
+is( Catalyst::Utils::class2prefix('MyApp::Controller::Foo::View::Bar'), 'foo/view/bar', 'class2prefix works with tricky components' );
+
+is( Catalyst::Utils::appprefix('MyApp::Foo'), 'myapp_foo', 'appprefix works' );
+
+is( Catalyst::Utils::class2appclass('MyApp::Foo::Controller::Bar::View::Baz'), 'MyApp::Foo', 'class2appclass works' );
+
+is( Catalyst::Utils::class2classprefix('MyApp::Foo::Controller::Bar::View::Baz'), 'MyApp::Foo::Controller', 'class2classprefix works' );
+
+is( Catalyst::Utils::class2classsuffix('MyApp::Foo::Controller::Bar::View::Baz'), 'Controller::Bar::View::Baz', 'class2classsuffix works' );
+
+is( Catalyst::Utils::class2env('MyApp::Foo'), 'MYAPP_FOO', 'class2env works' );

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_request.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_request.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_request.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/unit_utils_request.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,27 @@
+use strict;
+use warnings;
+
+use Test::More tests => 4;
+
+use Catalyst::Utils;
+
+{
+    my $url = "/dump";
+    ok(
+        my $request = Catalyst::Utils::request($url),
+        "Request: simple get without protocol nor host"
+    );
+    like( $request->uri, qr|^http://localhost/|,
+        " has default protocol and host" );
+}
+
+{
+    my $url = "/dump?url=http://www.somewhere.com/";
+    ok(
+        my $request = Catalyst::Utils::request($url),
+        "Same with param containing a url"
+    );
+    like( $request->uri, qr|^http://localhost/|,
+        " has default protocol and host" );
+}
+

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/utf8_content_length.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/utf8_content_length.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/aggregate/utf8_content_length.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,30 @@
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+use File::Spec;
+use Test::More;
+
+use Catalyst::Test qw/TestAppEncoding/;
+
+if ( $ENV{CATALYST_SERVER} ) {
+    plan skip_all => 'This test does not run live';
+    exit 0;
+}
+
+my $fn = "$Bin/../catalyst_130pix.gif";
+ok -r $fn, 'Can read catalyst_130pix.gif';
+my $size = -s $fn;
+{
+    my $r = request('/binary');
+    is $r->code, 200, '/binary OK';
+    is $r->header('Content-Length'), $size, '/binary correct content length';
+}
+{
+    my $r = request('/binary_utf8');
+    is $r->code, 200, '/binary_utf8 OK';
+    is $r->header('Content-Length'), $size, '/binary_utf8 correct content length';
+}
+
+done_testing;
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/http-server.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/optional_http-server.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/http-server.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/http-server.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -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 $?;
+    }
+}

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/notabs.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/04critic.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/notabs.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/notabs.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+
+use File::Spec;
+use FindBin ();
+use Test::More;
+use Test::NoTabs;
+
+all_perl_files_ok(qw/lib/);
+

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/optional_http-server.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/optional_http-server.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/optional_http-server.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,96 +0,0 @@
-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 $?;
-    }
-}

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/pod.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/02pod.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/pod.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/pod.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,8 @@
+use strict;
+use warnings;
+use Test::More;
+
+use Test::Pod 1.14;
+
+all_pod_files_ok();
+

Copied: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/podcoverage.t (from rev 11728, Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/03podcoverage.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/podcoverage.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/author/podcoverage.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,13 @@
+use strict;
+use warnings;
+use Test::More;
+
+use Pod::Coverage 0.19;
+use Test::Pod::Coverage 1.04;
+
+all_pod_coverage_ok(
+  {
+    also_private => ['BUILD']
+  }
+);
+

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/c3_appclass_bug.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/c3_appclass_bug.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/c3_appclass_bug.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,30 +0,0 @@
-use strict;
-use Test::More tests => 1;
-
-{
-    package TestPlugin;
-    use strict;
-
-    sub setup {
-        shift->maybe::next::method(@_);
-    }
-}
-{
-    package TestAppC3ErrorUseMoose;
-    use Moose;
-
-    use Catalyst::Runtime 5.80;
-
-    use base qw/Catalyst/;
-    use Catalyst qw/
-        +TestPlugin
-    /;
-}
-
-use Test::Exception;
-lives_ok {
-    TestAppC3ErrorUseMoose->setup();
-} 'No C3 error';
-
-1;
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/c3_mro.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/c3_mro.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/c3_mro.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,38 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More;
-require Catalyst;
-require Module::Pluggable::Object;
-use MRO::Compat;
-
-# Get a list of all Catalyst:: packages in blib via M::P::O
-my @cat_mods;
-{
-  # problem with @INC on win32, see:
-  # http://rt.cpan.org/Ticket/Display.html?id=26452
-  if ($^O eq 'MSWin32') { require Win32; Win32::GetCwd(); }
-
-  local @INC = grep {/blib/} @INC;
-  @cat_mods = (
-    'Catalyst', 
-    Module::Pluggable::Object->new(search_path => ['Catalyst'])->plugins,
-  );
-}
-
-# plan one test per found package name
-plan tests => scalar @cat_mods;
-
-# Try to calculate the C3 MRO for each package
-#
-# In the case that the initial require fails (as in
-# Catalyst::Engine::FastCGI when FCGI is not installed),
-# the calculateMRO eval will not error out, which is
-# effectively a test skip.
-#
-foreach my $cat_mod (@cat_mods) {
-  eval " require $cat_mod ";
-  eval { mro::get_linear_isa($cat_mod, 'c3') };
-  ok(!$@, "calculateMRO for $cat_mod: $@");
-}
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/caf_backcompat.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/caf_backcompat.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/caf_backcompat.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,28 +0,0 @@
-use strict;
-use warnings;
-use Test::More;
-use Test::Exception;
-use Class::MOP ();
-use Moose::Util ();
-
-# List of everything which used Class::Accessor::Fast in 5.70.
-my @modules = qw/
-    Catalyst::Action
-    Catalyst::ActionContainer
-    Catalyst::Component
-    Catalyst::Dispatcher
-    Catalyst::DispatchType
-    Catalyst::Engine
-    Catalyst::Log
-    Catalyst::Request::Upload
-    Catalyst::Request
-    Catalyst::Response
-/;
-
-plan tests => scalar @modules;
-
-foreach my $module (@modules) {
-    Class::MOP::load_class($module);
-    ok Moose::Util::does_role($module => 'MooseX::Emulate::Class::Accessor::Fast'),
-        "$module has Class::Accessor::Fast back-compat";
-}

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_exception_class_simple.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_exception_class_simple.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_exception_class_simple.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -7,12 +7,6 @@
 use Test::More tests => 1;
 use Test::Exception;
 
-TODO: {
-    local $TODO = 'Does not work yet';
-
 lives_ok {
     require TestAppClassExceptionSimpleTest;
 } 'Can load application';
-
-}
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_live_component_controller_action_auto_doublebug.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_live_component_controller_action_auto_doublebug.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_live_component_controller_action_auto_doublebug.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,48 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use FindBin;
-use lib "$FindBin::Bin/lib";
-
-our $iters;
-
-BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
-
-use Test::More tests => 3*$iters;
-use Catalyst::Test 'TestAppDoubleAutoBug';
-
-if ( $ENV{CAT_BENCHMARK} ) {
-    require Benchmark;
-    Benchmark::timethis( $iters, \&run_tests );
-}
-else {
-    for ( 1 .. $iters ) {
-        run_tests();
-    }
-}
-    
-sub run_tests {
-    SKIP:
-    {
-        if ( $ENV{CATALYST_SERVER} ) {
-            skip 'Using remote server', 3;
-        }
-        
-        {
-            my @expected = qw[
-                TestAppDoubleAutoBug::Controller::Root->auto
-                TestAppDoubleAutoBug::Controller::Root->default
-                TestAppDoubleAutoBug::Controller::Root->end
-            ];
-    
-            my $expected = join( ", ", @expected );
-    
-            ok( my $response = request('http://localhost/action/auto/one'), 'auto + local' );
-            is( $response->header('X-Catalyst-Executed'),
-                $expected, 'Executed actions' );
-            is( $response->content, 'default, auto=1', 'Content OK' );
-        }
-    }
-}

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_live_path_bug.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_live_path_bug.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/custom_live_path_bug.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,39 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use FindBin;
-use lib "$FindBin::Bin/lib";
-
-our $iters;
-
-BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
-
-use Test::More tests => 2*$iters;
-use Catalyst::Test 'TestAppPathBug';
-
-if ( $ENV{CAT_BENCHMARK} ) {
-    require Benchmark;
-    Benchmark::timethis( $iters, \&run_tests );
-}
-else {
-    for ( 1 .. $iters ) {
-        run_tests();
-    }
-}
-    
-sub run_tests {
-    SKIP:
-    {
-        if ( $ENV{CATALYST_SERVER} ) {
-            skip 'Using remote server', 2;
-        }
-        
-        {
-            my $expected = 'This is the foo method.';
-            ok( my $response = request('http://localhost/'), 'response ok' );
-            is( $response->content, $expected, 'Content OK' );
-        }
-    }
-}

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/deprecated.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/deprecated.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/deprecated.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -9,7 +9,10 @@
 my $warnings;
 BEGIN { # Do this at compile time in case we generate a warning when use
         # DeprecatedTestApp
-    $SIG{__WARN__} = sub { $warnings++ if $_[0] =~ /trying to use NEXT/ };
+    $SIG{__WARN__} = sub {
+        $warnings++ if $_[0] =~ /uses NEXT, which is deprecated/;
+        $warnings++ if $_[0] =~ /trying to use NEXT, which is deprecated/;
+    };
 }
 use Catalyst; # Cause catalyst to be used so I can fiddle with the logging.
 my $mvc_warnings;
@@ -36,7 +39,4 @@
 ok( my $response = request('http://localhost/'), 'Request' );
 is( $response->header('X-Catalyst-Plugin-Deprecated'), '1', 'NEXT plugin ran correctly' );
 
-SKIP: {
-    skip 'non-dev release', 1 unless Catalyst::_IS_DEVELOPMENT_VERSION();
-    is( $warnings, 1, 'Got one and only one Adopt::NEXT warning');
-}
+is( $warnings, 1, 'Got one and only one Adopt::NEXT warning');

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Plugin/Test/Deprecated.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Plugin/Test/Deprecated.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Plugin/Test/Deprecated.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -2,7 +2,6 @@
 
 use strict;
 use warnings;
-use NEXT;
 
 sub prepare {
     my $class = shift;

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Plugin/Test/Plugin.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Plugin/Test/Plugin.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Plugin/Test/Plugin.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -4,7 +4,7 @@
 use warnings;
 use MRO::Compat;
 
-use base qw/Catalyst::Controller Class::Data::Inheritable/;
+use base qw/Class::Data::Inheritable/;
 
  __PACKAGE__->mk_classdata('ran_setup');
 

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/Bar.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/Bar.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/Bar.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,9 @@
+package Catalyst::Script::Bar;
+use Moose;
+use namespace::autoclean;
+
+with 'Catalyst::ScriptRole';
+
+sub run { __PACKAGE__ }
+
+1;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/Baz.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/Baz.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/Baz.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,16 @@
+package Catalyst::Script::Baz;
+use Moose;
+use namespace::autoclean;
+
+use Test::More;
+
+with 'Catalyst::ScriptRole';
+
+sub run { __PACKAGE__ }
+
+after new_with_options => sub {
+    my ($self, %args) = @_;
+    is_deeply \%args, { application_name => 'ScriptTestApp' }, 'App name correct';
+};
+
+1;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/CompileTest.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/CompileTest.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/Catalyst/Script/CompileTest.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,16 @@
+package Catalyst::Script::CompileTest;
+use Moose;
+use namespace::autoclean;
+
+use Test::More;
+
+with 'Catalyst::ScriptRole';
+
+sub run { __PACKAGE__ }
+
+after new_with_options => sub {
+    my ($self, %args) = @_;
+    is_deeply \%args, { application_name => 'ScriptTestApp' }, 'App name correct';
+};
+
+1;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/Bar.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/Bar.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/Bar.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,9 @@
+package ScriptTestApp::Script::Bar;
+use Moose;
+use namespace::autoclean;
+
+with 'Catalyst::ScriptRole';
+
+sub run { __PACKAGE__ }
+
+1;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/CompileTest.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/CompileTest.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/CompileTest.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,7 @@
+package ScriptTestApp::Script::CompileTest;
+use Moose;
+use namespace::autoclean;
+
+die("Does not compile");
+
+1;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/Foo.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/Foo.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/ScriptTestApp/Script/Foo.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,9 @@
+package ScriptTestApp::Script::Foo;
+use Moose;
+use namespace::autoclean;
+
+with 'Catalyst::ScriptRole';
+
+sub run { __PACKAGE__ }
+
+1;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Action/TestExtraArgsAction.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Action/TestExtraArgsAction.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Action/TestExtraArgsAction.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,17 @@
+package TestApp::Action::TestExtraArgsAction;
+
+use Moose;
+use namespace::autoclean;
+
+extends 'Catalyst::Action';
+
+has [qw/extra_arg another_extra_arg/] => (is => 'ro');
+
+after execute => sub {
+    my ($self, $controller, $ctx) = @_;
+    $ctx->response->header('X-TestExtraArgsAction' => join q{,} => $self->extra_arg, $self->another_extra_arg);
+};
+
+__PACKAGE__->meta->make_immutable;
+
+1;

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Action.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Action.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Action.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -3,7 +3,15 @@
 use strict;
 use base 'TestApp::Controller::Action';
 
-__PACKAGE__->config( actions => { action_action_five => { ActionClass => '+Catalyst::Action::TestBefore' } } );
+__PACKAGE__->config(
+    actions => {
+        action_action_five => { ActionClass => '+Catalyst::Action::TestBefore' },
+    },
+    action_args => {
+        '*'                 => { extra_arg         => 42 },
+        action_action_seven => { another_extra_arg => 23 },
+    },
+);
 
 sub action_action_one : Global : ActionClass('TestBefore') {
     my ( $self, $c ) = @_;
@@ -38,4 +46,9 @@
     $c->forward('TestApp::View::Dump::Request');
 }
 
+sub action_action_seven : Global : ActionClass('~TestExtraArgsAction') {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
 1;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Chained/CaptureArgs.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Chained/CaptureArgs.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Chained/CaptureArgs.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,66 @@
+package TestApp::Controller::Action::Chained::CaptureArgs;
+use warnings;
+use strict;
+
+use base qw( Catalyst::Controller );
+
+#
+#   This controller build the following patterns of URI:
+#      /captureargs/*/*
+#      /captureargs/*/*/edit
+#      /captureargs/*
+#      /captureargs/*/edit
+#      /captureargs/test/*
+#   It will output the arguments they got passed to @_ after the
+#   context object. 
+#   /captureargs/one/edit should not dispatch to /captureargs/*/*
+#   /captureargs/test/one should not dispatch to /captureargs/*/*
+
+sub base  :Chained('/') PathPart('captureargs') CaptureArgs(0) {
+    my ( $self, $c, $arg ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'base';
+}
+
+sub two_args :Chained('base') PathPart('') CaptureArgs(2) {
+    my ( $self, $c, $arg1, $arg2 ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'two_args', $arg1, $arg2;
+}
+
+sub one_arg :Chained('base') ParthPart('') CaptureArgs(1) {
+    my ( $self, $c, $arg ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'one_arg', $arg;
+}
+
+sub edit_two_args  :Chained('two_args') PathPart('edit') Args(0) {
+    my ( $self, $c ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'edit_two_args';
+}
+
+sub edit_one_arg :Chained('one_arg') PathPart('edit') Args(0) {
+    my ( $self, $c ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'edit_one_arg';
+}
+
+sub view_two_args :Chained('two_args') PathPart('') Args(0) {
+    my ( $self, $c ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'view_two_args';
+}
+
+sub view_one_arg :Chained('one_arg') PathPart('') Args(0) {
+    my ( $self, $c ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'view_one_arg';
+}
+
+sub test_plus_arg :Chained('base') PathPart('test') Args(1) {
+    my ( $self, $c, $arg ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'test_plus_arg', $arg;
+}
+
+
+sub end : Private {
+    my ( $self, $c ) = @_;
+    no warnings 'uninitialized';
+    $c->response->body( join '; ', @{ $c->stash->{ passed_args } } );
+}
+
+1;

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Chained.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Chained.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Action/Chained.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -204,6 +204,13 @@
     $c->req->args([ map { decode_entities($_) } @{ $c->req->args }]);
 }
 
+sub roundtrip_urifor : Chained('/') PathPart('chained/roundtrip_urifor') CaptureArgs(1) {}
+sub roundtrip_urifor_end : Chained('roundtrip_urifor') PathPart('') Args(1) {
+    my ($self, $c) = @_;
+    # This should round-trip, always - i.e. the uri you put in should come back out.
+    $c->res->body($c->uri_for($c->action, $c->req->captures, @{$c->req->args}, $c->req->parameters));
+    $c->stash->{no_end} = 1;
+}
 
 sub end :Private {
   my ($self, $c) = @_;

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Root.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Controller/Root.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,5 +1,6 @@
 package TestApp::Controller::Root;
-
+use strict;
+use warnings;
 use base 'Catalyst::Controller';
 
 __PACKAGE__->config->{namespace} = '';

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Model/Generating.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Model/Generating.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp/Model/Generating.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,22 @@
+package TestApp::Model::Generating;
+use Moose;
+extends 'Catalyst::Model';
+
+sub BUILD {
+    Class::MOP::Class->create(
+        'TestApp::Model::Generated' => (
+            methods => {
+                foo => sub { 'foo' }
+            }
+        )
+    );
+}
+
+sub expand_modules {
+    return ('TestApp::Model::Generated');
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
+1;

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestApp.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -20,7 +20,7 @@
 
 TestApp->config( name => 'TestApp', root => '/some/dir' );
 
-if (eval { Class::MOP::load_class('CatalystX::LeakChecker'); 1 }) {
+if ($::setup_leakchecker && eval { Class::MOP::load_class('CatalystX::LeakChecker'); 1 }) {
     with 'CatalystX::LeakChecker';
 
     has leaks => (

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppDoubleAutoBug.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppDoubleAutoBug.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppDoubleAutoBug.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -44,3 +44,6 @@
 
     return $c->SUPER::execute(@_);
 }
+
+1;
+

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppEncoding/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppEncoding/Controller/Root.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppEncoding/Controller/Root.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,48 @@
+package TestAppEncoding::Controller::Root;
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+use Test::More;
+
+__PACKAGE__->config->{namespace} = '';
+
+sub binary : Local {
+    my ($self, $c) = @_;
+    $c->res->body(do { 
+        open(my $fh, '<', $c->path_to('..', '..', 'catalyst_130pix.gif')) or die $!; 
+        binmode($fh); 
+        local $/ = undef; <$fh>;
+    });
+}
+
+sub binary_utf8 : Local {
+    my ($self, $c) = @_;
+    $c->forward('binary');
+    my $str = $c->res->body;
+    utf8::upgrade($str);
+    ok utf8::is_utf8($str), 'Body is variable width encoded string';
+    $c->res->body($str);
+}
+
+# called by t/aggregate/catalyst_test_utf8.t
+sub utf8_non_ascii_content : Local {
+    use utf8;
+    my ($self, $c) = @_;
+    
+    my $str = 'ʇsʎlɐʇɐɔ';  # 'catalyst' flipped at http://www.revfad.com/flip.html
+    ok utf8::is_utf8($str), '$str is in UTF8 internally';
+    
+    # encode $str into a sequence of octets and turn off the UTF-8 flag, so that
+    # we don't get the 'Wide character in syswrite' error in Catalyst::Engine
+    utf8::encode($str);
+    ok !utf8::is_utf8($str), '$str is a sequence of octets (byte string)';
+    
+    $c->res->body($str);
+}
+
+
+sub end : Private {
+    my ($self,$c) = @_;
+}
+
+1;

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppEncoding.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppEncoding.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppEncoding.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,11 @@
+package TestAppEncoding;
+use strict;
+use warnings;
+use base qw/Catalyst/;
+use Catalyst;
+
+__PACKAGE__->config(name => __PACKAGE__);
+__PACKAGE__->setup;
+
+1;
+

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppPluginWithConstructor.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppPluginWithConstructor.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppPluginWithConstructor.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -4,7 +4,7 @@
 use Test::Exception;
 use Catalyst qw/+TestPluginWithConstructor/;
 use Moose;
-BEGIN { extends qw/Catalyst Catalyst::Controller/ } # Ewww, FIXME.
+extends qw/Catalyst/;
 
 __PACKAGE__->setup;
 our $MODIFIER_FIRED = 0;

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppStats.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppStats.pm	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppStats.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -21,3 +21,6 @@
 
 sub info { push(@TestAppStats::log_messages, @_); }
 sub debug { push(@TestAppStats::log_messages, @_); }
+
+1;
+

Added: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppToTestScripts.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppToTestScripts.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/lib/TestAppToTestScripts.pm	2010-03-31 18:20:10 UTC (rev 13115)
@@ -0,0 +1,14 @@
+package TestAppToTestScripts;
+use strict;
+use warnings;
+use Carp;
+
+our @RUN_ARGS;
+
+sub run {
+    @RUN_ARGS = @_;
+    1; # Does this work?
+}
+
+1;
+

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/live_component_controller_context_closure.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/live_component_controller_context_closure.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/live_component_controller_context_closure.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -3,8 +3,8 @@
 use Test::More;
 
 BEGIN {
-    unless (eval 'use CatalystX::LeakChecker 0.03; 1') {
-        plan skip_all => 'CatalystX::LeakChecker 0.03 required for this test';
+    unless (eval 'use CatalystX::LeakChecker 0.05; 1') {
+        plan skip_all => 'CatalystX::LeakChecker 0.05 required for this test';
     }
 
     plan tests => 4;
@@ -13,6 +13,8 @@
 use FindBin;
 use lib "$FindBin::Bin/lib";
 
+BEGIN { $::setup_leakchecker = 1 }
+
 use Catalyst::Test 'TestApp';
 
 {

Modified: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/live_fork.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/live_fork.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/live_fork.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -26,7 +26,6 @@
 plan tests => 13; # otherwise
 
 {
-  system:
     ok(my $result = get('/fork/system/%2Fbin%2Fls'), 'system');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];
@@ -37,7 +36,6 @@
 }
 
 {
-  backticks:
     ok(my $result = get('/fork/backticks/%2Fbin%2Fls'), '`backticks`');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];
@@ -49,7 +47,6 @@
     like($result_ref->{result}, qr{\n.*\n}m, 'contains two newlines');
 }
 {
-  fork:
     ok(my $result = get('/fork/fork'), 'fork');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/meta_method_unneeded.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/meta_method_unneeded.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/meta_method_unneeded.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,20 +0,0 @@
-use strict;
-use warnings;
-use FindBin qw/$Bin/;
-use lib "$Bin/lib";
-use Test::More tests => 1;
-use Test::Exception;
-use Carp ();
-
-# Doing various silly things, like for example
-# use CGI qw/:standard/ in your conrtoller / app
-# will overwrite your meta method, therefore Catalyst
-# can't depend on it being there correctly.
-
-# This is/was demonstrated by Catalyst::Controller::WrapCGI
-# and Catalyst::Plugin::Cache::Curried
-
-use Catalyst::Test 'TestAppWithMeta';
-
-ok( request('/')->is_success );
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_actions.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_actions.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_actions.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,26 +0,0 @@
-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/];
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_config.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_config.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_config.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,91 +0,0 @@
-## ============================================================================
-## Test to make sure that subclassed controllers (catalyst controllers
-## that inherit from a custom base catalyst controller) don't experienc
-## any namespace collision in the values under config.
-## ============================================================================
-
-use Test::More tests => 9;
-
-use strict;
-use warnings;
-
-use_ok('Catalyst');
-
-## ----------------------------------------------------------------------------
-## First We define a base controller that inherits from Catalyst::Controller
-## We add something to the config that we expect all children classes to
-## be able to find.
-## ----------------------------------------------------------------------------
-
-{
-    package base_controller;
-
-    use base 'Catalyst::Controller';
-
-    __PACKAGE__->config( base_key   => 'base_value' );
-}
-
-## ----------------------------------------------------------------------------
-## Next we instantiate two classes that inherit from the base controller.  We
-## Add some local config information to these.
-## ----------------------------------------------------------------------------
-
-{
-    package controller_a;
-
-    use base 'base_controller';
-
-    __PACKAGE__->config( key_a => 'value_a' );
-}
-
-
-{
-    package controller_b;
-
-    use base 'base_controller';
-
-    __PACKAGE__->config->{key_b} = 'value_b';
-}
-
-## Okay, we expect that the base controller has a config with one key
-## and that the two children controllers inherit that config key and then
-## add one more.  So the base controller has one config value and the two
-## children each have two.
-
-## ----------------------------------------------------------------------------
-## THE TESTS.  Basically we first check to make sure that all the children of
-## the base_controller properly inherit the {base_key => 'base_value'} info
-## and that each of the children also has its local config data and that none
-## of the classes have data that is unexpected.
-## ----------------------------------------------------------------------------
-
-
-# First round, does everything have what we expect to find? If these tests fail there is something
-# wrong with the way config is storing its information.
-
-ok( base_controller->config->{base_key} eq 'base_value', 'base_controller has expected config value for "base_key"') or
- diag('"base_key" defined as "'.base_controller->config->{base_key}.'" and not "base_value" in config');
-
-ok( controller_a->config->{base_key} eq 'base_value', 'controller_a has expected config value for "base_key"') or
- diag('"base_key" defined as "'.controller_a->config->{base_key}.'" and not "base_value" in config');
-
-ok( controller_a->config->{key_a} eq 'value_a', 'controller_a has expected config value for "key_a"') or
- diag('"key_a" defined as "'.controller_a->config->{key_a}.'" and not "value_a" in config');
-
-ok( controller_b->config->{base_key} eq 'base_value', 'controller_b has expected config value for "base_key"') or
- diag('"base_key" defined as "'.controller_b->config->{base_key}.'" and not "base_value" in config');
-
-ok( controller_b->config->{key_b} eq 'value_b', 'controller_b has expected config value for "key_b"') or
- diag('"key_b" defined as "'.controller_b->config->{key_b}.'" and not "value_b" in config');
-
-# second round, does each controller have the expected number of config values? If this test fails there is
-# probably some data collision between the controllers.
-
-ok( scalar(keys %{base_controller->config}) == 1, 'base_controller has the expected number of config values') or
- diag("base_controller should have 1 config value, but it has ".scalar(keys %{base_controller->config}));
-
-ok( scalar(keys %{controller_a->config}) == 2, 'controller_a has the expected number of config values') or
- diag("controller_a  should have 2 config value, but it has ".scalar(keys %{base_controller->config}));
-
-ok( scalar(keys %{controller_b->config}) == 2, 'controller_b has the expected number of config values') or
- diag("controller_a should have 2 config value, but it has ".scalar(keys %{base_controller->config}));

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_namespace.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_namespace.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_controller_namespace.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,24 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 2;
-
-BEGIN {
-  package MyApp::Controller::Foo;
-
-  use base qw/Catalyst::Controller/;
-
-  package MyApp::Controller::Root;
-
-  use base qw/Catalyst::Controller/;
-
-  __PACKAGE__->config(namespace => '');
-
-  package Stub;
-
-  sub config { {} };
-}
-
-is(MyApp::Controller::Foo->action_namespace('Stub'), 'foo');
-
-is(MyApp::Controller::Root->action_namespace('Stub'), '');

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_action.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_action.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_action.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,54 +0,0 @@
-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');

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_classdata.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_classdata.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_classdata.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,106 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use Scalar::Util qw/refaddr blessed/;
-use Test::More tests => 37;
-
-{
-  package ClassDataTest;
-  use Moose;
-  with 'Catalyst::ClassData';
-
-  package ClassDataTest2;
-  use Moose;
-  extends 'ClassDataTest';
-
-}
-
-  my $scalar = '100';
-  my $arrayref = [];
-  my $hashref = {};
-  my $scalarref = \$scalar;
-  my $coderef = sub { "beep" };
-
-  my $scalar2 = '200';
-  my $arrayref2 = [];
-  my $hashref2 = {};
-  my $scalarref2 = \$scalar2;
-  my $coderef2 = sub { "beep" };
-
-  my $scalar3 = '300';
-  my $arrayref3 = [];
-  my $hashref3 = {};
-  my $scalarref3 = \$scalar3;
-  my $coderef3 = sub { "beep" };
-
-
-my @accessors = qw/_arrayref _hashref _scalarref _coderef _scalar/;
-ClassDataTest->mk_classdata($_) for @accessors;
-can_ok('ClassDataTest', @accessors);
-
-ClassDataTest2->mk_classdata("beep", "meep");
-is(ClassDataTest2->beep, "meep");
-
-ClassDataTest->_arrayref($arrayref);
-ClassDataTest->_hashref($hashref);
-ClassDataTest->_scalarref($scalarref);
-ClassDataTest->_coderef($coderef);
-ClassDataTest->_scalar($scalar);
-
-is(ref(ClassDataTest->_arrayref), 'ARRAY');
-is(ref(ClassDataTest->_hashref), 'HASH');
-is(ref(ClassDataTest->_scalarref), 'SCALAR');
-is(ref(ClassDataTest->_coderef), 'CODE');
-ok( !ref(ClassDataTest->_scalar) );
-is(refaddr(ClassDataTest->_arrayref), refaddr($arrayref));
-is(refaddr(ClassDataTest->_hashref), refaddr($hashref));
-is(refaddr(ClassDataTest->_scalarref), refaddr($scalarref));
-is(refaddr(ClassDataTest->_coderef), refaddr($coderef));
-is(ClassDataTest->_scalar, $scalar);
-
-
-is(ref(ClassDataTest2->_arrayref), 'ARRAY');
-is(ref(ClassDataTest2->_hashref), 'HASH');
-is(ref(ClassDataTest2->_scalarref), 'SCALAR');
-is(ref(ClassDataTest2->_coderef), 'CODE');
-ok( !ref(ClassDataTest2->_scalar) );
-is(refaddr(ClassDataTest2->_arrayref), refaddr($arrayref));
-is(refaddr(ClassDataTest2->_hashref), refaddr($hashref));
-is(refaddr(ClassDataTest2->_scalarref), refaddr($scalarref));
-is(refaddr(ClassDataTest2->_coderef), refaddr($coderef));
-is(ClassDataTest2->_scalar, $scalar);
-
-ClassDataTest2->_arrayref($arrayref2);
-ClassDataTest2->_hashref($hashref2);
-ClassDataTest2->_scalarref($scalarref2);
-ClassDataTest2->_coderef($coderef2);
-ClassDataTest2->_scalar($scalar2);
-
-is(refaddr(ClassDataTest2->_arrayref), refaddr($arrayref2));
-is(refaddr(ClassDataTest2->_hashref), refaddr($hashref2));
-is(refaddr(ClassDataTest2->_scalarref), refaddr($scalarref2));
-is(refaddr(ClassDataTest2->_coderef), refaddr($coderef2));
-is(ClassDataTest2->_scalar, $scalar2);
-
-is(refaddr(ClassDataTest->_arrayref), refaddr($arrayref));
-is(refaddr(ClassDataTest->_hashref), refaddr($hashref));
-is(refaddr(ClassDataTest->_scalarref), refaddr($scalarref));
-is(refaddr(ClassDataTest->_coderef), refaddr($coderef));
-is(ClassDataTest->_scalar, $scalar);
-
-ClassDataTest->_arrayref($arrayref3);
-ClassDataTest->_hashref($hashref3);
-ClassDataTest->_scalarref($scalarref3);
-ClassDataTest->_coderef($coderef3);
-ClassDataTest->_scalar($scalar3);
-
-is(refaddr(ClassDataTest->_arrayref), refaddr($arrayref3));
-is(refaddr(ClassDataTest->_hashref), refaddr($hashref3));
-is(refaddr(ClassDataTest->_scalarref), refaddr($scalarref3));
-is(refaddr(ClassDataTest->_coderef), refaddr($coderef3));
-is(ClassDataTest->_scalar, $scalar3);
-
-my $i = bless {}, 'ClassDataTest';
-$i->_scalar('foo');
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,93 +0,0 @@
-use Test::More tests => 22;
-use strict;
-use warnings;
-
-use_ok('Catalyst');
-
-my @complist = map { "MyApp::$_"; } qw/C::Controller M::Model V::View/;
-
-{
-  package MyApp;
-
-  use base qw/Catalyst/;
-
-  __PACKAGE__->components({ map { ($_, $_) } @complist });
-
-  # this is so $c->log->warn will work
-  __PACKAGE__->setup_log;
-}
-
-is(MyApp->comp('MyApp::V::View'), 'MyApp::V::View', 'Explicit return ok');
-
-is(MyApp->comp('C::Controller'), 'MyApp::C::Controller', 'Two-part return ok');
-
-is(MyApp->comp('Model'), 'MyApp::M::Model', 'Single part return ok');
-
-is_deeply([ MyApp->comp() ], \@complist, 'Empty return ok');
-
-# Is this desired behaviour?
-is_deeply([ MyApp->comp('Foo') ], \@complist, 'Fallthrough return ok');
-
-# regexp behavior
-{
-    is_deeply( [ MyApp->comp( qr{Model} ) ], [ 'MyApp::M::Model'], 'regexp ok' );
-    is_deeply( [ MyApp->comp('MyApp::V::View$') ], [ 'MyApp::V::View' ], 'Explicit return ok');
-    is_deeply( [ MyApp->comp('MyApp::C::Controller$') ], [ 'MyApp::C::Controller' ], 'Explicit return ok');
-    is_deeply( [ MyApp->comp('MyApp::M::Model$') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
-
-    # a couple other varieties for regexp fallback
-    is_deeply( [ MyApp->comp('M::Model') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
-
-    {
-        my $warnings = 0;
-        no warnings 'redefine';
-        local *Catalyst::Log::warn = sub { $warnings++ };
-
-        is_deeply( [ MyApp->comp('::M::Model') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
-        ok( $warnings, 'regexp fallback warnings' );
-
-        $warnings = 0;
-        is_deeply( [ MyApp->comp('Mode') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
-        ok( $warnings, 'regexp fallback warnings' );
-
-        $warnings = 0;
-        is(MyApp->comp('::M::'), 'MyApp::M::Model', 'Regex return ok');
-        ok( $warnings, 'regexp fallback for comp() warns' );
-    }
-
-}
-
-# multiple returns
-{
-    my @expected = sort qw( MyApp::C::Controller MyApp::M::Model );
-    my @got = sort MyApp->comp( qr{::[MC]::} );
-    is_deeply( \@got, \@expected, 'multiple results from regexp ok' );
-}
-
-# failed search
-{
-    is_deeply( scalar MyApp->comp( qr{DNE} ), 0, 'no results for failed search' );
-}
-
-
-#checking @args passed to ACCEPT_CONTEXT
-{
-    my $args;
-
-    {
-        no warnings 'once';
-        *MyApp::M::Model::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
-    }
-
-    my $c = bless {}, 'MyApp';
-
-    $c->component('MyApp::M::Model', qw/foo bar/);
-    is_deeply($args, [qw/foo bar/], 'args passed to ACCEPT_CONTEXT ok');
-
-    $c->component('M::Model', qw/foo2 bar2/);
-    is_deeply($args, [qw/foo2 bar2/], 'args passed to ACCEPT_CONTEXT ok');
-
-    $c->component('Mode', qw/foo3 bar3/);
-    is_deeply($args, [qw/foo3 bar3/], 'args passed to ACCEPT_CONTEXT ok');
-} 
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component_loading.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component_loading.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component_loading.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,226 +0,0 @@
-# 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
-# One test for components in inner packages
-use Test::More tests => 2 + 6 * 24 + 8 + 1;
-
-use strict;
-use warnings;
-
-use File::Spec;
-use File::Path;
-
-my $libdir = 'test_trash';
-unshift(@INC, $libdir);
-
-my $appclass = 'TestComponents';
-my @components = (
-    { type => 'Controller', prefix => 'C', name => 'Bar' },
-    { type => 'Controller', prefix => 'C', name => 'Foo::Bar' },
-    { type => 'Controller', prefix => 'C', name => 'Foo::Foo::Bar' },
-    { type => 'Controller', prefix => 'C', name => 'Foo::Foo::Foo::Bar' },
-    { type => 'Controller', prefix => 'Controller', name => 'Bar::Bar::Bar::Foo' },
-    { type => 'Controller', prefix => 'Controller', name => 'Bar::Bar::Foo' },
-    { type => 'Controller', prefix => 'Controller', name => 'Bar::Foo' },
-    { type => 'Controller', prefix => 'Controller', name => 'Foo' },
-    { type => 'Model', prefix => 'M', name => 'Bar' },
-    { type => 'Model', prefix => 'M', name => 'Foo::Bar' },
-    { type => 'Model', prefix => 'M', name => 'Foo::Foo::Bar' },
-    { type => 'Model', prefix => 'M', name => 'Foo::Foo::Foo::Bar' },
-    { type => 'Model', prefix => 'Model', name => 'Bar::Bar::Bar::Foo' },
-    { type => 'Model', prefix => 'Model', name => 'Bar::Bar::Foo' },
-    { type => 'Model', prefix => 'Model', name => 'Bar::Foo' },
-    { type => 'Model', prefix => 'Model', name => 'Foo' },
-    { type => 'View', prefix => 'V', name => 'Bar' },
-    { type => 'View', prefix => 'V', name => 'Foo::Bar' },
-    { type => 'View', prefix => 'V', name => 'Foo::Foo::Bar' },
-    { type => 'View', prefix => 'V', name => 'Foo::Foo::Foo::Bar' },
-    { type => 'View', prefix => 'View', name => 'Bar::Bar::Bar::Foo' },
-    { type => 'View', prefix => 'View', name => 'Bar::Bar::Foo' },
-    { type => 'View', prefix => 'View', name => 'Bar::Foo' },
-    { type => 'View', prefix => 'View', name => 'Foo' },
-);
-
-sub write_component_file { 
-  my ($dir_list, $module_name, $content) = @_;
-
-  my $dir  = File::Spec->catdir(@$dir_list);
-  my $file = File::Spec->catfile($dir, $module_name . '.pm');
-
-  mkpath(join(q{/}, @$dir_list) );
-  open(my $fh, '>', $file) or die "Could not open file $file for writing: $!";
-  print $fh $content;
-  close $fh;
-}
-
-sub make_component_file {
-    my ($type, $prefix, $name) = @_;
-
-    my $compbase = "Catalyst::${type}";
-    my $fullname = "${appclass}::${prefix}::${name}";
-    my @namedirs = split(/::/, $name);
-    my $name_final = pop(@namedirs);
-    my @dir_list = ($libdir, $appclass, $prefix, @namedirs);
-
-    write_component_file(\@dir_list, $name_final, <<EOF);
-package $fullname;
-use MRO::Compat;
-use base '$compbase';
-sub COMPONENT {
-    my \$self = shift->next::method(\@_);
-    no strict 'refs';
-    *{\__PACKAGE__ . "::whoami"} = sub { return \__PACKAGE__; };
-    \$self;
-}
-1;
-
-EOF
-}
-
-foreach my $component (@components) {
-    make_component_file($component->{type},
-                        $component->{prefix},
-                        $component->{name});
-}
-
-my $shut_up_deprecated_warnings = q{
-    __PACKAGE__->log(Catalyst::Log->new('fatal'));
-};
-
-eval "package $appclass; use Catalyst; $shut_up_deprecated_warnings __PACKAGE__->setup";
-
-can_ok( $appclass, 'components');
-
-my $complist = $appclass->components;
-
-# the +1 below is for the app class itself
-is(scalar keys %$complist, 24+1, "Correct number of components loaded");
-
-foreach (keys %$complist) {
-
-    # Skip the component which happens to be the app itself
-    next if $_ eq $appclass;
-
-    my $instance = $appclass->component($_);
-    isa_ok($instance, $_);
-    can_ok($instance, 'whoami');
-    is($instance->whoami, $_);
-
-    if($_ =~ /^${appclass}::(?:V|View)::(.*)/) {
-        my $moniker = $1;
-        isa_ok($instance, 'Catalyst::View');
-        can_ok($appclass->view($moniker), 'whoami');
-        is($appclass->view($moniker)->whoami, $_);
-    }
-    elsif($_ =~ /^${appclass}::(?:M|Model)::(.*)/) {
-        my $moniker = $1;
-        isa_ok($instance, 'Catalyst::Model');
-        can_ok($appclass->model($moniker), 'whoami');
-        is($appclass->model($moniker)->whoami, $_);
-    }
-    elsif($_ =~ /^${appclass}::(?:C|Controller)::(.*)/) {
-        my $moniker = $1;
-        isa_ok($instance, 'Catalyst::Controller');
-        can_ok($appclass->controller($moniker), 'whoami');
-        is($appclass->controller($moniker)->whoami, $_);
-    }
-    else {
-        die "Something is wrong with this test, this should"
-            . " have been unreachable";
-    }
-}
-
-rmtree($libdir);
-
-# test extra component loading options
-
-$appclass = 'ExtraOptions';
-push @components, { type => 'View', prefix => 'Extra', name => 'Foo' };
-
-foreach my $component (@components) {
-    make_component_file($component->{type},
-                        $component->{prefix},
-                        $component->{name});
-}
-
-eval qq(
-package $appclass;
-use Catalyst;
-$shut_up_deprecated_warnings
-__PACKAGE__->config->{ setup_components } = {
-    search_extra => [ '::Extra' ],
-    except       => [ "${appclass}::Controller::Foo" ]
-};
-__PACKAGE__->setup;
-);
-
-can_ok( $appclass, 'components');
-
-$complist = $appclass->components;
-
-is(scalar keys %$complist, 24+1, "Correct number of components loaded");
-
-ok( !exists $complist->{ "${appclass}::Controller::Foo" }, 'Controller::Foo was skipped' );
-ok( exists $complist->{ "${appclass}::Extra::Foo" }, 'Extra::Foo was loaded' );
-
-rmtree($libdir);
-
-$appclass = "ComponentOnce";
-
-write_component_file([$libdir, $appclass, 'Model'], 'TopLevel', <<EOF);
-package ${appclass}::Model::TopLevel;
-use base 'Catalyst::Model';
-sub COMPONENT {
- 
-    my \$self = shift->next::method(\@_);
-    no strict 'refs';
-    *{\__PACKAGE__ . "::whoami"} = sub { return \__PACKAGE__; };
-    *${appclass}::Model::TopLevel::GENERATED::ACCEPT_CONTEXT = sub {
-        return bless {}, 'FooBarBazQuux';
-    };
-    \$self;
-}
-
-package ${appclass}::Model::TopLevel::Nested;
-
-sub COMPONENT { die "COMPONENT called in the wrong order!"; }
-
-1;
-
-EOF
-
-write_component_file([$libdir, $appclass, 'Model', 'TopLevel'], 'Nested', <<EOF);
-package ${appclass}::Model::TopLevel::Nested;
-use base 'Catalyst::Model';
-
-my \$called=0;
-no warnings 'redefine';
-sub COMPONENT { \$called++;return shift->next::method(\@_); }
-sub called { return \$called };
-1;
-
-EOF
-
-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);

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component_mro.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component_mro.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_component_mro.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,29 +0,0 @@
-use Test::More tests => 1;
-use strict;
-use warnings;
-
-{
-  package MyApp::Component;
-  use Test::More;
-
-  sub COMPONENT {
-    fail 'This no longer gets dispatched to';
-  }
-
-  package MyApp::MyComponent;
-
-  use base 'Catalyst::Component', 'MyApp::Component';
-
-}
-
-my $warn = '';
-{  
-  local $SIG{__WARN__} = sub {
-    $warn .= $_[0];  
-  };
-  MyApp::MyComponent->COMPONENT('MyApp');
-}
-
-like($warn, qr/after Catalyst::Component in MyApp::Component/, 
-    'correct warning thrown');
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_engine_fixenv-iis6.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_engine_fixenv-iis6.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_engine_fixenv-iis6.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,62 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use Test::More;
-
-eval "use FCGI";
-plan skip_all => 'FCGI required' if $@;
-
-plan tests => 2;
-
-require Catalyst::Engine::FastCGI;
-
-my %env = (
-    'SCRIPT_NAME' => '/koo/blurb',
-    'PATH_INFO' => '/koo/blurb',
-    'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
-    'REQUEST_METHOD' => 'GET',
-    'SCRIPT_FILENAME' => 'C:\\Foo\\script\\blurb',
-    'INSTANCE_META_PATH' => '/LM/W3SVC/793536',
-    'SERVER_SOFTWARE' => 'Microsoft-IIS/6.0',
-    'AUTH_PASSWORD' => '',
-    'AUTH_TYPE' => '',
-    'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows; U; Windows NT 5.2; de; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 (.NET CLR 3.5.30729)',
-    'REMOTE_PORT' => '1281',
-    'QUERY_STRING' => '',
-    'URL' => '/koo/blurb',
-    'HTTP_ACCEPT_LANGUAGE' => 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3',
-    'FCGI_ROLE' => 'RESPONDER',
-    'HTTP_KEEP_ALIVE' => '300',
-    'CONTENT_TYPE' => '',
-    'LOCAL_ADDR' => '127.0.0.1',
-    'GATEWAY_INTERFACE' => 'CGI/1.1',
-    'HTTPS' => 'off',
-    'DOCUMENT_ROOT' => 'C:\\Foo\\script',
-    'REMOTE_HOST' => '127.0.0.1',
-    'PATH_TRANSLATED' => 'C:\\Foo\\script\\blurb',
-    'APPL_PHYSICAL_PATH' => 'C:\\Foo\\script\\',
-    'SERVER_NAME' => '127.0.0.1',
-    'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
-    'HTTP_CONNECTION' => 'keep-alive',
-    'INSTANCE_ID' => '793536',
-    'CONTENT_LENGTH' => '0',
-    'AUTH_USER' => '',
-    'APPL_MD_PATH' => '/LM/W3SVC/793536/Root/koo',
-    'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
-    'REMOTE_USER' => '',
-    'SERVER_PORT_SECURE' => '0',
-    'SERVER_PORT' => 83,
-    'REMOTE_ADDR' => '127.0.0.1',
-    'SERVER_PROTOCOL' => 'HTTP/1.1',
-    'REQUEST_URI' => '/koo/blurb',
-    'APP_POOL_ID' => 'DefaultAppPool',
-    'HTTP_HOST' => '127.0.0.1:83'
-);
-
-Catalyst::Engine::FastCGI->_fix_env(\%env);
-
-is($env{PATH_INFO}, '//blurb', 'check PATH_INFO');
-is($env{SCRIPT_NAME}, '/koo', 'check SCRIPT_NAME');
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_engine_fixenv-lighttpd.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_engine_fixenv-lighttpd.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_engine_fixenv-lighttpd.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,46 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use Test::More;
-
-eval "use FCGI";
-plan skip_all => 'FCGI required' if $@;
-
-plan tests => 2;
-
-require Catalyst::Engine::FastCGI;
-
-my %env = (
-    'SCRIPT_NAME'          => '/bar',
-    'SERVER_NAME'          => 'localhost:8000',
-    'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
-    'HTTP_CONNECTION'      => 'keep-alive',
-    'PATH_INFO'            => '',
-    'HTTP_ACCEPT'          => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
-    'REQUEST_METHOD'       => 'GET',
-    'SCRIPT_FILENAME'      => '/tmp/Foo/root/bar',
-    'HTTP_ACCEPT_CHARSET'  => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
-    'SERVER_SOFTWARE'      => 'lighttpd/1.4.15',
-    'QUERY_STRING'         => '',
-    'REMOTE_PORT'          => '22207',
-    'SERVER_PORT'          => 8000,
-    'REDIRECT_STATUS'      => '200',
-    'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5',
-    'REMOTE_ADDR'          => '127.0.0.1',
-    'FCGI_ROLE'            => 'RESPONDER',
-    'HTTP_KEEP_ALIVE'      => '300',
-    'SERVER_PROTOCOL'      => 'HTTP/1.1',
-    'REQUEST_URI'          => '/bar',
-    'GATEWAY_INTERFACE'    => 'CGI/1.1',
-    'SERVER_ADDR'          => '127.0.0.1',
-    'DOCUMENT_ROOT'        => '/tmp/Foo/root',
-    'HTTP_HOST'            => 'localhost:8000',
-);
-
-Catalyst::Engine::FastCGI->_fix_env(\%env);
-
-is($env{PATH_INFO}, '/bar', 'check PATH_INFO');
-ok(!exists($env{SCRIPT_NAME}), 'check SCRIPT_NAME');
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_log.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_log.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_log.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,72 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 23;
-
-my $LOG;
-
-BEGIN {
-    chdir 't' if -d 't';
-    use lib '../lib';
-    $LOG = 'Catalyst::Log';
-    use_ok $LOG or die;
-}
-my @MESSAGES;
-{
-    no warnings 'redefine';
-    *Catalyst::Log::_send_to_log = sub {
-        my $self = shift;
-        push @MESSAGES, @_;
-    };
-}
-
-can_ok $LOG, 'new';
-ok my $log = $LOG->new, '... and creating a new log object should succeed';
-isa_ok $log, $LOG, '... and the object it returns';
-
-can_ok $log, 'is_info';
-ok $log->is_info, '... and the default behavior is to allow info messages';
-
-can_ok $log, 'info';
-ok $log->info('hello there!'),
-    '... passing it an info message should succeed';
-
-can_ok $log, "_flush";
-$log->_flush;
-ok @MESSAGES, '... and flushing the log should succeed';
-is scalar @MESSAGES, 1, '... with one log message';
-like $MESSAGES[0], qr/^\[info\] hello there!$/,
-    '... which should match the format we expect';
-
-{
-
-    package Catalyst::Log::Subclass;
-    use base qw/Catalyst::Log/;
-
-    sub _send_to_log {
-        my $self = shift;
-        push @MESSAGES, '---';
-        push @MESSAGES, @_;
-    }
-}
-
-my $SUBCLASS = 'Catalyst::Log::Subclass';
-can_ok $SUBCLASS, 'new';
-ok $log = Catalyst::Log::Subclass->new,
-    '... and the log subclass constructor shoudl return a new object';
-isa_ok $log, $SUBCLASS, '... and the object it returns';
-isa_ok $log, $LOG,      '... and it also';
-
-can_ok $log, 'info';
-ok $log->info('hi there!'),
-    '... passing it an info message should succeed';
-
-can_ok $log, "_flush";
- at MESSAGES = (); # clear the message log
-$log->_flush;
-ok @MESSAGES, '... and flushing the log should succeed';
-is scalar @MESSAGES, 2, '... with two log messages';
-is $MESSAGES[0], '---', '... with the first one being our new data';
-like $MESSAGES[1], qr/^\[info\] hi there!$/,
-    '... which should match the format we expect';
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_merge_config_hashes.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_merge_config_hashes.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_merge_config_hashes.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,43 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More;
-
-my @tests = (
-    {
-        given   => [ { a => 1 }, { b => 1 } ],
-        expects => { a => 1, b => 1 }
-    },
-    {
-        given   => [ { a => 1 }, { a => { b => 1 } } ],
-        expects => { a => { b => 1 } }
-    },
-    {
-        given   => [ { a => { b => 1 } }, { a => 1 } ],
-        expects => { a => 1 }
-    },
-    {
-        given   => [ { a => 1 }, { a => [ 1 ] } ],
-        expects => { a => [ 1 ] }
-    },
-    {
-        given   => [ { a => [ 1 ] }, { a => 1 } ],
-        expects => { a => 1 }
-    },
-    {
-        given   => [ { a => { b => 1 } }, { a => { b => 2 } } ],
-        expects => { a => { b => 2 } }
-    },
-    {
-        given   => [ { a => { b => 1 } }, { a => { c => 1 } } ],
-        expects => { a => { b => 1, c => 1 } }
-    },
-);
-
-plan tests => scalar @tests + 1;
-
-use_ok('Catalyst');
-
-for my $test ( @ tests ) {
-    is_deeply( Catalyst->merge_config_hashes( @{ $test->{ given } } ), $test->{ expects } );
-}

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_mvc.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_mvc.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_mvc.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,227 +0,0 @@
-use Test::More tests => 51;
-use strict;
-use warnings;
-
-use_ok('Catalyst');
-
-my @complist =
-  map { "MyApp::$_"; }
-  qw/C::Controller M::Model V::View Controller::C Model::M View::V Controller::Model::Dummy::Model Model::Dummy::Model/;
-
-{
-
-    package MyApp;
-
-    use base qw/Catalyst/;
-
-    __PACKAGE__->components( { map { ( ref($_)||$_ , $_ ) } @complist } );
-
-    my $thingie={};
-    bless $thingie, 'Some::Test::Object';
-    __PACKAGE__->components->{'MyApp::Model::Test::Object'} = $thingie;
-
-    # allow $c->log->warn to work
-    __PACKAGE__->setup_log;
-}
-
-is( MyApp->view('View'), 'MyApp::V::View', 'V::View ok' );
-
-is( MyApp->controller('Controller'),
-    'MyApp::C::Controller', 'C::Controller ok' );
-
-is( MyApp->model('Model'), 'MyApp::M::Model', 'M::Model ok' );
-
-is( MyApp->model('Dummy::Model'), 'MyApp::Model::Dummy::Model', 'Model::Dummy::Model ok' );
-
-isa_ok( MyApp->model('Test::Object'), 'Some::Test::Object', 'Test::Object ok' );
-
-is( MyApp->controller('Model::Dummy::Model'), 'MyApp::Controller::Model::Dummy::Model', 'Controller::Model::Dummy::Model ok' );
-
-is( MyApp->view('V'), 'MyApp::View::V', 'View::V ok' );
-
-is( MyApp->controller('C'), 'MyApp::Controller::C', 'Controller::C ok' );
-
-is( MyApp->model('M'), 'MyApp::Model::M', 'Model::M ok' );
-
-# failed search
-{
-    is( MyApp->model('DNE'), undef, 'undef for invalid search' );
-}
-
-is_deeply( [ sort MyApp->views ],
-           [ qw/V View/ ],
-           'views ok' );
-
-is_deeply( [ sort MyApp->controllers ],
-           [ qw/C Controller Model::Dummy::Model/ ],
-           'controllers ok');
-
-is_deeply( [ sort MyApp->models ],
-           [ qw/Dummy::Model M Model Test::Object/ ],
-           'models ok');
-
-{
-    my $warnings = 0;
-    no warnings 'redefine';
-    local *Catalyst::Log::warn = sub { $warnings++ };
-
-    like (MyApp->view , qr/^MyApp\::(V|View)\::/ , 'view() with no defaults returns *something*');
-    ok( $warnings, 'view() w/o a default is random, warnings thrown' );
-}
-
-is ( bless ({stash=>{current_view=>'V'}}, 'MyApp')->view , 'MyApp::View::V', 'current_view ok');
-
-my $view = bless {} , 'MyApp::View::V'; 
-is ( bless ({stash=>{current_view_instance=> $view }}, 'MyApp')->view , $view, 'current_view_instance ok');
-
-is ( bless ({stash=>{current_view_instance=> $view, current_view=>'MyApp::V::View' }}, 'MyApp')->view , $view, 
-  'current_view_instance precedes current_view ok');
-
-{
-    my $warnings = 0;
-    no warnings 'redefine';
-    local *Catalyst::Log::warn = sub { $warnings++ };
-
-    ok( my $model = MyApp->model );
-
-    ok( (($model =~ /^MyApp\::(M|Model)\::/) ||
-        $model->isa('Some::Test::Object')),
-        'model() with no defaults returns *something*' );
-
-    ok( $warnings, 'model() w/o a default is random, warnings thrown' );
-}
-
-is ( bless ({stash=>{current_model=>'M'}}, 'MyApp')->model , 'MyApp::Model::M', 'current_model ok');
-
-my $model = bless {} , 'MyApp::Model::M'; 
-is ( bless ({stash=>{current_model_instance=> $model }}, 'MyApp')->model , $model, 'current_model_instance ok');
-
-is ( bless ({stash=>{current_model_instance=> $model, current_model=>'MyApp::M::Model' }}, 'MyApp')->model , $model, 
-  'current_model_instance precedes current_model ok');
-
-MyApp->config->{default_view} = 'V';
-is ( bless ({stash=>{}}, 'MyApp')->view , 'MyApp::View::V', 'default_view ok');
-is ( MyApp->view , 'MyApp::View::V', 'default_view in class method ok');
-
-MyApp->config->{default_model} = 'M';
-is ( bless ({stash=>{}}, 'MyApp')->model , 'MyApp::Model::M', 'default_model ok');
-is ( MyApp->model , 'MyApp::Model::M', 'default_model in class method ok');
-
-# regexp behavior tests
-{
-    # is_deeply is used because regexp behavior means list context
-    is_deeply( [ MyApp->view( qr{^V[ie]+w$} ) ], [ 'MyApp::V::View' ], 'regexp view ok' );
-    is_deeply( [ MyApp->controller( qr{Dummy\::Model$} ) ], [ 'MyApp::Controller::Model::Dummy::Model' ], 'regexp controller ok' );
-    is_deeply( [ MyApp->model( qr{Dum{2}y} ) ], [ 'MyApp::Model::Dummy::Model' ], 'regexp model ok' );
-    
-    # object w/ qr{}
-    is_deeply( [ MyApp->model( qr{Test} ) ], [ MyApp->components->{'MyApp::Model::Test::Object'} ], 'Object returned' );
-
-    {
-        my $warnings = 0;
-        no warnings 'redefine';
-        local *Catalyst::Log::warn = sub { $warnings++ };
-
-        # object w/ regexp fallback
-        is_deeply( [ MyApp->model( 'Test' ) ], [ MyApp->components->{'MyApp::Model::Test::Object'} ], 'Object returned' );
-        ok( $warnings, 'regexp fallback warnings' );
-    }
-
-    is_deeply( [ MyApp->view('MyApp::V::View$') ], [ 'MyApp::V::View' ], 'Explicit return ok');
-    is_deeply( [ MyApp->controller('MyApp::C::Controller$') ], [ 'MyApp::C::Controller' ], 'Explicit return ok');
-    is_deeply( [ MyApp->model('MyApp::M::Model$') ], [ 'MyApp::M::Model' ], 'Explicit return ok');
-}
-
-{
-    my @expected = qw( MyApp::C::Controller MyApp::Controller::C );
-    is_deeply( [ sort MyApp->controller( qr{^C} ) ], \@expected, 'multiple controller returns from regexp search' );
-}
-
-{
-    my @expected = qw( MyApp::V::View MyApp::View::V );
-    is_deeply( [ sort MyApp->view( qr{^V} ) ], \@expected, 'multiple view returns from regexp search' );
-}
-
-{
-    my @expected = qw( MyApp::M::Model MyApp::Model::M );
-    is_deeply( [ sort MyApp->model( qr{^M} ) ], \@expected, 'multiple model returns from regexp search' );
-}
-
-# failed search
-{
-    is( scalar MyApp->controller( qr{DNE} ), 0, '0 results for failed search' );
-}
-
-#checking @args passed to ACCEPT_CONTEXT
-{
-    my $args;
-
-    {
-        no warnings 'once';
-        *MyApp::Model::M::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
-        *MyApp::View::V::ACCEPT_CONTEXT = sub { my ($self, $c, @args) = @_; $args= \@args};
-    }
-
-    my $c = bless {}, 'MyApp';
-
-    # test accept-context with class rather than instance
-    MyApp->model('M', qw/foo bar/);
-    is_deeply($args, [qw/foo bar/], 'MyApp->model args passed to ACCEPT_CONTEXT ok');
-
-
-    $c->model('M', qw/foo bar/);
-    is_deeply($args, [qw/foo bar/], '$c->model args passed to ACCEPT_CONTEXT ok');
-
-    my $x = $c->view('V', qw/foo2 bar2/);
-    is_deeply($args, [qw/foo2 bar2/], '$c->view args passed to ACCEPT_CONTEXT ok');
-
-    # regexp fallback
-    $c->view('::View::V', qw/foo3 bar3/);
-    is_deeply($args, [qw/foo3 bar3/], 'args passed to ACCEPT_CONTEXT ok');
-
-
-}
-
-{
-    my $warn = '';
-    no warnings 'redefine';
-    local *Catalyst::Log::warn = sub { $warn .= $_[1] };
-
-    is_deeply (MyApp->controller('MyApp::Controller::C'),
-        MyApp->components->{'MyApp::Controller::C'},
-        'controller by fully qualified name ok');
-
-    # You probably meant $c->controller('C') instead of $c->controller({'MyApp::Controller::C'})
-    my ($suggested_comp_name, $orig_comp_name) = $warn =~ /You probably meant (.*) instead of (.*) /;
-    isnt($suggested_comp_name, $orig_comp_name, 'suggested fix in warning for fully qualified component names makes sense' );
-}
-
-{
-    package MyApp::WithoutRegexFallback;
-
-    use base qw/Catalyst/;
-
-    __PACKAGE__->config( { disable_component_resolution_regex_fallback => 1 } );
-
-    __PACKAGE__->components( { map { ( ref($_)||$_ , $_ ) }
-        qw/MyApp::WithoutRegexFallback::Controller::Another::Foo/ } );
-
-    # allow $c->log->warn to work
-    __PACKAGE__->setup_log;
-}
-
-{
-    # test if non-regex component retrieval still works
-    is( MyApp::WithoutRegexFallback->controller('Another::Foo'),
-        'MyApp::WithoutRegexFallback::Controller::Another::Foo', 'controller Another::Foo found');
-}
-
-{
-    my $warnings = 0;
-    no warnings 'redefine';
-    local *Catalyst::Log::warn = sub { $warnings++ };
-
-    # try to get nonexisting object w/o regexp fallback
-    is( MyApp::WithoutRegexFallback->controller('Foo'), undef, 'no controller Foo found');
-    ok( !$warnings, 'no regexp fallback warnings' );
-}

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_path_to.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_path_to.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_path_to.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,39 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More;
-
-my %non_unix = (
-    MacOS   => 1,
-    MSWin32 => 1,
-    os2     => 1,
-    VMS     => 1,
-    epoc    => 1,
-    NetWare => 1,
-    dos     => 1,
-    cygwin  => 1
-);
-
-my $os = $non_unix{$^O} ? $^O : 'Unix';
-
-if(  $os ne 'Unix' ) {
-    plan skip_all => 'tests require Unix';
-}
-else {
-    plan tests => 3;
-}
-
-use_ok('Catalyst');
-
-my $context = 'Catalyst';
-
-my $config = Catalyst->config;
-
-$config->{home} = '/home/sri/my-app/';
-
-is( Catalyst::path_to( $context, 'foo' ), '/home/sri/my-app/foo', 'Unix path' );
-
-$config->{home} = '/Users/sri/myapp/';
-
-is( Catalyst::path_to( $context, 'foo', 'bar' ),
-    '/Users/sri/myapp/foo/bar', 'deep Unix path' );

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_plugin.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_plugin.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_plugin.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,64 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Test::More tests => 24;
-
-use lib 't/lib';
-
-{
-
-    package Faux::Plugin;
-
-    sub new { bless {}, shift }
-    my $count = 1;
-    sub count { $count++ }
-}
-
-my $warnings = 0;
-
-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++;
-                return;
-            }
-            die "Caught unexpected warning: " . $_[1];
-        },
-    },
-)->new_object;
-PluginTestApp->log($logger);
-
-use Catalyst::Test qw/PluginTestApp/;
-
-ok( get("/compile_time_plugins"), "get ok" );
-is( $warnings, 0, 'no warnings' );
-# FIXME - Run time plugin support is insane, and should be removed
-#         for Catalyst 5.9
-ok( get("/run_time_plugins"),     "get ok" );
-
-local $ENV{CATALYST_DEBUG} = 0;
-
-is( $warnings, 1, '1 warning' );
-
-use_ok 'TestApp';
-my @expected = qw(
-  Catalyst::Plugin::Test::Errors
-  Catalyst::Plugin::Test::Headers
-  Catalyst::Plugin::Test::Inline
-  Catalyst::Plugin::Test::MangleDollarUnderScore
-  Catalyst::Plugin::Test::Plugin
-  TestApp::Plugin::AddDispatchTypes
-  TestApp::Plugin::FullyQualified
-);
-
-# Faux::Plugin is no longer reported
-is_deeply [ TestApp->registered_plugins ], \@expected,
-  'registered_plugins() should only report the plugins for the current class';
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,88 +0,0 @@
-use strict;
-use warnings;
-use Class::MOP::Class;
-use Catalyst::Runtime;
-
-use Test::More tests => 29;
-
-{
-    # Silence the log.
-    my $meta = Catalyst::Log->meta;
-    $meta->make_mutable;
-    $meta->remove_method('_send_to_log');
-    $meta->add_method('_send_to_log', sub {});
-}
-
-sub build_test_app_with_setup {
-    my ($name, @flags) = @_;
-    my $flags = '(' . join(', ', map { "'".$_."'" } @flags) . ')';
-    $flags = '' if $flags eq '()';
-    eval qq{
-        package $name;
-        use Catalyst $flags;
-        $name->setup;
-    };
-    die $@ if $@;
-    return $name;
-}
-
-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('TestAppMyTestDebug', '-Debug');
-
-    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';
-    ok $log->is_error, 'Errors should be enabled';
-    ok $log->is_fatal, 'Fatal errors should be enabled';
-    ok $log->is_info, 'Info should be enabled';
-    ok $log->is_debug, 'Debugging should be enabled';
-    ok $app->debug, 'debug method should return true';
-}
-
-{
-    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';
-    isa_ok $log, 'Catalyst::Log', 'It should be a Catalyst::Log object';
-    ok $log->is_warn, 'Warnings should be enabled';
-    ok $log->is_error, 'Errors should be enabled';
-    ok $log->is_fatal, 'Fatal errors should be enabled';
-    ok !$log->is_info, 'Info should be disabled';
-    ok !$log->is_debug, 'Debugging should be disabled';
-    ok !$c->debug, 'Catalyst debugging is off';
-}
-{
-    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';
-    isa_ok $log, 'Catalyst::Log', 'It should be a Catalyst::Log object';
-    ok $log->is_warn, 'Warnings should be enabled';
-    ok $log->is_error, 'Errors should be enabled';
-    ok $log->is_fatal, 'Fatal errors should be enabled';
-    ok $log->is_info, 'Info should be enabled';
-    ok $log->is_debug, 'Debugging should be enabled';
-    ok !$c->debug, 'Catalyst debugging turned off';
-}
-my $log_meta = Class::MOP::Class->create_anon_class(
-    methods => { map { $_ => sub { 0 } } qw/debug error fatal info warn/ },
-);
-{
-    package TestAppWithOwnLogger;
-    use base qw/Catalyst/;
-    __PACKAGE__->log($log_meta->new_object);
-    __PACKAGE__->setup('-Debug');
-}
-
-ok my $c = TestAppWithOwnLogger->new, 'Get with own logger app object';
-ok $c->debug, '$c->debug is true';
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup_log.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup_log.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup_log.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,101 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 30;
-use Test::Exception;
-
-use Catalyst ();
-
-sub mock_app {
-    my $name = shift;
-    print "Setting up mock application: $name\n";
-    my $meta = Moose->init_meta( for_class => $name );
-    $meta->superclasses('Catalyst');
-    return $meta->name;
-}
-
-sub test_log_object {
-    my ($log, %expected) = @_;
-    foreach my $level (keys %expected) {
-        my $method_name = "is_$level";
-        if ($expected{$level}) {
-            ok( $log->$method_name(), "Level $level on" );
-        }
-        else {
-            ok( !$log->$method_name(), "Level $level off" );
-        }
-    }
-}
-
-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('TestAppParseLogLevels');
-    $app->setup_log('error,warn');
-    ok !$app->debug, 'Not in debug mode';
-    test_log_object($app->log,
-        fatal => 1,
-        error => 1,
-        warn => 1,
-        info => 0,
-        debug => 0,
-    );
-}
-{
-    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,
-        fatal => 1,
-        error => 1,
-        warn => 1,
-        info => 1,
-        debug => 1,
-    );
-}
-{
-    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,
-        fatal => 1,
-        error => 1,
-        warn => 1,
-        info => 0,
-        debug => 0,
-    );
-}
-{
-    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
-    test_log_object($app->log,
-        fatal => 1,
-        error => 1,
-        warn => 1,
-        info => 1,
-        debug => 1,
-    );
-}
-{
-    my $app = mock_app('TestAppLogDebugOnly');
-    $app->setup_log('debug');
-    ok $app->debug, 'In debug mode';
-    test_log_object($app->log,
-        fatal => 1,
-        error => 1,
-        warn => 1,
-        info => 1,
-        debug => 1,
-    );
-}

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup_stats.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup_stats.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_setup_stats.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,69 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 5;
-use Class::MOP::Class;
-
-use Catalyst ();
-
-my %log_messages; # TODO - Test log messages as expected.
-my $mock_log = Class::MOP::Class->create_anon_class(
-    methods => {
-        map { my $level = $_;
-            $level => sub {
-                $log_messages{$level} ||= [];
-                push(@{ $log_messages{$level} }, $_[1]);
-            },
-        }
-        qw/debug info warn error fatal/,
-    },
-)->new_object;
-
-sub mock_app {
-    my $name = shift;
-    %log_messages = (); # Flatten log messages.
-    my $meta = Moose->init_meta( for_class => $name );
-    $meta->superclasses('Catalyst');
-    $meta->add_method('log', sub { $mock_log }); 
-    return $meta->name;
-}
-
-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('TestAppNoStats');
-    $app->setup_stats();
-    ok !$app->use_stats, 'stats off by default';
-}
-{
-    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('TestAppStatsDebugTurnsStatsOn');
-    $app->meta->add_method('debug' => sub { 1 });
-    $app->setup_stats();
-    ok $app->use_stats, 'debug on turns stats on';
-}
-{
-    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 = %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)';
-}
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_uri_for.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_uri_for.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_uri_for.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,145 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 20;
-use URI;
-
-use_ok('Catalyst');
-
-my $request = Catalyst::Request->new( {
-                base => URI->new('http://127.0.0.1/foo')
-              } );
-
-my $context = Catalyst->new( {
-                request => $request,
-                namespace => 'yada',
-              } );
-
-is(
-    Catalyst::uri_for( $context, '/bar/baz' )->as_string,
-    'http://127.0.0.1/foo/bar/baz',
-    'URI for absolute path'
-);
-
-is(
-    Catalyst::uri_for( $context, 'bar/baz' )->as_string,
-    'http://127.0.0.1/foo/yada/bar/baz',
-    'URI for relative path'
-);
-
-is(
-    Catalyst::uri_for( $context, '', 'arg1', 'arg2' )->as_string,
-    'http://127.0.0.1/foo/yada/arg1/arg2',
-    'URI for undef action with args'
-);
-
-
-is( Catalyst::uri_for( $context, '../quux' )->as_string,
-    'http://127.0.0.1/foo/quux', 'URI for relative dot path' );
-
-is(
-    Catalyst::uri_for( $context, 'quux', { param1 => 'value1' } )->as_string,
-    'http://127.0.0.1/foo/yada/quux?param1=value1',
-    'URI for undef action with query params'
-);
-
-is (Catalyst::uri_for( $context, '/bar/wibble?' )->as_string,
-   'http://127.0.0.1/foo/bar/wibble%3F', 'Question Mark gets encoded'
-);
-   
-is( Catalyst::uri_for( $context, qw/bar wibble?/, 'with space' )->as_string,
-    'http://127.0.0.1/foo/yada/bar/wibble%3F/with%20space', 'Space gets encoded'
-);
-
-is(
-    Catalyst::uri_for( $context, '/bar', 'with+plus', { 'also' => 'with+plus' })->as_string,
-    'http://127.0.0.1/foo/bar/with+plus?also=with%2Bplus',
-    'Plus is not encoded'
-);
-
-# test with utf-8
-is(
-    Catalyst::uri_for( $context, 'quux', { param1 => "\x{2620}" } )->as_string,
-    'http://127.0.0.1/foo/yada/quux?param1=%E2%98%A0',
-    'URI for undef action with query params in unicode'
-);
-is(
-    Catalyst::uri_for( $context, 'quux', { 'param:1' => "foo" } )->as_string,
-    'http://127.0.0.1/foo/yada/quux?param%3A1=foo',
-    'URI for undef action with query params in unicode'
-);
-
-# test with object
-is(
-    Catalyst::uri_for( $context, 'quux', { param1 => $request->base } )->as_string,
-    'http://127.0.0.1/foo/yada/quux?param1=http%3A%2F%2F127.0.0.1%2Ffoo',
-    'URI for undef action with query param as object'
-);
-
-$request->base( URI->new('http://localhost:3000/') );
-$request->match( 'orderentry/contract' );
-is(
-    Catalyst::uri_for( $context, '/Orderentry/saveContract' )->as_string,
-    'http://localhost:3000/Orderentry/saveContract',
-    'URI for absolute path'
-);
-
-{
-    $request->base( URI->new('http://127.0.0.1/') );
-
-    $context->namespace('');
-
-    is( Catalyst::uri_for( $context, '/bar/baz' )->as_string,
-        'http://127.0.0.1/bar/baz', 'URI with no base or match' );
-
-    # test "0" as the path
-    is( Catalyst::uri_for( $context, qw/0 foo/ )->as_string,
-        'http://127.0.0.1/0/foo', '0 as path is ok'
-    );
-
-}
-
-# test with undef -- no warnings should be thrown
-{
-    my $warnings = 0;
-    local $SIG{__WARN__} = sub { $warnings++ };
-
-    Catalyst::uri_for( $context, '/bar/baz', { foo => undef } )->as_string,
-    is( $warnings, 0, "no warnings emitted" );
-}
-
-# Test with parameters '/', 'foo', 'bar' - should not generate a //
-is( Catalyst::uri_for( $context, qw| / foo bar | )->as_string,
-    'http://127.0.0.1/foo/bar', 'uri is /foo/bar, not //foo/bar'
-);
-
-TODO: {
-    local $TODO = 'RFCs are for people who, erm - fix this test..';
-    # Test rfc3986 reserved characters.  These characters should all be escaped
-    # according to the RFC, but it is a very big feature change so I've removed it
-    no warnings; # Yes, everything in qw is sane
-    is(
-        Catalyst::uri_for( $context, qw|! * ' ( ) ; : @ & = $ / ? % # [ ] ,|, )->as_string,
-        'http://127.0.0.1/%21/%2A/%27/%2B/%29/%3B/%3A/%40/%26/%3D/%24/%2C/%2F/%3F/%25/%23/%5B/%5D',
-        'rfc 3986 reserved characters'
-    );
-
-    # jshirley bug - why the hell does only one of these get encoded
-    #                has been like this forever however.
-    is(
-        Catalyst::uri_for( $context, qw|{1} {2}| )->as_string,
-        'http://127.0.0.1/{1}/{2}',
-        'not-escaping unreserved characters'
-    );
-}
-
-# make sure caller's query parameter hash isn't messed up
-{
-    my $query_params_base = {test => "one two",
-                             bar  => ["foo baz", "bar"]};
-    my $query_params_test = {test => "one two",
-                             bar  => ["foo baz", "bar"]};
-    Catalyst::uri_for($context, '/bar/baz', $query_params_test);
-    is_deeply($query_params_base, $query_params_test,
-              "uri_for() doesn't mess up query parameter hash in the caller");
-}

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_uri_with.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_uri_with.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_core_uri_with.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,69 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 10;
-use URI;
-
-use_ok('Catalyst::Request');
-
-my $request = Catalyst::Request->new( {
-                uri => URI->new('http://127.0.0.1/foo/bar/baz')
-              } );
-
-is(
-    $request->uri_with({}),
-    'http://127.0.0.1/foo/bar/baz',
-    'URI for absolute path'
-);
-
-is(
-    $request->uri_with({ foo => 'bar' }),
-    'http://127.0.0.1/foo/bar/baz?foo=bar',
-    'URI adds param'
-);
-
-my $request2 = Catalyst::Request->new( {
-                uri => URI->new('http://127.0.0.1/foo/bar/baz?bar=gorch')
-              } );
-is(
-    $request2->uri_with({}),
-    'http://127.0.0.1/foo/bar/baz?bar=gorch',
-    'URI retains param'
-);
-
-is(
-    $request2->uri_with({ me => 'awesome' }),
-    'http://127.0.0.1/foo/bar/baz?bar=gorch&me=awesome',
-    'URI retains param and adds new'
-);
-
-is(
-    $request2->uri_with({ bar => undef }),
-    'http://127.0.0.1/foo/bar/baz',
-    'URI loses param when explicitly undef'
-);
-
-is(
-    $request2->uri_with({ bar => 'snort' }),
-    'http://127.0.0.1/foo/bar/baz?bar=snort',
-    'URI changes param'
-);
-
-is(
-    $request2->uri_with({ bar => [ 'snort', 'ewok' ] }),
-    'http://127.0.0.1/foo/bar/baz?bar=snort&bar=ewok',
-    'overwrite mode URI appends arrayref param'
-);
-
-is(
-    $request2->uri_with({ bar => 'snort' }, { mode => 'append' }),
-    'http://127.0.0.1/foo/bar/baz?bar=gorch&bar=snort',
-    'append mode URI appends param'
-);
-
-is(
-    $request2->uri_with({ bar => [ 'snort', 'ewok' ] }, { mode => 'append' }),
-    'http://127.0.0.1/foo/bar/baz?bar=gorch&bar=snort&bar=ewok',
-    'append mode URI appends arrayref param'
-);
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_dispatcher_requestargs_restore.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_dispatcher_requestargs_restore.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_dispatcher_requestargs_restore.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,21 +0,0 @@
-# Insane test case for the behavior needed by Plugin::Auhorization::ACL
-
-# We have to localise $c->request->{arguments} in 
-# Catalyst::Dispatcher::_do_forward, rather than using save and restore,
-# as otherwise, the calling $c->detach on an action which says
-# die $Catalyst:DETACH causes the request arguments to not get restored,
-# and therefore sub gorch gets the wrong string $frozjob parameter.
-
-# Please feel free to break this behavior once a sane hook for safely
-# 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.
-
-use strict;
-use warnings;
-use FindBin qw/$Bin/;
-use lib "$Bin/lib";
-use Catalyst::Test 'ACLTestApp';
-use Test::More tests => 1;
-
-request('http://localhost/gorch/wozzle');

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_load_catalyst_test.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_load_catalyst_test.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_load_catalyst_test.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,157 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use FindBin;
-use lib         "$FindBin::Bin/lib";
-use Test::More  tests => 61;
-use FindBin qw/$Bin/;
-use lib "$Bin/lib";
-use Catalyst::Utils;
-use HTTP::Request::Common;
-use Test::Exception;
-
-my $Class   = 'Catalyst::Test';
-my $App     = 'TestApp';
-my $Pkg     = __PACKAGE__;
-my $Url     = 'http://localhost/';
-my $Content = "root index";
-
-my %Meth    = (
-    $Pkg    => [qw|get request ctx_request|],          # exported
-    $Class  => [qw|local_request remote_request|],  # not exported
-);
-
-### make sure we're not trying to connect to a remote host -- these are local tests
-local $ENV{CATALYST_SERVER};
-
-use_ok( $Class );
-
-### check available methods
-{   ### turn of redefine warnings, we'll get new subs exported
-    ### XXX 'no warnings' and 'local $^W' wont work as warnings are turned on in
-    ### test.pm, so trap them for now --kane
-    {   local $SIG{__WARN__} = sub {};
-        ok( $Class->import,     "Argumentless import for methods only" );
-    }
-
-    while( my($class, $meths) = each %Meth ) {
-        for my $meth ( @$meths ) { SKIP: {
-
-            ### method available?
-            can_ok( $class,     $meth );
-
-            ### only for exported methods
-            skip "Error tests only for exported methods", 2 unless $class eq $Pkg;
-
-            ### check error conditions
-            eval { $class->can($meth)->( $Url ) };
-            ok( $@,             "   $meth without app gives error" );
-            like( $@, qr/$Class/,
-                                "       Error filled with expected content for '$meth'" );
-        } }
-    }
-}
-
-### simple tests for exported methods
-{   ### turn of redefine warnings, we'll get new subs exported
-    ### XXX 'no warnings' and 'local $^W' wont work as warnings are turned on in
-    ### test.pm, so trap them for now --kane
-    {   local $SIG{__WARN__} = sub {};
-        ok( $Class->import( $App ),
-                                "Loading $Class for App $App" );
-    }
-
-    ### test exported methods again
-    for my $meth ( @{ $Meth{$Pkg} } ) { SKIP: {
-
-        ### do a call, we should get a result and perhaps a $c if it's 'ctx_request';
-        my ($res, $c) = eval { $Pkg->can($meth)->( $Url ) };
-
-        ok( 1,                  "   Called $Pkg->$meth( $Url )" );
-        ok( !$@,                "       No critical error $@" );
-        ok( $res,               "       Result obtained" );
-
-        ### get the content as a string, to make sure we got what we expected
-        my $res_as_string = $meth eq 'get' ? $res : $res->content;
-        is( $res_as_string, $Content,
-                                "           Content as expected: $res_as_string" );
-
-        ### some tests for 'ctx_request'
-        skip "Context tests skipped for '$meth'", 6 unless $meth eq 'ctx_request';
-
-        ok( $c,                 "           Context object returned" );
-        isa_ok( $c, $App,       "               Object" );
-        is( $c->request->uri, $Url,
-                                "               Url recorded in request" );
-        is( $c->response->body, $Content,
-                                "               Content recorded in response" );
-        ok( $c->stash,          "               Stash accessible" );
-        ok( $c->action,         "               Action object accessible" );
-        ok( $res->request,      "               Response has request object" );
-        lives_and { is( $res->request->uri, $Url) }
-                                "               Request object has correct url";
-    } }
-}
-
-### perl5.8.8 + cat 5.80's Cat::Test->ctx_request didn't return $c the 2nd
-### time it was invoked. Without tracking the bug down all the way, it was
-### clearly related to the Moose'ification of Cat::Test and a scoping issue
-### with a 'my'd variable. Since the same code works fine in 5.10, a bug in
-### either Moose or perl 5.8 is suspected.
-{   ok( 1,                      "Testing consistency of ctx_request()" );
-    for( 1..2 ) {
-        my($res, $c) = ctx_request( $Url );
-        ok( $c,                 "   Call $_: Context object returned" );
-    }
-}
-
-# FIXME - These vhosts in tests tests should be somewhere else...
-
-sub customize { Catalyst::Test::_customize_request(@_) }
-
-{
-    my $req = Catalyst::Utils::request('/dummy');
-    customize( $req );
-    is( $req->header('Host'), undef, 'normal request is unmodified' );
-}
-
-{
-    my $req = Catalyst::Utils::request('/dummy');
-    customize( $req, { host => 'customized.com' } );
-    like( $req->header('Host'), qr/customized.com/, 'request is customizable via opts hash' );
-}
-
-{
-    my $req = Catalyst::Utils::request('/dummy');
-    local $Catalyst::Test::default_host = 'localized.com';
-    customize( $req );
-    like( $req->header('Host'), qr/localized.com/, 'request is customizable via package var' );
-}
-
-{
-    my $req = Catalyst::Utils::request('/dummy');
-    local $Catalyst::Test::default_host = 'localized.com';
-    customize( $req, { host => 'customized.com' } );
-    like( $req->header('Host'), qr/customized.com/, 'opts hash takes precedence over package var' );
-}
-
-{
-    my $req = Catalyst::Utils::request('/dummy');
-    local $Catalyst::Test::default_host = 'localized.com';
-    customize( $req, { host => '' } );
-    is( $req->header('Host'), undef, 'default value can be temporarily cleared via opts hash' );
-}
-
-# Back compat test, extra args used to be ignored, now a hashref of options.
-use_ok('Catalyst::Test', 'TestApp', 'foobar');
-
-# Back compat test, ensure that request ignores anything which isn't a hash.
-lives_ok {
-    request(GET('/dummy'), 'foo');
-} 'scalar additional param to request method ignored';
-lives_ok {
-    request(GET('/dummy'), []);
-} 'array additional param to request method ignored';
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_extend_non_moose_controller.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_extend_non_moose_controller.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_extend_non_moose_controller.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,20 +0,0 @@
-use Catalyst ();
-
-{
-    package TestApp;
-    use base qw/Catalyst/;
-}
-{
-    package TestApp::Controller::Base;
-    use base qw/Catalyst::Controller/;
-}
-{
-    package TestApp::Controller::Other;
-    use Moose;
-    use Test::More tests => 1;
-    use Test::Exception;
-    lives_ok {
-        extends 'TestApp::Controller::Base';
-    };
-}
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_non_moose.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_non_moose.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_non_moose.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,7 +0,0 @@
-#!/usr/bin/env perl
-use strict;
-use warnings;
-use lib 't/lib';
-use Test::More tests => 1;
-use_ok('TestAppMetaCompat');
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_non_moose_controller.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_non_moose_controller.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_metaclass_compat_non_moose_controller.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,19 +0,0 @@
-use strict;
-use warnings;
-
-use FindBin;
-use lib "$FindBin::Bin/lib";
-
-use Test::More tests => 1;
-use Test::Exception;
-use TestAppNonMooseController;
-
-# Metaclass init order causes fail.
-# There are TODO tests in Moose for this, see
-# f2391d17574eff81d911b97be15ea51080500003
-# after which the evil kludge in core can die in a fire.
-
-lives_ok {
-    TestAppNonMooseController::ControllerBase->get_action_methods
-} 'Base class->get_action_methods ok when sub class initialized first';
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_response.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_response.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_response.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,18 +0,0 @@
-use strict;
-use warnings;
-use Test::More tests => 6;
-
-use_ok('Catalyst::Response');
-
-my $res = Catalyst::Response->new;
-
-# test aliasing of res->code for res->status
-$res->code(500);
-is($res->code, 500, 'code sets itself');
-is($res->status, 500, 'code sets status');
-$res->status(501);
-is($res->code, 501, 'status sets code');
-is($res->body, '', "default response body ''");
-$res->body(undef);
-is($res->body, '', "response body '' after assigned undef");
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_env_value.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_env_value.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_env_value.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,44 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 5;
-
-BEGIN { use_ok("Catalyst::Utils") }
-
-##############################################################################
-### No env vars defined
-##############################################################################
-{
-    ok( !Catalyst::Utils::env_value( 'MyApp', 'Key' ),
-        'No env values defined returns false'
-    );
-}
-
-##############################################################################
-### App env var defined
-##############################################################################
-{
-    $ENV{'MYAPP2_KEY'} = 'Env value 2';
-    is( Catalyst::Utils::env_value( 'MyApp2', 'Key' ),
-        'Env value 2', 'Got the right value from the application var' );
-}
-
-##############################################################################
-### Catalyst env var defined
-##############################################################################
-{
-    $ENV{'CATALYST_KEY'} = 'Env value 3';
-    is( Catalyst::Utils::env_value( 'MyApp3', 'Key' ),
-        'Env value 3', 'Got the right value from the catalyst var' );
-}
-
-##############################################################################
-### Catalyst and Application env vars defined
-##############################################################################
-{
-    $ENV{'CATALYST_KEY'} = 'Env value bad';
-    $ENV{'MYAPP4_KEY'}   = 'Env value 4';
-    is( Catalyst::Utils::env_value( 'MyApp4', 'Key' ),
-        'Env value 4', 'Got the right value from the application var' );
-}
-

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_prefix.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_prefix.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_prefix.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,26 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Test::More tests => 9;
-
-use lib "t/lib";
-
-BEGIN { use_ok("Catalyst::Utils") };
-
-is( Catalyst::Utils::class2prefix('MyApp::V::Foo::Bar'), 'foo/bar', 'class2prefix works with M/V/C' );
-
-is( Catalyst::Utils::class2prefix('MyApp::Controller::Foo::Bar'), 'foo/bar', 'class2prefix works with Model/View/Controller' );
-
-is( Catalyst::Utils::class2prefix('MyApp::Controller::Foo::View::Bar'), 'foo/view/bar', 'class2prefix works with tricky components' );
-
-is( Catalyst::Utils::appprefix('MyApp::Foo'), 'myapp_foo', 'appprefix works' );
-
-is( Catalyst::Utils::class2appclass('MyApp::Foo::Controller::Bar::View::Baz'), 'MyApp::Foo', 'class2appclass works' );
-
-is( Catalyst::Utils::class2classprefix('MyApp::Foo::Controller::Bar::View::Baz'), 'MyApp::Foo::Controller', 'class2classprefix works' );
-
-is( Catalyst::Utils::class2classsuffix('MyApp::Foo::Controller::Bar::View::Baz'), 'Controller::Bar::View::Baz', 'class2classsuffix works' );
-
-is( Catalyst::Utils::class2env('MyApp::Foo'), 'MYAPP_FOO', 'class2env works' );

Deleted: Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_request.t
===================================================================
--- Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_request.t	2010-03-31 14:40:32 UTC (rev 13114)
+++ Catalyst-Runtime/5.80/branches/refactoring_dispatcher/t/unit_utils_request.t	2010-03-31 18:20:10 UTC (rev 13115)
@@ -1,27 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 5;
-
-use_ok('Catalyst::Utils');
-
-{
-    my $url = "/dump";
-    ok(
-        my $request = Catalyst::Utils::request($url),
-        "Request: simple get without protocol nor host"
-    );
-    like( $request->uri, qr|^http://localhost/|,
-        " has default protocol and host" );
-}
-
-{
-    my $url = "/dump?url=http://www.somewhere.com/";
-    ok(
-        my $request = Catalyst::Utils::request($url),
-        "Same with param containing a url"
-    );
-    like( $request->uri, qr|^http://localhost/|,
-        " has default protocol and host" );
-}
-




More information about the Catalyst-commits mailing list