From: Tomas Doran Date: Sat, 21 Feb 2009 01:27:02 +0000 (+0000) Subject: EWRONGBRANCH Back out -r9378:9377. X-Git-Tag: 5.80001~69 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=f263fa9a3be935b736f5d901316565662387c41b EWRONGBRANCH Back out -r9378:9377. --- diff --git a/Changes b/Changes index 0a831f2..facae4e 100644 --- a/Changes +++ b/Changes @@ -28,7 +28,6 @@ - namespace::clean related cleanups (rafl) - Import related cleanups and consistency fixes (rafl) - Fix test suite TestApp /dump/env action (t0m) - - Add $c->req->remote_user to disambiguate from $c->req->user (dwc) 5.8000_06 2009-02-04 21:00 - Disallow writing to config after setup (rafl) diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index e8d30eb..1fbccdd 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2595,8 +2595,6 @@ dkubb: Dan Kubb Drew Taylor -dwc: Daniel Westermann-Clark - esskar: Sascha Kiefer fireartist: Carl Franks diff --git a/lib/Catalyst/Engine/CGI.pm b/lib/Catalyst/Engine/CGI.pm index 17a6e6c..fa2e23e 100644 --- a/lib/Catalyst/Engine/CGI.pm +++ b/lib/Catalyst/Engine/CGI.pm @@ -72,8 +72,7 @@ sub prepare_connection { $request->hostname( $ENV{REMOTE_HOST} ) if exists $ENV{REMOTE_HOST}; $request->protocol( $ENV{SERVER_PROTOCOL} ); - $request->user( $ENV{REMOTE_USER} ); # XXX: Deprecated. See Catalyst::Request for removal information - $request->remote_user( $ENV{REMOTE_USER} ); + $request->user( $ENV{REMOTE_USER} ); $request->method( $ENV{REQUEST_METHOD} ); if ( $ENV{HTTPS} && uc( $ENV{HTTPS} ) eq 'ON' ) { diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index 45b87f1..c859fd2 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -26,7 +26,7 @@ has query_parameters => (is => 'rw', default => sub { {} }); has secure => (is => 'rw', default => 0); has captures => (is => 'rw', default => sub { [] }); has uri => (is => 'rw', predicate => 'has_uri'); -has remote_user => (is => 'rw'); +has user => (is => 'rw'); has headers => ( is => 'rw', isa => 'HTTP::Headers', @@ -121,20 +121,6 @@ has hostname => ( has _path => ( is => 'rw', predicate => '_has_path', clearer => '_clear_path' ); -# XXX: Deprecated in 5.8000 due to confusion between Engines and Plugin::Authentication. Remove in 5.x000? -has user => (is => 'rw'); - -before user => sub { - my ($self, $user) = @_; - # Allow Engines and Plugin::Authentication to set without warning - my $caller = (caller(2))[0]; - if ( $caller !~ /^Catalyst::(Engine|Plugin::Authentication)/ ) { - $self->_context->log->warn( - 'Attempt to use $c->req->user; this is deprecated. ' . - 'You probably meant to call $c->user or $c->req->remote_user' ); - } -}; - sub args { shift->arguments(@_) } sub body_params { shift->body_parameters(@_) } sub input { shift->body(@_) } @@ -591,11 +577,6 @@ sub uri_with { Returns the currently logged in user. Deprecated. The method recommended for newer plugins is $c->user. -=head2 $req->remote_user - -Returns the value of the C environment variable. Previously -available via $req->user. - =head2 $req->user_agent Shortcut to $req->headers->user_agent. Returns the user agent (browser)