in reply to Re: Converting common subroutines as a module
in thread Converting common subroutines as a module
I second the CGI::Application recommendation. Through the website I linked to, you can find a list of a lot of plugins that are available, including some to Authentication and Authorization.
I've been using this framework for years and have found it very helpful, and appropriate for all scales of projects.
In Section Seekers of Perl Wisdom