Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Converting common subroutines as a module

by Fletch (Bishop)
on Nov 01, 2006 at 16:42 UTC ( [id://581703]=note: print w/replies, xml ) Need Help??


in reply to Converting common subroutines as a module

  • Lower case'd module names (e.g. "common") are reserved for Perl's internal use by convention.
  • It'd be better to create the CGI instance in the main body and pass that as an argument to your utility routines
  • You might consider using one of the frameworks like CGI::Application which provides functionality similar to this off-the-shelf
  • Comment on Re: Converting common subroutines as a module

Replies are listed 'Best First'.
Re^2: Converting common subroutines as a module
by markjugg (Curate) on Nov 01, 2006 at 19:04 UTC
    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.

      Thanks for the response. I will definitely look into CGI::Application for my website.

      I forgot to mention about an important aspect of my application. After authentication and path set-up, I also have some pages with non-cgi perl scripts( like reading data files to create data structures to be used in defining the UI). Presently, I have them as apart of the cgi script. Can I handle that portion as well using CGI::Application?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://581703]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-09-18 13:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (24 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.