X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=8cc25d1e2fe26181b23b54387007635f6a0b76f9;hb=f083854e255c33d3e82befa09152284127d426c1;hp=3e3587af35b1dcf8fc03c20da7e6aeb083843a3d;hpb=c29dcdc3ea9c95069e3a4e451aa9803d9eee9a94;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 3e3587a..8cc25d1 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -75,7 +75,7 @@ our $GO = Catalyst::Exception::Go->new; __PACKAGE__->mk_classdata($_) for qw/components arguments dispatcher engine log dispatcher_class engine_loader context_class request_class response_class stats_class - setup_finished _psgi_app loading_psgi_file/; + setup_finished _psgi_app loading_psgi_file run_options/; __PACKAGE__->dispatcher_class('Catalyst::Dispatcher'); __PACKAGE__->request_class('Catalyst::Request'); @@ -84,7 +84,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.90004'; +our $VERSION = '5.90006'; sub import { my ( $class, @arguments ) = @_; @@ -1393,11 +1393,12 @@ to interpolate all the parameters in the URI. =item @args? -Optional list of extra arguments - can be supplied in the C<< \@captures_and_args? >> -array ref, or here - whichever is easier for your code.. +Optional list of extra arguments - can be supplied in the +C<< \@captures_and_args? >> array ref, or here - whichever is easier for your +code. -If your action may have a zero, a fixed or a variable number of args (e.g. C<< Args(1) >> -for a fixed number or C<< Args() >> for a variable number).. +Your action can have zero, a fixed or a variable number of args (e.g. +C<< Args(1) >> for a fixed number or C<< Args() >> for a variable number).. =item \%query_values? @@ -1572,6 +1573,16 @@ sub welcome_message { EOF } +=head2 run_options + +Contains a hash of options passed from the application script, including +the original ARGV the script received, the processed values from that +ARGV and any extra arguments to the script which were not processed. + +This can be used to add custom options to your application's scripts +and setup your application differently depending on the values of these +options. + =head1 INTERNAL METHODS These methods are not meant to be used by end users. @@ -2394,7 +2405,7 @@ $c->request. You must handle all body parsing yourself. =cut -sub read { my $c = shift; return $c->engine->read( $c, @_ ) } +sub read { my $c = shift; return $c->request->read( @_ ) } =head2 $c->run @@ -2641,7 +2652,7 @@ sub setup_engine { $meta->add_method(handler => sub { my $r = shift; - my $psgi_app = $class->psgi_app; + my $psgi_app = $class->_finalized_psgi_app; $apache->call_app($r, $psgi_app); }); @@ -3146,7 +3157,26 @@ headers. 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 => 0); + +=head2 Note about psgi files + +Note that if you supply your own .psgi file, calling +C<< MyApp->psgi_app(@_); >>, then B. + +You either need to apply L yourself +in your psgi, for example: + + builder { + enable "Plack::Middleware::ReverseProxy"; + MyApp->psgi_app + }; + +This will unconditionally add the ReverseProxy support, or you need to call +C<< $app = MyApp->apply_default_middlewares($app) >> (to conditionally +apply the support depending upon your config). + +See L for more information. =head1 THREAD SAFETY