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