X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=53183edded8dd3bc52b9fd3a4bbe4af50f04bdaf;hp=7d60f20388818a362452fc2a34c1e8ab312d9cca;hb=7e12141fc6cabc88ab929895a64388ab29e3b8eb;hpb=8e322ed0b39da75b8d888025782f496ca781527f diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 7d60f20..53183ed 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -68,6 +68,7 @@ has request => ( my $composed_request_class = $class->composed_request_class; return $composed_request_class->new( $self->_build_request_constructor_args); }, + predicate => 'has_request', lazy => 1, ); sub _build_request_constructor_args { @@ -113,6 +114,7 @@ has response => ( my $composed_response_class = $class->composed_response_class; return $composed_response_class->new( $self->_build_response_constructor_args); }, + predicate=>'has_response', lazy => 1, ); sub _build_response_constructor_args { @@ -205,7 +207,7 @@ sub composed_stats_class { __PACKAGE__->_encode_check(Encode::FB_CROAK | Encode::LEAVE_SRC); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.90123'; +our $VERSION = '5.90126'; $VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases sub import { @@ -409,6 +411,10 @@ Returns the current L object, giving access to information about the current client request (including parameters, cookies, HTTP headers, etc.). See L. +There is a predicate method C that returns true if the +request object has been created. This is something you might need to +check if you are writing plugins that run before a request is finalized. + =head2 REQUEST FLOW HANDLING =head2 $c->forward( $action [, \@arguments ] ) @@ -557,6 +563,10 @@ sub go { my $c = shift; $c->dispatcher->go( $c, @_ ) } Returns the current L object, see there for details. +There is a predicate method C that returns true if the +request object has been created. This is something you might need to +check if you are writing plugins that run before a request is finalized. + =head2 $c->stash Returns a hashref to the stash, which may be used to store data and pass