Merge 'trunk' into 'uri_encode_captures_andor_args_take2'
Tomas Doran [Thu, 12 Nov 2009 23:43:17 +0000 (23:43 +0000)]
r11670@t0mlaptop (orig r11635):  t0m | 2009-10-19 18:02:59 +0100
Remove warnings from duplicate action declerations
r11675@t0mlaptop (orig r11640):  poisonbit | 2009-10-20 21:12:46 +0100
Example added to #Actions_in_your_application_class

r11676@t0mlaptop (orig r11641):  poisonbit | 2009-10-20 21:32:41 +0100
Formating (a lost space and line break)

r11677@t0mlaptop (orig r11642):  poisonbit | 2009-10-20 21:34:45 +0100
More regresion from 11640, correcting parentheses and endpoint.

r11678@t0mlaptop (orig r11643):  poisonbit | 2009-10-20 22:08:47 +0100
Change in actions inside roles.
http://bobtfish.livejournal.com/264317.html

r11679@t0mlaptop (orig r11644):  poisonbit | 2009-10-20 23:16:03 +0100
Fixes to pass podchecker OK

r11714@t0mlaptop (orig r11679):  rafl | 2009-10-28 23:54:56 +0000
Enable Catalyst::Utils::home() to find home within Dist::Zilla built dists.

Courtesy of nperez.
r11716@t0mlaptop (orig r11681):  t0m | 2009-10-29 00:43:07 +0000
Make URI a link to make it super obvious
r11796@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@t0mlaptop (orig r11776):  altreus | 2009-11-06 17:09:51 +0000
Add doc for no-args call to ->uri_for
r11813@t0mlaptop (orig r11778):  dhoss | 2009-11-06 17:13:27 +0000
fixed options passed to devel server so that author tests pass
r11814@t0mlaptop (orig r11779):  altreus | 2009-11-06 17:14:49 +0000
Amend doc to not mention using undef in ->uri_for
r11816@t0mlaptop (orig r11781):  t0m | 2009-11-07 16:50:59 +0000
Back out change from -port to -l - svn merge -r 11778:11777
r11823@t0mlaptop (orig r11788):  rafl | 2009-11-09 22:21:19 +0000
Make request->body fail when used as a writer.
r11824@t0mlaptop (orig r11789):  t0m | 2009-11-10 19:51:33 +0000
Fix changelog, me--
r11825@t0mlaptop (orig r11790):  t0m | 2009-11-10 19:56:09 +0000
Warn on case_sensitive being set, remove documentation
r11827@t0mlaptop (orig r11792):  t0m | 2009-11-10 21:36:06 +0000
Return 1, only currently works by chance
r11828@t0mlaptop (orig r11793):  t0m | 2009-11-10 21:37:26 +0000
Also retarded
r11829@t0mlaptop (orig r11794):  t0m | 2009-11-10 21:41:27 +0000
And lets not change behaviour with the log flush change..
r11836@t0mlaptop (orig r11801):  t0m | 2009-11-12 01:12:05 +0000
Bring the changelog up to date.
r11839@t0mlaptop (orig r11804):  t0m | 2009-11-12 01:44:46 +0000
 r11462@t0mlaptop (orig r11432):  rafl | 2009-09-27 16:06:26 +0100
 More aggregated tests.
 r11463@t0mlaptop (orig r11433):  rafl | 2009-09-27 16:06:36 +0100
 Fix a couple of aggregation warnings.
 r11464@t0mlaptop (orig r11434):  rafl | 2009-09-27 16:06:51 +0100
 More aggregation.
 r11465@t0mlaptop (orig r11435):  rafl | 2009-09-27 16:28:04 +0100
 Make things run again with aggregation disabled.
 r11838@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@t0mlaptop (orig r11806):  bricas | 2009-11-12 17:58:02 +0000
remove duplicate changelog entry

1  2 
Makefile.PL
lib/Catalyst.pm

diff --combined Makefile.PL
@@@ -30,8 -30,8 +30,8 @@@ requires 'Data::Dump'
  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' => '5.814';
+ requires 'HTTP::Response' => '5.813';
  requires 'HTTP::Request::AsCGI' => '0.8';
  requires 'LWP::UserAgent';
  requires 'Module::Pluggable' => '3.9';
@@@ -52,7 -52,6 +52,7 @@@ recommends 'B::Hooks::OP::Check::StashC
  
  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')) {
@@@ -65,7 -64,6 +65,7 @@@ else 
          map  { glob } qw[t/*.t t/aggregate/*.t];
  }
  author_requires 'CatalystX::LeakChecker', '0.03'; # Skipped if this isn't installed
 +author_requires 'File::Copy::Recursive'; # For http server test
  
  author_tests 't/author';
  author_requires(map {; $_ => 0 } qw(
diff --combined lib/Catalyst.pm
@@@ -1145,7 -1145,6 +1145,6 @@@ EO
          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 {
          ) 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.
  }
  
  
@@@ -1198,7 -1206,7 +1206,7 @@@ sub setup_finalize 
      $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 -1214,10 +1214,10 @@@ Constructs an absolute L<URI> object ba
  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
@@@ -1247,10 -1259,9 +1259,10 @@@ sub uri_for 
      }
  
      if ( blessed($path) ) { # action object
 -        my $captures = ( scalar @args && ref $args[0] eq 'ARRAY'
 -                         ? shift(@args)
 -                         : [] );
 +        my $captures = [ map { s|/|%2F|; $_; }
 +                        ( scalar @args && ref $args[0] eq 'ARRAY'
 +                         ? @{ shift(@args) }
 +                         : ()) ];
          my $action = $path;
          $path = $c->dispatcher->uri_for_action($action, $captures);
          if (not defined $path) {
  
      carp "uri_for called with undef argument" if grep { ! defined $_ } @args;
      s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args;
 +    s|/|%2F| for @args;
  
      unshift(@args, $path);
  
@@@ -2674,10 -2684,6 +2686,6 @@@ There are a number of 'base' config var
  
  =item *
  
- C<case_sensitive> - Makes private paths case sensitive. See L</CASE SENSITIVITY>.
- =item *
  C<default_model> - The default model picked if you say C<< $c->model >>. See L</$c->model($name)>.
  
  =item *
@@@ -2745,16 -2751,6 +2753,6 @@@ action table, but you can make them vis
  
      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,