Merge 'trunk' into 'better_scripts'
Tomas Doran [Sat, 5 Sep 2009 15:21:21 +0000 (15:21 +0000)]
r10660@tomas-dorans-macbook-pro (orig r10659):  caelum | 2009-06-25 10:37:35 +0100
 r5555@hlagh (orig r10585):  caelum | 2009-06-18 12:42:15 -0700
 new branch
 r5556@hlagh (orig r10586):  caelum | 2009-06-18 14:38:40 -0700
 made a failing test
 r5585@hlagh (orig r10600):  caelum | 2009-06-19 16:47:02 -0700
 prevent actions named index from registering as an index dispatchtype if they can be registered with another dispatchtype
 r5586@hlagh (orig r10601):  caelum | 2009-06-19 17:19:18 -0700
 minor change
 r5587@hlagh (orig r10602):  caelum | 2009-06-19 22:11:53 -0700
 nicer action sorting for Path
 r5595@hlagh (orig r10604):  caelum | 2009-06-20 10:18:53 -0700
 minor changes
 r5599@hlagh (orig r10608):  caelum | 2009-06-20 17:26:22 -0700
 fix root default thingie jayk gave me, sanitize Paths at registration time better
 r5601@hlagh (orig r10610):  caelum | 2009-06-20 18:06:01 -0700
 forgot to add a file
 r5616@hlagh (orig r10611):  caelum | 2009-06-21 19:17:29 -0700
 missing / in test file
 r5676@hlagh (orig r10645):  caelum | 2009-06-24 17:41:38 -0700
 add C::DispatchType::_is_low_precedence

r10662@tomas-dorans-macbook-pro (orig r10661):  caelum | 2009-06-25 10:49:35 +0100
 r5367@hlagh (orig r10459):  t0m | 2009-06-06 05:56:50 -0700
 Branch for mo namespace handling refactor

 r5368@hlagh (orig r10460):  mo | 2009-06-06 06:33:53 -0700
 refactor of namespace handling
 r5369@hlagh (orig r10461):  mo | 2009-06-06 06:34:42 -0700
 TODO fix
 r5371@hlagh (orig r10466):  mo | 2009-06-07 04:14:23 -0700
 controller actions without attributes which are defined via config
 r5372@hlagh (orig r10467):  mo | 2009-06-07 04:49:58 -0700
 removed commented code
 r5373@hlagh (orig r10468):  mo | 2009-06-07 05:28:53 -0700
 Added support for ~ prefix to plugins and action classes
 r5374@hlagh (orig r10469):  mo | 2009-06-07 05:36:55 -0700
 Changes patches
 r5686@hlagh (orig r10655):  caelum | 2009-06-24 19:22:27 -0700
 cleanup TODO

r10669@tomas-dorans-macbook-pro (orig r10668):  rafl | 2009-06-26 16:26:42 +0100
Properly clean namespaces in Catalyst::Exception*.
r10670@tomas-dorans-macbook-pro (orig r10669):  rafl | 2009-06-26 16:26:56 +0100
Add a message attribute to Exception::Base.
r10671@tomas-dorans-macbook-pro (orig r10670):  rafl | 2009-06-26 16:27:05 +0100
Make exception stringify as their message.
r10672@tomas-dorans-macbook-pro (orig r10671):  rafl | 2009-06-26 16:27:19 +0100
Make Catalyst::Exception throw exception instances instead of plain strings.
r10673@tomas-dorans-macbook-pro (orig r10672):  rafl | 2009-06-26 16:27:30 +0100
Enable overloading fallback for Catalyst::Exception.
r10674@tomas-dorans-macbook-pro (orig r10673):  rafl | 2009-06-26 16:27:42 +0100
Add exception classes for the redispatching exceptions.
r10675@tomas-dorans-macbook-pro (orig r10674):  rafl | 2009-06-26 16:27:55 +0100
Throw redispatch exception objects instead of plain strings for detach and go.
r10676@tomas-dorans-macbook-pro (orig r10675):  rafl | 2009-06-26 16:28:06 +0100
Detect redispatch exceptions by a class check, not by checking the exception message.
r10677@tomas-dorans-macbook-pro (orig r10676):  rafl | 2009-06-26 16:28:14 +0100
Add a rethrow method to Exception.
r10678@tomas-dorans-macbook-pro (orig r10677):  rafl | 2009-06-26 16:28:24 +0100
Make Exception initialisation saner.
r10679@tomas-dorans-macbook-pro (orig r10678):  rafl | 2009-06-26 16:28:41 +0100
Use methods to throw exceptions, instead of passing globals to die.
r10680@tomas-dorans-macbook-pro (orig r10679):  rafl | 2009-06-26 18:11:08 +0100
Add Catalyst::Component::ContextClosure.
r10681@tomas-dorans-macbook-pro (orig r10680):  rafl | 2009-06-26 18:34:25 +0100
Add docs for ContextClosure.
r10682@tomas-dorans-macbook-pro (orig r10681):  rafl | 2009-06-26 20:45:30 +0100
Add test for ContextClosure.
r10683@tomas-dorans-macbook-pro (orig r10682):  rafl | 2009-06-26 20:45:45 +0100
Fix annoying warnings in Utils::resolve_namespace.

Also get rid of some other nits introduced with resolve_namespace.
r10685@tomas-dorans-macbook-pro (orig r10684):  rafl | 2009-06-26 20:50:14 +0100
stub pod for Exception::Go and ::Detach.
r10686@tomas-dorans-macbook-pro (orig r10685):  rafl | 2009-06-26 21:15:35 +0100
Changelogging.
r10687@tomas-dorans-macbook-pro (orig r10686):  rafl | 2009-06-26 21:31:50 +0100
Moar changelogging.
r10691@tomas-dorans-macbook-pro (orig r10690):  rafl | 2009-06-27 14:26:01 +0100
Bump deps for test aggregation.
r10692@tomas-dorans-macbook-pro (orig r10691):  rafl | 2009-06-27 14:26:20 +0100
Apply method modifier to capture $ctx for ctx_request to the tested app, not Catalyst itself.

Also get rid of some trailing whitespace added with ctx_request.
r10693@tomas-dorans-macbook-pro (orig r10692):  rafl | 2009-06-27 14:56:36 +0100
Don't screw the prove -l user too hard.
r10700@tomas-dorans-macbook-pro (orig r10699):  rafl | 2009-06-28 15:58:16 +0100
Pass $c along to path_prefix in _parse_PathPrefix_attr.

This prevents things from blowing up if the controller instance doesn't know
about its action namespace already, when the attribute value is being parsed.

Closes RT#42816. Courtesy of Jason Kohles.
r10701@tomas-dorans-macbook-pro (orig r10700):  t0m | 2009-06-28 17:12:31 +0100
Add a TODO test for matching url encoded paths from RT#34525
r10702@tomas-dorans-macbook-pro (orig r10701):  t0m | 2009-06-28 17:45:21 +0100
Make Test::Aggregate not puke due to weird character at the start of the file
r10703@tomas-dorans-macbook-pro (orig r10702):  t0m | 2009-06-28 17:54:40 +0100
And unfuck test by calling ->handle_request correctly. Only showed up under Test::Aggregate, weird
r10704@tomas-dorans-macbook-pro (orig r10703):  t0m | 2009-06-28 17:58:01 +0100
Twinking. That around modifier offended me, as I wrote the code to inline accessors like that..
r10721@tomas-dorans-macbook-pro (orig r10720):  t0m | 2009-06-29 00:45:59 +0100
Fix bug from RT#46459, misc cleanups in Catalyst::Test
r10726@tomas-dorans-macbook-pro (orig r10725):  caelum | 2009-06-29 17:49:44 +0100
remove Action::sort_order
r10727@tomas-dorans-macbook-pro (orig r10726):  caelum | 2009-06-29 17:54:55 +0100
remove cmp overload in Action
r10729@tomas-dorans-macbook-pro (orig r10728):  caelum | 2009-06-29 18:06:21 +0100
add note about overloaded <=>
r10730@tomas-dorans-macbook-pro (orig r10729):  t0m | 2009-06-29 20:57:17 +0100
Comment the magic so that someone doesn't just remove it again.

r10731@tomas-dorans-macbook-pro (orig r10730):  rafl | 2009-06-29 23:05:02 +0100
Remove <=> overloading for actions.
r10732@tomas-dorans-macbook-pro (orig r10731):  rafl | 2009-06-29 23:05:12 +0100
Remove useless asignment.
r10733@tomas-dorans-macbook-pro (orig r10732):  rafl | 2009-06-29 23:05:25 +0100
Actually use make_context_closure correctly in the tests.
r10734@tomas-dorans-macbook-pro (orig r10733):  rafl | 2009-06-29 23:05:36 +0100
Disable ContextClosure tests with LeakCheckers that aren't based on Devel::Cycle.

It's not on cpan yet, but will be as soon as a new Devel::Cycle is released.
r10735@tomas-dorans-macbook-pro (orig r10734):  rafl | 2009-06-29 23:05:48 +0100
Version 0.80006.
r10737@tomas-dorans-macbook-pro (orig r10736):  t0m | 2009-06-30 00:17:47 +0100
Don't mangle query parameters passed to uri_for, the list
r10740@tomas-dorans-macbook-pro (orig r10739):  edenc | 2009-06-30 16:13:45 +0100
added test case + patch for inherited action configuration
r10741@tomas-dorans-macbook-pro (orig r10740):  edenc | 2009-06-30 16:21:22 +0100
updated Changes
r10742@tomas-dorans-macbook-pro (orig r10741):  gphat | 2009-06-30 16:24:37 +0100
Add new uri_with mode for appending.

r10743@tomas-dorans-macbook-pro (orig r10742):  gphat | 2009-06-30 16:25:45 +0100
Claim my work, in case it breaks. ;)

r10744@tomas-dorans-macbook-pro (orig r10743):  t0m | 2009-06-30 18:28:18 +0100
Mangle changelog to remove names. Note mangling goes back to 5.32, but tough - I'm not doing it manually
r10747@tomas-dorans-macbook-pro (orig r10746):  t0m | 2009-06-30 21:35:40 +0100
Core fix for warnings due to undef body as per fix in FillInForm in r10745
r10756@tomas-dorans-macbook-pro (orig r10755):  rafl | 2009-06-30 22:26:15 +0100
Pretend that Catalyst.pm does Component::ApplicationAttribute.
r10757@tomas-dorans-macbook-pro (orig r10756):  rafl | 2009-06-30 22:30:38 +0100
Changelogging.
r10758@tomas-dorans-macbook-pro (orig r10757):  t0m | 2009-06-30 22:42:11 +0100
Test case for a way to make C3 crap itself by partially using Moose + fix.
r10759@tomas-dorans-macbook-pro (orig r10758):  t0m | 2009-06-30 22:57:12 +0100
Add missed bug fixes to changelog
r10760@tomas-dorans-macbook-pro (orig r10759):  rafl | 2009-06-30 23:09:48 +0100
Version 5.80007.
r10781@tomas-dorans-macbook-pro (orig r10780):  rafl | 2009-07-04 00:31:33 +0100
Merge branch 'author_requires'

* author_requires:
  Port to Module::Install::AuthorRequires.
  Create branch author_requires
r10782@tomas-dorans-macbook-pro (orig r10781):  rafl | 2009-07-04 00:31:45 +0100
Merge branch 'check_conflicts'

* check_conflicts:
  Port to Module::Install::CheckConflicts.
  Create branch check_conflicts

Conflicts:
Makefile.PL
r10783@tomas-dorans-macbook-pro (orig r10782):  rafl | 2009-07-04 00:31:59 +0100
Stop writing META.yml twice.
r10784@tomas-dorans-macbook-pro (orig r10783):  rafl | 2009-07-04 00:34:21 +0100
Only call author_requires once, so all missing author deps are reported at once.
r10785@tomas-dorans-macbook-pro (orig r10784):  rafl | 2009-07-04 00:52:44 +0100
Unfuck indenting.
r10802@tomas-dorans-macbook-pro (orig r10801):  t0m | 2009-07-05 23:51:39 +0100
Fix warning, and only warn if really needed
r10824@tomas-dorans-macbook-pro (orig r10823):  autarch | 2009-07-07 21:58:31 +0100
Deleted the old Restarter and associated code.

Also removed the dep on File::Modified
r10831@tomas-dorans-macbook-pro (orig r10830):  t0m | 2009-07-08 21:11:57 +0100
U R DOIN IT WRONG.
r10836@tomas-dorans-macbook-pro (orig r10835):  t0m | 2009-07-08 23:12:29 +0100
More ->config fixes + Changelog
r10852@tomas-dorans-macbook-pro (orig r10851):  t0m | 2009-07-11 13:51:07 +0100
Less lies in the deprecated block comment in Dispatcher.pm as it's throwing people off
r10862@tomas-dorans-macbook-pro (orig r10861):  groditi | 2009-07-11 23:07:47 +0100
private_path method for actions that returns a string suitable for use in forward and unit tests for the rest of catalyst::Action
r10865@tomas-dorans-macbook-pro (orig r10864):  t0m | 2009-07-12 01:56:51 +0100
Fix test
r10866@tomas-dorans-macbook-pro (orig r10865):  t0m | 2009-07-12 01:57:19 +0100
Refactor to remove warning
r10885@tomas-dorans-macbook-pro (orig r10884):  t0m | 2009-07-14 21:25:03 +0100
Fix Makefile.PL to actually do the right thing on Lepoard (alledgedly), and encourage someone to contribute to maintaining our protection against Apple :)
r10892@tomas-dorans-macbook-pro (orig r10891):  dandv | 2009-07-16 02:12:59 +0100
Fixed POD links to get and request
r10893@tomas-dorans-macbook-pro (orig r10892):  dandv | 2009-07-16 06:24:10 +0100
Could not have made a more insignificant patch
r10898@tomas-dorans-macbook-pro (orig r10897):  t0m | 2009-07-16 22:05:25 +0100
Special move for CX::Component::Traits. No tests, please don't look.
r10899@tomas-dorans-macbook-pro (orig r10898):  t0m | 2009-07-16 22:12:49 +0100
Remove 10897, this hack kinda works, but then leads to more issues. Gonna branch
r10900@tomas-dorans-macbook-pro (orig r10899):  t0m | 2009-07-16 22:24:11 +0100
Write that down
r10915@tomas-dorans-macbook-pro (orig r10914):  dandv | 2009-07-17 06:18:22 +0100
Hyperlinked POD entry for Catalysy::Request->args
r10941@tomas-dorans-macbook-pro (orig r10940):  jester | 2009-07-22 13:46:29 +0100
Changed link from C::Base to C::Controller; fixed my alias
r10962@tomas-dorans-macbook-pro (orig r10961):  hobbs | 2009-07-23 05:46:43 +0100
Depend on Module::Pluggable 3.9 to resolve a bug with inner packages in tests.

r10963@tomas-dorans-macbook-pro (orig r10962):  hobbs | 2009-07-23 10:32:08 +0100
Test and Changelog entry for r10961.

r10981@tomas-dorans-macbook-pro (orig r10980):  t0m | 2009-07-25 22:05:19 +0100
Remove dead and unused method
r10985@tomas-dorans-macbook-pro (orig r10984):  autarch | 2009-07-26 03:14:23 +0100
fix spelling of attributes in the test name
r10986@tomas-dorans-macbook-pro (orig r10985):  dandv | 2009-07-26 08:13:19 +0100
Fixed a bunch of POD hyperlinks in Catalyst.pm and minor punctuation in Catalyst::Action
r10994@tomas-dorans-macbook-pro (orig r10993):  kmx | 2009-07-28 16:26:44 +0100
C::Engine::FastCGI (_fix_env) - Microsoft IIS on Windows 2008 R2 has version string "IIS/7.5" that was not supported; this patch makes test condition more general, accepting versions from IIS/6.0 to IIS/9.9 (should be enough for a while)
r10995@tomas-dorans-macbook-pro (orig r10994):  hobbs | 2009-07-29 01:33:25 +0100
Rewrite the POD for $c->uri_for().

Reintroduce some bits of information that were lost in 5.7->5.8, and remove
a misleading statement about $c->action. Recommend the use of uri_for_action
with a private action path.

r10996@tomas-dorans-macbook-pro (orig r10995):  hobbs | 2009-07-29 01:59:19 +0100
Update Changes and add me to Contributors
r10997@tomas-dorans-macbook-pro (orig r10996):  hobbs | 2009-07-29 02:06:09 +0100
Add konobi to contributors
r10998@tomas-dorans-macbook-pro (orig r10997):  hobbs | 2009-07-29 02:35:11 +0100
Changes entry for r10993
r11009@tomas-dorans-macbook-pro (orig r11008):  t0m | 2009-07-30 15:31:26 +0100
Add to TODO so I don't have to grep backlog later when I have tuits
r11013@tomas-dorans-macbook-pro (orig r11012):  t0m | 2009-07-31 02:46:00 +0100
Large TODO update
r11019@tomas-dorans-macbook-pro (orig r11018):  t0m | 2009-08-01 01:39:39 +0100
Merge branch pass_component_names:

svn merge -r  10899:10927  http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.80/branches/pass_component_names
r11021@tomas-dorans-macbook-pro (orig r11020):  t0m | 2009-08-01 03:00:23 +0100
Aww, crap, fail. merge 10927:HEAD from pass_component_names
r11024@tomas-dorans-macbook-pro (orig r11023):  caelum | 2009-08-01 20:04:08 +0100
allow uri_for($controller_instance)
r11035@tomas-dorans-macbook-pro (orig r11034):  t0m | 2009-08-05 20:39:01 +0100
Require perl 5.8.6
r11038@tomas-dorans-macbook-pro (orig r11037):  hobbs | 2009-08-06 10:57:02 +0100
Add a method to the stats object to get the request start time.

r11048@tomas-dorans-macbook-pro (orig r11047):  t0m | 2009-08-07 01:15:04 +0100
Fix the perl version required there also
r11049@tomas-dorans-macbook-pro (orig r11048):  t0m | 2009-08-07 01:24:17 +0100
Blow up if we're in author mode and don't have the right M::I extensions
r11050@tomas-dorans-macbook-pro (orig r11049):  t0m | 2009-08-07 01:57:21 +0100
Bump MX::MA dep for anon class tests
r11058@tomas-dorans-macbook-pro (orig r11057):  gbjk | 2009-08-07 17:45:03 +0100
DispatchType::Chained fix for default args attribute to handle Args(0) vs Args() at depth.

r11059@tomas-dorans-macbook-pro (orig r11058):  gbjk | 2009-08-07 18:17:15 +0100
DispatchType::Chained fix failing test of Args(0) vs Args(0) on surface

r11062@tomas-dorans-macbook-pro (orig r11061):  gbjk | 2009-08-07 22:17:22 +0100
Engine::HTTP - Fix paths for HTTP requests with scheme and domain in URI.

r11064@tomas-dorans-macbook-pro (orig r11063):  groditi | 2009-08-08 22:54:04 +0100
make debug output prettier with large widths
r11065@tomas-dorans-macbook-pro (orig r11064):  groditi | 2009-08-08 22:54:46 +0100
oops debug output got leaked in
r11069@tomas-dorans-macbook-pro (orig r11068):  t0m | 2009-08-09 13:36:20 +0100
Fix RT#48555
r11070@tomas-dorans-macbook-pro (orig r11069):  t0m | 2009-08-09 13:36:55 +0100
Updates changelog
r11071@tomas-dorans-macbook-pro (orig r11070):  t0m | 2009-08-09 15:22:21 +0100
Rewrite fixes for RT#48555
r11123@tomas-dorans-macbook-pro (orig r11122):  t0m | 2009-08-11 22:49:37 +0100
Unfuck Catalyst::View::JSON
r11125@tomas-dorans-macbook-pro (orig r11124):  t0m | 2009-08-11 23:32:47 +0100
Apply patch from RT#48623 to fix headers in Engine::HTTP
r11127@tomas-dorans-macbook-pro (orig r11126):  rjbs | 2009-08-12 00:33:18 +0100
svn merge -r 11123:11125 branches/locate_components/ trunk/
r11128@tomas-dorans-macbook-pro (orig r11127):  rjbs | 2009-08-12 00:34:12 +0100
add changelog entry for merged locate_components branch
r11130@tomas-dorans-macbook-pro (orig r11129):  t0m | 2009-08-12 01:15:51 +0100
Tiny change to make the error make more sense
r11132@tomas-dorans-macbook-pro (orig r11131):  t0m | 2009-08-12 02:09:09 +0100
Split test out into a more proper app, so that the test no longer relies on the metaclass initialization hacking occurring in ->setup_component, as I want to move it
r11133@tomas-dorans-macbook-pro (orig r11132):  t0m | 2009-08-12 02:11:07 +0100
Blow up rather than failing to call ->can if everything is totally screwed
r11134@tomas-dorans-macbook-pro (orig r11133):  rafl | 2009-08-12 03:54:52 +0100
Fix POD refering to CGI::Cookie. We're using CGI::Simple::Cookie.

Courtesy of Forrest Cahoon.
r11135@tomas-dorans-macbook-pro (orig r11134):  t0m | 2009-08-12 12:03:06 +0100
Make the code much clearer about what is going on, and remove the horrible map and grep which I hated.
r11140@tomas-dorans-macbook-pro (orig r11139):  rafl | 2009-08-16 10:19:58 +0100
Do at least one (possibly empty) write when reading the response body from a filehandle.
r11145@tomas-dorans-macbook-pro (orig r11144):  jshirley | 2009-08-17 22:33:17 +0100
Adding and documented X-Forwarded-Port
r11146@tomas-dorans-macbook-pro (orig r11145):  t0m | 2009-08-17 23:08:19 +0100
Capitalisation fixes in Changelog
r11147@tomas-dorans-macbook-pro (orig r11146):  t0m | 2009-08-17 23:11:34 +0100
Add _component_name stuff to Changes
r11148@tomas-dorans-macbook-pro (orig r11147):  jshirley | 2009-08-17 23:13:05 +0100
Conflict resolution
r11149@tomas-dorans-macbook-pro (orig r11148):  hobbs | 2009-08-17 23:24:46 +0100
Changelog for r11037

r11150@tomas-dorans-macbook-pro (orig r11149):  t0m | 2009-08-18 00:14:38 +0100
Switch to catalyst_component_name
r11154@tomas-dorans-macbook-pro (orig r11153):  ferz | 2009-08-18 07:55:14 +0100
Test case using Exception::Class

r11155@tomas-dorans-macbook-pro (orig r11154):  ferz | 2009-08-18 12:19:40 +0100
drop POD comments.

r11166@tomas-dorans-macbook-pro (orig r11165):  t0m | 2009-08-19 20:03:01 +0100
Move test to make more sense in my idea of the naming scheme - t/dead_ is for tests which check the app pukes, which this shouldn't
r11167@tomas-dorans-macbook-pro (orig r11166):  t0m | 2009-08-19 20:04:59 +0100
Fail commit was fail. Back out the part I didn't want
r11168@tomas-dorans-macbook-pro (orig r11167):  t0m | 2009-08-19 20:10:06 +0100
Remove r11058 - the commit message is lies, it does not fix the TODO test
r11169@tomas-dorans-macbook-pro (orig r11168):  t0m | 2009-08-19 21:21:44 +0100
Back out r11057 which breaks one of the chained tests, whilst not fixing the bug in question
r11170@tomas-dorans-macbook-pro (orig r11169):  t0m | 2009-08-19 21:29:16 +0100
Clean up test app for the exception test, as we don't want to depend on Test::Class thanks
r11171@tomas-dorans-macbook-pro (orig r11170):  rafl | 2009-08-19 21:45:45 +0100
Changelog Engine::finalize_body changes.
r11181@tomas-dorans-macbook-pro (orig r11180):  gbjk | 2009-08-21 14:07:54 +0100
Changelog update for previous Catalyst::Engine::HTTP fix.

r11182@tomas-dorans-macbook-pro (orig r11181):  rafl | 2009-08-21 16:51:26 +0100
Now we don't have the broken restarter engine anymore, we conflict with old Catalyst::Devel versions, that don't have the new restarter yet.
r11183@tomas-dorans-macbook-pro (orig r11182):  rafl | 2009-08-21 17:12:57 +0100
Conflict with the latest mason view, which blows up because of the new component_name constructor arg.
r11184@tomas-dorans-macbook-pro (orig r11183):  rafl | 2009-08-21 17:13:05 +0100
Version 5.80008.
r11190@tomas-dorans-macbook-pro (orig r11189):  t0m | 2009-08-21 20:54:58 +0100
Fix and tests for big issue in 5.80008
r11191@tomas-dorans-macbook-pro (orig r11190):  rafl | 2009-08-21 21:28:30 +0100
Version 5.80009.
r11193@tomas-dorans-macbook-pro (orig r11192):  rafl | 2009-08-21 21:55:25 +0100
DOH! do more than one read, if necessary.
r11194@tomas-dorans-macbook-pro (orig r11193):  rafl | 2009-08-21 22:22:36 +0100
Do what we want instead of exiting a sub via last.
r11195@tomas-dorans-macbook-pro (orig r11194):  rafl | 2009-08-21 22:22:45 +0100
Add test for sending the body from a filehandle with more data than the default chunksize of 64k.
r11196@tomas-dorans-macbook-pro (orig r11195):  rafl | 2009-08-21 22:31:38 +0100
Changelogging.
r11197@tomas-dorans-macbook-pro (orig r11196):  rafl | 2009-08-21 22:41:05 +0100
Version 5.80010.
r11215@tomas-dorans-macbook-pro (orig r11214):  rafl | 2009-08-22 20:56:53 +0100
Remove leftovers of the restarter engine.

The removed code caused test failures, which weren't apparent due to installed
copies still being available in everyone's @INC.
r11218@tomas-dorans-macbook-pro (orig r11217):  rafl | 2009-08-23 12:46:42 +0100
Changelogging.
r11219@tomas-dorans-macbook-pro (orig r11218):  rafl | 2009-08-23 12:55:48 +0100
Version 5.80011.
r11221@tomas-dorans-macbook-pro (orig r11220):  rafl | 2009-08-23 19:42:17 +0100
Failing test for component loading
r11233@tomas-dorans-macbook-pro (orig r11232):  t0m | 2009-08-24 13:51:03 +0100
Test fixes for if CATALYST_DEBUG is set to 1.
r11239@tomas-dorans-macbook-pro (orig r11238):  t0m | 2009-08-25 12:25:54 +0100
0003-Remove-diag-message.patch (marcus)
r11240@tomas-dorans-macbook-pro (orig r11239):  t0m | 2009-08-25 12:26:15 +0100
Fix duplicate components
r11252@tomas-dorans-macbook-pro (orig r11251):  frew | 2009-08-26 20:00:01 +0100
Look!  I'm famous!  (See Catalyst-Devel)
r11254@tomas-dorans-macbook-pro (orig r11253):  dandv | 2009-08-27 01:56:26 +0100
POD addition: $c->req->body returns a string or a File::Temp object
r11278@tomas-dorans-macbook-pro (orig r11277):  t0m | 2009-09-01 02:07:23 +0100
Nuke skipped test which will never pass
r11279@tomas-dorans-macbook-pro (orig r11278):  t0m | 2009-09-01 02:07:47 +0100
Author tests
r11280@tomas-dorans-macbook-pro (orig r11279):  t0m | 2009-09-01 02:09:29 +0100
t/author in MANFEST
r11281@tomas-dorans-macbook-pro (orig r11280):  t0m | 2009-09-01 02:10:46 +0100
Stop remote tests breaking everything, and force authors to run some remote tests.
r11282@tomas-dorans-macbook-pro (orig r11281):  t0m | 2009-09-01 02:11:33 +0100
Stop calling class data methods on instances + commented out warning
r11283@tomas-dorans-macbook-pro (orig r11282):  t0m | 2009-09-01 02:11:45 +0100
Changelog
r11300@tomas-dorans-macbook-pro (orig r11292):  t0m | 2009-09-01 15:11:05 +0100
Bump versions back to 5.8.4
r11301@tomas-dorans-macbook-pro (orig r11293):  t0m | 2009-09-01 15:32:46 +0100
Changes tweaks
r11307@tomas-dorans-macbook-pro (orig r11299):  t0m | 2009-09-02 03:03:58 +0100
Changelogging

1  2 
Makefile.PL
lib/Catalyst.pm

diff --combined Makefile.PL
@@@ -1,22 -1,30 +1,31 @@@
+ use strict;
+ use warnings;
  use inc::Module::Install 0.87;
- perl_version '5.008001';
+ BEGIN { # Make it easy for newbies
+     if ($Module::Install::AUTHOR) {
+         require Module::Install::AuthorRequires;
+         require Module::Install::CheckConflicts;
+         require Module::Install::AuthorTests;
+     }
+ }
+ perl_version '5.008004';
  
  name 'Catalyst-Runtime';
  all_from 'lib/Catalyst/Runtime.pm';
  
+ requires 'List::MoreUtils';
+ requires 'namespace::autoclean';
  requires 'namespace::clean';
 +requires 'namespace::autoclean';
  requires 'B::Hooks::EndOfScope' => '0.08';
  requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00801';
  requires 'Class::MOP' => '0.83';
  requires 'Moose' => '0.78';
- requires 'MooseX::MethodAttributes::Inheritable' => '0.12';
+ requires 'MooseX::MethodAttributes::Inheritable' => '0.15';
  requires 'Carp';
  requires 'Class::C3::Adopt::NEXT' => '0.07';
  requires 'CGI::Simple::Cookie';
  requires 'Data::Dump';
- requires 'File::Modified';
  requires 'HTML::Entities';
  requires 'HTTP::Body'    => '1.04'; # makes uploadtmp work
  requires 'HTTP::Headers' => '1.64';
@@@ -24,7 -32,7 +33,7 @@@ requires 'HTTP::Request'
  requires 'HTTP::Response';
  requires 'HTTP::Request::AsCGI' => '0.8';
  requires 'LWP::UserAgent';
- requires 'Module::Pluggable' => '3.01';
+ requires 'Module::Pluggable' => '3.9';
  requires 'Path::Class' => '0.09';
  requires 'Scalar::Util';
  requires 'Sub::Exporter';
@@@ -33,17 -41,20 +42,20 @@@ requires 'Time::HiRes'
  requires 'Tree::Simple' => '1.15';
  requires 'Tree::Simple::Visitor::FindByPath';
  requires 'URI' => '1.35';
+ requires 'Task::Weaken';
  requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
  requires 'MRO::Compat';
 +requires 'MooseX::Getopt';
 +requires 'MooseX::Types';
+ requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
  
  test_requires 'Class::Data::Inheritable';
  test_requires 'Test::Exception';
  
- # aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate is available
- if ($ENV{AGGREGATE_TESTS} && can_use('Test::Aggregate', '0.34_01')) {
-     test_requires('Test::Aggregate', '0.34_01');
+ # 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')) {
+     author_requires('Test::Aggregate', '0.35_05');
+     author_requires('Test::Simple', '0.88');
  }
  else {
      tests join q{ },
          map  { glob } qw[t/*.t t/aggregate/*.t];
  }
  
- my @force_build_requires_if_author = qw(
+ author_tests 't/author';
+ author_requires(map {; $_ => 0 } qw(
    Test::NoTabs
    Test::Pod
    Test::Pod::Coverage
    Pod::Coverage
- );
+ ));
  
  if ($Module::Install::AUTHOR) {
      darwin_check_no_resource_forks();
  }
  
+ resources(
+     'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst',
+     'IRC'         => 'irc://irc.perl.org/#catalyst',
+     'license',    => 'http://dev.perl.org/licenses/',
+     'homepage',   => 'http://dev.catalyst.perl.org/',
+     'repository', => 'http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/',
+ );
  install_script glob('script/*.pl');
  auto_install;
  WriteAll;
  
- if ($Module::Install::AUTHOR) {
-   # Strip out the author only build_requires from META.yml
-   # Need to do this _after_ WriteAll else it looses track of them
-   strip_author_only_build_requires(@force_build_requires_if_author, 'Test::Aggregate');
-   Meta->{values}{resources} = [
-     [ 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst' ],
-     [ 'IRC'         => 'irc://irc.perl.org/#catalyst' ],
-     [ 'license',    => 'http://dev.perl.org/licenses/' ],
-     [ 'homepage',   => 'http://dev.catalyst.perl.org/'],
-     [ 'repository', => 'http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/' ],
-   ];
-   Meta->write;
- }
  print <<"EOF";
  
   Important:
@@@ -98,7 -98,7 +99,7 @@@
          perl -MCPANPLUS -e 'install Catalyst::Devel' # or
          perl -MCPAN -e 'install Catalyst::Devel'
  
-     To get some commonly used plugins, as well as the TT view and DBIC 
+     To get some commonly used plugins, as well as the TT view and DBIC
      model, install Task::Catalyst in the same way.
  
   Have fun!
@@@ -121,7 -121,7 +122,7 @@@ my %conflicts = 
      'Catalyst::Plugin::Upload::Image::Magick' => '0.03',
      'Catalyst::Plugin::ConfigLoader'   => '0.22', # Older versions work but
                                                    # throw Data::Visitor warns
-     'Catalyst::Devel'                  => '0.09',
+     'Catalyst::Devel'                  => '1.19',
      'Catalyst::Plugin::SmartURI'       => '0.032',
      'CatalystX::CRUD'                  => '0.37',
      'Catalyst::Action::RenderView'     => '0.07',
      'Catalyst::Action::REST'           => '0.67',
      'CatalystX::CRUD'                  => '0.42',
      'CatalystX::CRUD::Model::RDBO'     => '0.20',
+     'Catalyst::View::Mason'            => '0.17',
  );
  check_conflicts(%conflicts);
  
@@@ -144,64 -145,11 +146,11 @@@ sub darwin_check_no_resource_forks 
  
          # TAR on 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE
          # On 10.5 (Leopard) it wants COPYFILE_DISABLE
-         my $attr = $osx_ver eq '10.5' ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
+         die("Oh, you got Snow Lepoard, snazzy. Please read the man page for tar to find out if Apple renamed COPYFILE_DISABLE again and fix this Makefile.PL please?\n") if $osx_ver =~ /^10.6/;
+         my $attr = $osx_ver =~ /^10.5/ ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
  
          makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
                                            qq{ echo "You must set the ENV variable $attr to true,"; }.
                                            ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
-         }
- }
- sub strip_author_only_build_requires {
-     my @build_requires_to_strip = @_;
-     Meta->{values}{build_requires} = [ grep {
-       my $ok = 1;
-       foreach my $module (@build_requires_to_strip) {
-         if ($_->[0] =~ /$module/) {
-           $ok = 0;
-           last;
-         }
-       }
-       $ok;
-     } @{Meta->{values}{build_requires}} ];
- }
- sub check_conflicts {
-     my %conflicts = @_;
-     my %conflicts_found;
-     for my $mod ( sort keys %conflicts ) {
-         eval "require($mod)";
-         next if $@;
-         my $installed = $mod->VERSION();
-         $conflicts_found{$mod} = $installed if ( $installed le $conflicts{$mod} );
-     }
-     return unless scalar keys %conflicts_found;
-     print <<"EOF";
-  WARNING:
-     This version of Catalyst conflicts with the versions of
-     some components you have installed.
-     You will need to upgrade these modules after installing
-     this version of Catalyst.
-     List of the conflicting components and their installed versions:
- EOF
-     foreach my $mod (keys %conflicts_found) {
-         print sprintf("    %s => %s\n", $mod, $conflicts_found{$mod});
      }
-     print "\n";
-     # More or less copied from Module::Build, via Moose
-     return if $ENV{PERL_MM_USE_DEFAULT};
-     return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
-     sleep 4;
  }
diff --combined lib/Catalyst.pm
@@@ -7,6 -7,8 +7,8 @@@ use Moose::Util qw/find_meta/
  use bytes;
  use B::Hooks::EndOfScope ();
  use Catalyst::Exception;
+ use Catalyst::Exception::Detach;
+ use Catalyst::Exception::Go;
  use Catalyst::Log;
  use Catalyst::Request;
  use Catalyst::Request::Upload;
@@@ -25,11 -27,12 +27,12 @@@ use URI::https
  use Tree::Simple qw/use_weak_refs/;
  use Tree::Simple::Visitor::FindByUID;
  use Class::C3::Adopt::NEXT;
+ use List::MoreUtils qw/uniq/;
  use attributes;
  use utf8;
  use Carp qw/croak carp shortmess/;
  
- BEGIN { require 5.008001; }
+ BEGIN { require 5.008004; }
  
  has stack => (is => 'ro', default => sub { [] });
  has stash => (is => 'rw', default => sub { {} });
@@@ -58,8 -61,8 +61,8 @@@ sub finalize_output { shift->finalize_b
  our $COUNT     = 1;
  our $START     = time;
  our $RECURSION = 1000;
- our $DETACH    = "catalyst_detach\n";
- our $GO        = "catalyst_go\n";
+ our $DETACH    = Catalyst::Exception::Detach->new;
+ our $GO        = Catalyst::Exception::Go->new;
  
  #I imagine that very few of these really need to be class variables. if any.
  #maybe we should just make them attributes with a default?
@@@ -76,7 -79,7 +79,7 @@@ __PACKAGE__->stats_class('Catalyst::Sta
  
  # Remember to update this in Catalyst::Runtime as well!
  
- our $VERSION = '5.80005';
+ our $VERSION = '5.80011';
  
  {
      my $dev_version = $VERSION =~ /_\d{2}$/;
@@@ -101,12 -104,13 +104,13 @@@ sub import 
      }
  
      my $meta = Moose::Meta::Class->initialize($caller);
-     #Moose->import({ into => $caller }); #do we want to do this?
      unless ( $caller->isa('Catalyst') ) {
          my @superclasses = ($meta->superclasses, $class, 'Catalyst::Controller');
          $meta->superclasses(@superclasses);
      }
+     # Avoid possible C3 issues if 'Moose::Object' is already on RHS of MyApp
+     $meta->superclasses(grep { $_ ne 'Moose::Object' } $meta->superclasses);
      unless( $meta->has_method('meta') ){
          $meta->add_method(meta => sub { Moose::Meta::Class->initialize("${caller}") } );
      }
      $caller->setup_home;
  }
  
+ sub _application { $_[0] }
  =head1 NAME
  
  Catalyst - The Elegant MVC Web Application Framework
@@@ -330,9 -336,11 +336,11 @@@ call to forward
      $c->forward(qw/MyApp::Model::DBIC::Foo do_stuff/);
      $c->forward('MyApp::View::TT');
  
- Note that forward implies an C<<eval { }>> around the call (actually
- C<execute> does), thus de-fatalizing all 'dies' within the called
- action. If you want C<die> to propagate you need to do something like:
+ Note that L<< forward|/"$c->forward( $action [, \@arguments ] )" >> implies
+ an C<< eval { } >> around the call (actually
+ L<< execute|/"$c->execute( $class, $coderef )" >> does), thus de-fatalizing
+ all 'dies' within the called action. If you want C<die> to propagate you
+ need to do something like:
  
      $c->forward('foo');
      die $c->error if $c->error;
@@@ -352,8 -360,8 +360,8 @@@ sub forward { my $c = shift; no warning
  
  =head2 $c->detach()
  
- The same as C<forward>, but doesn't return to the previous action when
- processing is finished.
+ The same as L<< forward|/"$c->forward( $action [, \@arguments ] )" >>, but
+ doesn't return to the previous action when processing is finished.
  
  When called with no arguments it escapes the processing chain entirely.
  
@@@ -365,23 -373,27 +373,27 @@@ sub detach { my $c = shift; $c->dispatc
  
  =head2 $c->visit( $class, $method, [, \@captures, \@arguments ] )
  
- Almost the same as C<forward>, but does a full dispatch, instead of just
- calling the new C<$action> / C<$class-E<gt>$method>. This means that C<begin>,
- C<auto> and the method you go to are called, just like a new request.
+ Almost the same as L<< forward|/"$c->forward( $action [, \@arguments ] )" >>,
+ but does a full dispatch, instead of just calling the new C<$action> /
+ C<< $class->$method >>. This means that C<begin>, C<auto> and the method
+ you go to are called, just like a new request.
  
  In addition both C<< $c->action >> and C<< $c->namespace >> are localized.
- This means, for example, that $c->action methods such as C<name>, C<class> and
- C<reverse> return information for the visited action when they are invoked
- within the visited action.  This is different from the behavior of C<forward>
- which continues to use the $c->action object from the caller action even when
+ This means, for example, that C<< $c->action >> methods such as
+ L<name|Catalyst::Action/name>, L<class|Catalyst::Action/class> and
+ L<reverse|Catalyst::Action/reverse> return information for the visited action
+ when they are invoked within the visited action.  This is different from the
+ behavior of L<< forward|/"$c->forward( $action [, \@arguments ] )" >>, which
+ continues to use the $c->action object from the caller action even when
  invoked from the callee.
  
- C<$c-E<gt>stash> is kept unchanged.
+ C<< $c->stash >> is kept unchanged.
  
- In effect, C<visit> allows you to "wrap" another action, just as it
- would have been called by dispatching from a URL, while the analogous
- C<go> allows you to transfer control to another action as if it had
- been reached directly from a URL.
+ In effect, L<< visit|/"$c->visit( $action [, \@captures, \@arguments ] )" >>
+ allows you to "wrap" another action, just as it would have been called by
+ dispatching from a URL, while the analogous
+ L<< go|/"$c->go( $action [, \@captures, \@arguments ] )" >> allows you to
+ transfer control to another action as if it had been reached directly from a URL.
  
  =cut
  
@@@ -391,12 -403,12 +403,12 @@@ sub visit { my $c = shift; $c->dispatch
  
  =head2 $c->go( $class, $method, [, \@captures, \@arguments ] )
  
- Almost the same as C<detach>, but does a full dispatch like C<visit>,
+ Almost the same as L<< detach|/"$c->detach( $action [, \@arguments ] )" >>, but does a full dispatch like L</visit>,
  instead of just calling the new C<$action> /
- C<$class-E<gt>$method>. This means that C<begin>, C<auto> and the
+ C<< $class->$method >>. This means that C<begin>, C<auto> and the
  method you visit are called, just like a new request.
  
- C<$c-E<gt>stash> is kept unchanged.
+ C<< $c->stash >> is kept unchanged.
  
  =cut
  
@@@ -634,7 -646,7 +646,7 @@@ If you want to search for models, pass 
  
  sub model {
      my ( $c, $name, @args ) = @_;
+     my $appclass = ref($c) || $c;
      if( $name ) {
          my @result = $c->_comp_search_prefixes( $name, qw/Model M/ );
          return map { $c->_filter_component( $_, @args ) } @result if ref $name;
          return $c->model( $c->stash->{current_model} )
            if $c->stash->{current_model};
      }
-     return $c->model( $c->config->{default_model} )
-       if $c->config->{default_model};
+     return $c->model( $appclass->config->{default_model} )
+       if $appclass->config->{default_model};
  
      my( $comp, $rest ) = $c->_comp_search_prefixes( undef, qw/Model M/);
  
      if( $rest ) {
          $c->log->warn( Carp::shortmess('Calling $c->model() will return a random model unless you specify one of:') );
-         $c->log->warn( '* $c->config->{default_model} # the name of the default model to use' );
+         $c->log->warn( '* $c->config(default_model => "the name of the default model to use")' );
          $c->log->warn( '* $c->stash->{current_model} # the name of the model to use for this request' );
          $c->log->warn( '* $c->stash->{current_model_instance} # the instance of the model to use for this request' );
          $c->log->warn( 'NB: in version 5.81, the "random" behavior will not work at all.' );
@@@ -688,6 -700,7 +700,7 @@@ If you want to search for views, pass i
  sub view {
      my ( $c, $name, @args ) = @_;
  
+     my $appclass = ref($c) || $c;
      if( $name ) {
          my @result = $c->_comp_search_prefixes( $name, qw/View V/ );
          return map { $c->_filter_component( $_, @args ) } @result if ref $name;
          return $c->view( $c->stash->{current_view} )
            if $c->stash->{current_view};
      }
-     return $c->view( $c->config->{default_view} )
-       if $c->config->{default_view};
+     return $c->view( $appclass->config->{default_view} )
+       if $appclass->config->{default_view};
  
      my( $comp, $rest ) = $c->_comp_search_prefixes( undef, qw/View V/);
  
      if( $rest ) {
          $c->log->warn( 'Calling $c->view() will return a random view unless you specify one of:' );
-         $c->log->warn( '* $c->config->{default_view} # the name of the default view to use' );
+         $c->log->warn( '* $c->config(default_view => "the name of the default view to use")' );
          $c->log->warn( '* $c->stash->{current_view} # the name of the view to use for this request' );
          $c->log->warn( '* $c->stash->{current_view_instance} # the instance of the view to use for this request' );
          $c->log->warn( 'NB: in version 5.81, the "random" behavior will not work at all.' );
@@@ -813,11 -826,11 +826,11 @@@ Returns or takes a hashref containing t
  
      __PACKAGE__->config( { db => 'dsn:SQLite:foo.db' } );
  
- You can also use a C<YAML>, C<XML> or C<Config::General> config file
- like myapp.conf in your applications home directory. See
+ You can also use a C<YAML>, C<XML> or L<Config::General> config file
+ like C<myapp.conf> in your applications home directory. See
  L<Catalyst::Plugin::ConfigLoader>.
  
- =head3 Cascading configuration.
+ =head3 Cascading configuration
  
  The config method is present on all Catalyst components, and configuration
  will be merged when an application is started. Configuration loaded with
@@@ -913,7 -926,7 +926,7 @@@ Returns the engine instance. See L<Cata
  Merges C<@path> with C<< $c->config->{home} >> and returns a
  L<Path::Class::Dir> object. Note you can usually use this object as
  a filename, but sometimes you will have to explicitly stringify it
- yourself by calling the C<<->stringify>> method.
+ yourself by calling the C<< ->stringify >> method.
  
  For example:
  
      $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 {
          return if $@;
          my $meta = Class::MOP::get_metaclass_by_name($class);
-         if ( $meta->is_immutable && ! { $meta->immutable_options }->{inline_constructor} ) {
+         if (
+             $meta->is_immutable
+             && ! { $meta->immutable_options }->{replace_constructor}
+             && (
+                    $class->isa('Class::Accessor::Fast')
+                 || $class->isa('Class::Accessor')
+             )
+         ) {
              warn "You made your application class ($class) immutable, "
-                 . "but did not inline the constructor.\n"
-                 . "This will break catalyst, please pass "
-                 . "(replace_constructor => 1) when making your class immutable.\n";
+                 . "but did not inline the\nconstructor. "
+                 . "This will break catalyst, as your app \@ISA "
+                 . "Class::Accessor(::Fast)?\nPlease pass "
+                 . "(replace_constructor => 1)\nwhen making your class immutable.\n";
          }
-         $meta->make_immutable(replace_constructor => 1) unless $meta->is_immutable;
+         $meta->make_immutable(replace_constructor => 1)
+             unless $meta->is_immutable;
      };
  
      $class->setup_finalize;
@@@ -1149,36 -1166,54 +1166,54 @@@ sub setup_finalize 
      $class->setup_finished(1);
  }
  
- =head2 $c->uri_for( $action, \@captures?, @args?, \%query_values? )
  =head2 $c->uri_for( $path, @args?, \%query_values? )
  
- =over
- =item $action
- A Catalyst::Action object representing the Catalyst action you want to
- create a URI for. To get one for an action in the current controller,
- use C<< $c->action('someactionname') >>. To get one from different
- controller, fetch the controller using C<< $c->controller() >>, then
- call C<action_for> on it.
- You can maintain the arguments captured by an action (e.g.: Regex, Chained)
- using C<< $c->req->captures >>.
+ =head2 $c->uri_for( $action, \@captures?, @args?, \%query_values? )
  
-   # For the current action
-   $c->uri_for($c->action, $c->req->captures);
+ Constructs an absolute L<URI> object based on the application root, the
+ provided path, and the additional arguments and query parameters provided.
+ When used as a string, provides a textual URI.
+ If the first argument is a string, it is taken as a public URI path relative
+ to C<< $c->namespace >> (if it doesn't begin with a forward slash) or
+ relative to the application root (if it does). It is then merged with
+ C<< $c->request->base >>; any C<@args> are appended as additional path
+ components; and any C<%query_values> are appended as C<?foo=bar> parameters.
+ If the first argument is a L<Catalyst::Action> it represents an action which
+ will have its path resolved using C<< $c->dispatcher->uri_for_action >>. The
+ optional C<\@captures> argument (an arrayref) allows passing the captured
+ variables that are needed to fill in the paths of Chained and Regex actions;
+ once the path is resolved, C<uri_for> continues as though a path was
+ provided, appending any arguments or parameters and creating an absolute
+ URI.
+ The captures for the current request can be found in
+ C<< $c->request->captures >>, and actions can be resolved using
+ C<< Catalyst::Controller->action_for($name) >>. If you have a private action
+ path, use C<< $c->uri_for_action >> instead.
+   # Equivalent to $c->req->uri
+   $c->uri_for($c->action, $c->req->captures,
+       @{ $c->req->args }, $c->req->params);
  
    # For the Foo action in the Bar controller
-   $c->uri_for($c->controller('Bar')->action_for('Foo'), $c->req->captures);
+   $c->uri_for($c->controller('Bar')->action_for('Foo'));
  
- =back
+   # Path to a static resource
+   $c->uri_for('/static/images/logo.png');
  
  =cut
  
  sub uri_for {
      my ( $c, $path, @args ) = @_;
  
+     if (blessed($path) && $path->isa('Catalyst::Controller')) {
+         $path = $path->path_prefix;
+         $path =~ s{/+\z}{};
+         $path .= '/';
+     }
      if ( blessed($path) ) { # action object
          my $captures = ( scalar @args && ref $args[0] eq 'ARRAY'
                           ? shift(@args)
            my $key = $_;
            $val = '' unless defined $val;
            (map {
-               $_ = "$_";
-               utf8::encode( $_ ) if utf8::is_utf8($_);
+               my $param = "$_";
+               utf8::encode( $param ) if utf8::is_utf8($param);
                # using the URI::Escape pattern here so utf8 chars survive
-               s/([^A-Za-z0-9\-_.!~*'() ])/$URI::Escape::escapes{$1}/go;
-               s/ /+/g;
-               "${key}=$_"; } ( ref $val eq 'ARRAY' ? @$val : $val ));
+               $param =~ s/([^A-Za-z0-9\-_.!~*'() ])/$URI::Escape::escapes{$1}/go;
+               $param =~ s/ /+/g;
+               "${key}=$param"; } ( ref $val eq 'ARRAY' ? @$val : $val ));
        } @keys);
      }
  
@@@ -1509,11 -1544,11 +1544,11 @@@ sub execute 
      my $last = pop( @{ $c->stack } );
  
      if ( my $error = $@ ) {
-         if ( !ref($error) and $error eq $DETACH ) {
-             die $DETACH if($c->depth > 1);
+         if ( blessed($error) and $error->isa('Catalyst::Exception::Detach') ) {
+             $error->rethrow if $c->depth > 1;
          }
-         elsif ( !ref($error) and $error eq $GO ) {
-             die $GO if($c->depth > 0);
+         elsif ( blessed($error) and $error->isa('Catalyst::Exception::Go') ) {
+             $error->rethrow if $c->depth > 0;
          }
          else {
              unless ( ref $error ) {
  
  sub _stats_start_execute {
      my ( $c, $code ) = @_;
+     my $appclass = ref($c) || $c;
      return if ( ( $code->name =~ /^_.*/ )
-         && ( !$c->config->{show_internal_actions} ) );
+         && ( !$appclass->config->{show_internal_actions} ) );
  
      my $action_name = $code->reverse();
      $c->counter->{$action_name}++;
@@@ -1597,25 -1632,6 +1632,6 @@@ sub _stats_finish_execute 
      $c->stats->profile( end => $info );
  }
  
- =head2 $c->_localize_fields( sub { }, \%keys );
- =cut
- #Why does this exist? This is no longer safe and WILL NOT WORK.
- # it doesnt seem to be used anywhere. can we remove it?
- sub _localize_fields {
-     my ( $c, $localized, $code ) = ( @_ );
-     my $request = delete $localized->{request} || {};
-     my $response = delete $localized->{response} || {};
-     local @{ $c }{ keys %$localized } = values %$localized;
-     local @{ $c->request }{ keys %$request } = values %$request;
-     local @{ $c->response }{ keys %$response } = values %$response;
-     $code->();
- }
  =head2 $c->finalize
  
  Finalizes the request.
@@@ -1867,7 -1883,7 +1883,7 @@@ sub prepare 
          $c->prepare_read;
  
          # Parse the body unless the user wants it on-demand
-         unless ( $c->config->{parse_on_demand} ) {
+         unless ( ref($c)->config->{parse_on_demand} ) {
              $c->prepare_body;
          }
      }
@@@ -2081,7 -2097,7 +2097,7 @@@ Reads a chunk of data from the request 
  be used in a while loop, reading C<$maxlength> bytes on every call.
  C<$maxlength> defaults to the size of the request if not specified.
  
- You have to set C<< MyApp->config->{parse_on_demand} >> to use this
+ You have to set C<< MyApp->config(parse_on_demand => 1) >> to use this
  directly.
  
  Warning: If you use read(), Catalyst will not process the body,
@@@ -2118,40 -2134,32 +2134,32 @@@ sub setup_actions { my $c = shift; $c->
  
  =head2 $c->setup_components
  
- Sets up components. Specify a C<setup_components> config option to pass
- additional options directly to L<Module::Pluggable>. To add additional
- search paths, specify a key named C<search_extra> as an array
- reference. Items in the array beginning with C<::> will have the
- application class name prepended to them.
+ This method is called internally to set up the application's components.
+ It finds modules by calling the L<locate_components> method, expands them to
+ package names with the L<expand_component_module> method, and then installs
+ each component into the application.
+ The C<setup_components> config option is passed to both of the above methods.
  
- All components found will also have any
- L<Devel::InnerPackage|inner packages> loaded and set up as components.
- Note, that modules which are B<not> an I<inner package> of the main
- file namespace loaded will not be instantiated as components.
+ Installation of each component is performed by the L<setup_component> method,
+ below.
  
  =cut
  
  sub setup_components {
      my $class = shift;
  
-     my @paths   = qw( ::Controller ::C ::Model ::M ::View ::V );
      my $config  = $class->config->{ setup_components };
-     my $extra   = delete $config->{ search_extra } || [];
  
-     push @paths, @$extra;
-     my $locator = Module::Pluggable::Object->new(
-         search_path => [ map { s/^(?=::)/$class/; $_; } @paths ],
-         %$config
-     );
-     my @comps = sort { length $a <=> length $b } $locator->plugins;
+     my @comps = sort { length $a <=> length $b }
+                 $class->locate_components($config);
      my %comps = map { $_ => 1 } @comps;
  
-     my $deprecated_component_names = grep { /::[CMV]::/ } @comps;
+     my $deprecatedcatalyst_component_names = grep { /::[CMV]::/ } @comps;
      $class->log->warn(qq{Your application is using the deprecated ::[MVC]:: type naming scheme.\n}.
          qq{Please switch your class names to ::Model::, ::View:: and ::Controller: as appropriate.\n}
-     ) if $deprecated_component_names;
+     ) if $deprecatedcatalyst_component_names;
  
      for my $component ( @comps ) {
  
          # we know M::P::O found a file on disk so this is safe
  
          Catalyst::Utils::ensure_class_loaded( $component, { ignore_loaded => 1 } );
-         #Class::MOP::load_class($component);
-         my $module  = $class->setup_component( $component );
-         my %modules = (
-             $component => $module,
-             map {
-                 $_ => $class->setup_component( $_ )
-             } grep {
-               not exists $comps{$_}
-             } Devel::InnerPackage::list_packages( $component )
-         );
  
-         for my $key ( keys %modules ) {
-             $class->components->{ $key } = $modules{ $key };
+         # Needs to be done as soon as the component is loaded, as loading a sub-component
+         # (next time round the loop) can cause us to get the wrong metaclass..
+         $class->_controller_init_base_classes($component);
+     }
+     for my $component (@comps) {
+         $class->components->{ $component } = $class->setup_component($component);
+         for my $component ($class->expand_component_module( $component, $config )) {
+             next if $comps{$component};
+             $class->_controller_init_base_classes($component); # Also cover inner packages
+             $class->components->{ $component } = $class->setup_component($component);
          }
      }
  }
  
+ =head2 $c->locate_components( $setup_component_config )
+ This method is meant to provide a list of component modules that should be
+ setup for the application.  By default, it will use L<Module::Pluggable>.
+ Specify a C<setup_components> config option to pass additional options directly
+ to L<Module::Pluggable>. To add additional search paths, specify a key named
+ C<search_extra> as an array reference. Items in the array beginning with C<::>
+ will have the application class name prepended to them.
+ =cut
+ sub locate_components {
+     my $class  = shift;
+     my $config = shift;
+     my @paths   = qw( ::Controller ::C ::Model ::M ::View ::V );
+     my $extra   = delete $config->{ search_extra } || [];
+     push @paths, @$extra;
+     my $locator = Module::Pluggable::Object->new(
+         search_path => [ map { s/^(?=::)/$class/; $_; } @paths ],
+         %$config
+     );
+     my @comps = $locator->plugins;
+     return @comps;
+ }
+ =head2 $c->expand_component_module( $component, $setup_component_config )
+ Components found by C<locate_components> will be passed to this method, which
+ is expected to return a list of component (package) names to be set up.
+ =cut
+ sub expand_component_module {
+     my ($class, $module) = @_;
+     return Devel::InnerPackage::list_packages( $module );
+ }
  =head2 $c->setup_component
  
  =cut
  
+ # FIXME - Ugly, ugly hack to ensure the we force initialize non-moose base classes
+ #         nearest to Catalyst::Controller first, no matter what order stuff happens
+ #         to be loaded. There are TODO tests in Moose for this, see
+ #         f2391d17574eff81d911b97be15ea51080500003
  sub _controller_init_base_classes {
      my ($app_class, $component) = @_;
+     return unless $component->isa('Catalyst::Controller');
      foreach my $class ( reverse @{ mro::get_linear_isa($component) } ) {
          Moose::Meta::Class->initialize( $class )
              unless find_meta($class);
@@@ -2197,16 -2251,12 +2251,12 @@@ sub setup_component 
          return $component;
      }
  
-     # FIXME - Ugly, ugly hack to ensure the we force initialize non-moose base classes
-     #         nearest to Catalyst::Controller first, no matter what order stuff happens
-     #         to be loaded. There are TODO tests in Moose for this, see
-     #         f2391d17574eff81d911b97be15ea51080500003
-     if ($component->isa('Catalyst::Controller')) {
-         $class->_controller_init_base_classes($component);
-     }
      my $suffix = Catalyst::Utils::class2classsuffix( $component );
      my $config = $class->config->{ $suffix } || {};
+     # Stash catalyst_component_name in the config here, so that custom COMPONENT
+     # methods also pass it. local to avoid pointlessly shitting in config
+     # for the debug screen, as $component is already the key name.
+     local $config->{catalyst_component_name} = $component;
  
      my $instance = eval { $component->COMPONENT( $class, $config ); };
  
@@@ -2510,7 -2560,7 +2560,7 @@@ the plugin name does not begin with C<C
          $class->_plugins( {} ) unless $class->_plugins;
          $plugins ||= [];
  
-         my @plugins = map { s/\A\+// ? $_ : "Catalyst::Plugin::$_" } @$plugins;
+         my @plugins = Catalyst::Utils::resolve_namespace($class . '::Plugin', 'Catalyst::Plugin', @$plugins);
  
          for my $plugin ( reverse @plugins ) {
              Class::MOP::load_class($plugin);
@@@ -2587,7 -2637,7 +2637,7 @@@ Catalyst uses internal actions like C<_
  C<_ACTION>, and C<_END>. These are by default not shown in the private
  action table, but you can make them visible with a config parameter.
  
-     MyApp->config->{show_internal_actions} = 1;
+     MyApp->config(show_internal_actions => 1);
  
  =head1 CASE SENSITIVITY
  
@@@ -2595,7 -2645,7 +2645,7 @@@ By default Catalyst is not case sensiti
  mapped to C</foo/bar>. You can activate case sensitivity with a config
  parameter.
  
-     MyApp->config->{case_sensitive} = 1;
+     MyApp->config(case_sensitive => 1);
  
  This causes C<MyApp::C::Foo::Bar> to map to C</Foo/Bar>.
  
@@@ -2605,7 -2655,7 +2655,7 @@@ The request body is usually parsed at t
  but if you want to handle input yourself, you can enable on-demand
  parsing with a config parameter.
  
-     MyApp->config->{parse_on_demand} = 1;
+     MyApp->config(parse_on_demand => 1);
  
  =head1 PROXY SUPPORT
  
@@@ -2626,6 -2676,18 +2676,18 @@@ changes are made to the request
      The host value for $c->req->base and $c->req->uri is set to the real
      host, as read from the HTTP X-Forwarded-Host header.
  
+ Additionally, you may be running your backend application on an insecure
+ connection (port 80) while your frontend proxy is running under SSL.  If there
+ is a discrepancy in the ports, use the HTTP header C<X-Forwarded-Port> to
+ tell Catalyst what port the frontend listens on.  This will allow all URIs to
+ be created properly.
+ In the case of passing in:
+     X-Forwarded-Port: 443
+ All calls to C<uri_for> will result in an https link, as is expected.
  Obviously, your web server must support these headers for this to work.
  
  In a more complex server farm environment where you may have your
@@@ -2633,11 -2695,11 +2695,11 @@@ frontend proxy server(s) on different m
  configuration option to tell Catalyst to read the proxied data from the
  headers.
  
-     MyApp->config->{using_frontend_proxy} = 1;
+     MyApp->config(using_frontend_proxy => 1);
  
  If you do not wish to use the proxy support at all, you may set:
  
-     MyApp->config->{ignore_frontend_proxy} = 1;
+     MyApp->config(ignore_frontend_proxy => 1);
  
  =head1 THREAD SAFETY
  
@@@ -2674,7 -2736,7 +2736,7 @@@ Wiki
  
  =head2 L<Catalyst::Manual> - The Catalyst Manual
  
- =head2 L<Catalyst::Component>, L<Catalyst::Base> - Base classes for components
+ =head2 L<Catalyst::Component>, L<Catalyst::Controller> - Base classes for components
  
  =head2 L<Catalyst::Engine> - Core engine
  
@@@ -2698,7 -2760,7 +2760,7 @@@ acme: Leon Brocard <leon@astray.com
  
  Andrew Bramble
  
- Andrew Ford
+ Andrew Ford E<lt>A.Ford@ford-mason.co.ukE<gt>
  
  Andrew Ruthven
  
@@@ -2714,10 -2776,16 +2776,18 @@@ chansen: Christian Hanse
  
  chicks: Christopher Hicks
  
+ Chisel Wright C<pause@herlpacker.co.uk>
+ Danijel Milicevic C<me@danijel.de>
+ David Kamholz E<lt>dkamholz@cpan.orgE<gt>
+ David Naughton, C<naughton@umn.edu>
  David E. Wheeler
  
 +dhoss: Devin Austin <dhoss@cpan.org>
 +
  dkubb: Dan Kubb <dan.kubb-cpan@onautopilot.com>
  
  Drew Taylor
@@@ -2728,16 -2796,24 +2798,24 @@@ esskar: Sascha Kiefe
  
  fireartist: Carl Franks <cfranks@cpan.org>
  
+ frew: Arthur Axel "fREW" Schmidt <frioux@gmail.com>
  gabb: Danijel Milicevic
  
  Gary Ashton Jones
  
+ Gavin Henry C<ghenry@perl.me.uk>
  Geoff Richards
  
+ hobbs: Andrew Rodland <andrew@cleverdomain.org>
  ilmari: Dagfinn Ilmari MannsÃ¥ker <ilmari@ilmari.org>
  
  jcamacho: Juan Camacho
  
+ jester: Jesse Sheidlower C<jester@panix.com>
  jhannah: Jay Hannah <jay@jays.net>
  
  Jody Belka
@@@ -2746,6 -2822,12 +2824,12 @@@ Johan Lindstro
  
  jon: Jon Schutz <jjschutz@cpan.org>
  
+ Jonathan Rockway C<< <jrockway@cpan.org> >>
+ Kieren Diment C<kd@totaldatasolution.com>
+ konobi: Scott McWhirter <konobi@cpan.org>
  marcus: Marcus Ramberg <mramberg@cpan.org>
  
  miyagawa: Tatsuhiko Miyagawa <miyagawa@bulknews.net>
@@@ -2774,16 -2856,22 +2858,22 @@@ rafl: Florian Ragwitz <rafl@debian.org
  
  random: Roland Lammel <lammel@cpan.org>
  
- sky: Arthur Bergman
+ Robert Sedlacek C<< <rs@474.at> >>
  
- the_jester: Jesse Sheidlower
+ sky: Arthur Bergman
  
  t0m: Tomas Doran <bobtfish@bobtfish.net>
  
  Ulf Edvinsson
  
+ Viljo Marrandi C<vilts@yahoo.com>
+ Will Hawes C<info@whawes.co.uk>
  willert: Sebastian Willert <willert@cpan.org>
  
+ Yuval Kogman, C<nothingmuch@woobling.org>
  =head1 LICENSE
  
  This library is free software. You can redistribute it and/or modify it under