Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 18063 invoked from network); 1 Mar 2007 10:11:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Mar 2007 10:11:49 -0000 Received: (qmail 84775 invoked by uid 500); 1 Mar 2007 10:11:51 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 84760 invoked by uid 500); 1 Mar 2007 10:11:50 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 84749 invoked by uid 99); 1 Mar 2007 10:11:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2007 02:11:50 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of sweetwatergeek@googlemail.com designates 66.249.82.229 as permitted sender) Received: from [66.249.82.229] (HELO wx-out-0506.google.com) (66.249.82.229) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2007 02:11:38 -0800 Received: by wx-out-0506.google.com with SMTP id i30so384732wxd for ; Thu, 01 Mar 2007 02:11:18 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=NQaMnq42Qis3oDqFVx/xM8RCfxb6nfPCjx4RHmU9TAPjRNR3Glf4YnSf5FfzpCqZPdw5kPO197rWioWwsBY74WlHCTTxZIAqPh50hGQB49MbcOVlhB0QvRtKW52V34SE54fQeFjm2tkePO7HPszFlP/Hd/fSWodDv4TFuZJpzR8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=DFn/lyogxn+rJP6MkykDye29OBwTdICqbidljxrqw0L+P3vQh1hk1VgnHoF8iBiy2DA6jtcPofXN28xgx6jwbH15nCmc4Gw/dDJHFos8b2Ui2hb2jocDreWcUdq6tuKgutG9dXkr1DQR9aNa+X/yl/v557fgmRBEsgtHPr7+m3w= Received: by 10.114.124.1 with SMTP id w1mr265640wac.1172743862834; Thu, 01 Mar 2007 02:11:02 -0800 (PST) Received: by 10.114.195.17 with HTTP; Thu, 1 Mar 2007 02:11:02 -0800 (PST) Message-ID: <787fc380703010211j472bc39apb0928d8d50ce8b4d@mail.gmail.com> Date: Thu, 1 Mar 2007 10:11:02 +0000 From: Martijn To: modperl@perl.apache.org Subject: PerlAuthenHandler MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Hello. I've been building a perl script that automatically logs a visitor in upon visiting the website (given that they're not logged in already and they have chosen to be remembered by the server etc.). I've written a handler that does this and I call it using PerlAuthenHandler MyRoot::Testing which executes the handler subroutine in the MyRoot/Testing.pm module. This works well, though I'm not sure if there aren't nicer solutions to this; after all there is no authentication taking place here, the script returns OK both if the visitor is actually logged in and if, for some reason, they aren't. But my main concern is that I'd like to rename the subroutine to something more appropriate, especially since I might want to use more than one 'handler' and wouldn't want to create modules for each of then. However, when I try to change it to MyRoot::Testing->autologin I get an error that it can't find the MyRoot/Testing/autologin.pm module. This surprises me in particular because the line above the PerlAuthenHandler one is PerlAuthenHandler MyRoot::AxKit::Plugin::Authenticate->authenticate which, indeed, calls the authenticate subroutine from said module. But even placing my handler subroutine there doesn't work... Could it perhaps be that PerlAuthenHandler shouldn't be called twice? It's not a very big problem, as it works fine now, and I could always make different modules, but it just isn't very tidy. And I just like to understand things. Thanks. Martijn