http://qs321.pair.com?node_id=1153303


in reply to Re^7: RFC: Proposed tutorial - simple login script using CGI::Application
in thread RFC: Proposed tutorial - simple login script using CGI::Application

It's important that all your pages be CGI::Application 'runmodes', and if you think about it in object-oriented programming terms, all of your runmodes should be methods of objects derived from some abstract base class that is itself derived from CGI::Application. Your base class contains the login logic. That way all derived classes inherit that functionality. If you redirect to some random CGI script that isn't derived from that base class, then you're right - you just bypassed your login logic. Fortunately, all you probably need to do is add:
use base 'MyLib::Login';
to your vpage.cgi script.