Subject: | Using C::A::C::Remote with Catalyst 5.7014 |
I am maintaining and adding functionality to a legacy Catalyst
application based on Runtime version 5.7014. Until I'm able to upgrade,
I've added the C::A::C::Remote module to my local lib to accommodate
user login that is external to the Catalyst app.
Catalyst Runtime 5.7014 does not support $c->engine->env(), so I patched
the ::Remote module and attached the patch. This may be useful for
others who also would like this module to be compatible with older
Catalyst Runtimes. Cheers.
Subject: | Remote.patch |
--- /tmp/orig/lib/Catalyst/Authentication/Credential/Remote.pm 2009-08-27 16:00:42.000000000 -0700
+++ /tmp/new/lib/Catalyst/Authentication/Credential/Remote.pm 2009-10-13 15:06:49.000000000 -0700
@@ -45,7 +45,7 @@
my $remuser;
if ($self->source eq "REMOTE_USER") {
# compatibility hack:
- if (defined($c->engine->env)) {
+ if ($c->engine->can('env') && defined($c->engine->env)) {
# BEWARE: $c->engine->env was broken prior 5.80005
$remuser = $c->engine->env->{REMOTE_USER};
}