[Catalyst-commits] r10217 - Catalyst-Runtime/5.80/branches/deprecate_req_user/lib/Catalyst

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Thu May 21 13:39:49 GMT 2009


Author: t0m
Date: 2009-05-21 13:39:48 +0000 (Thu, 21 May 2009)
New Revision: 10217

Modified:
   Catalyst-Runtime/5.80/branches/deprecate_req_user/lib/Catalyst/Request.pm
Log:
Blow the warning away, as it doesn't work right, but ->req->remote_user should have gone in already.

Modified: Catalyst-Runtime/5.80/branches/deprecate_req_user/lib/Catalyst/Request.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_req_user/lib/Catalyst/Request.pm	2009-05-20 15:40:11 UTC (rev 10216)
+++ Catalyst-Runtime/5.80/branches/deprecate_req_user/lib/Catalyst/Request.pm	2009-05-21 13:39:48 UTC (rev 10217)
@@ -124,20 +124,7 @@
 # XXX: Deprecated in docs ages ago (2006), deprecated with warning in 5.8000 due
 # to confusion between Engines and Plugin::Authentication. Remove in 5.8100?
 has user => (is => 'rw');
-has _user_deprecated_has_warned => ( is => 'rw', default => 0 );
-before user => sub {
-    my ($self, $user) = @_;
-    return if $user; # Allow Engines and Plugin::Authentication to set without warning
 
-    if (! $self->_user_deprecated_has_warned) {
-        $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'
-        );
-        $self->_user_deprecated_has_warned(1);
-    }
-};
-
 sub args            { shift->arguments(@_) }
 sub body_params     { shift->body_parameters(@_) }
 sub input           { shift->body(@_) }




More information about the Catalyst-commits mailing list