Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
XP is just a number
 
PerlMonks  

Module for trying out CGI/Apache+Perl

by perl514 (Pilgrim)
on Jun 18, 2013 at 15:39 UTC ( #1039576=perlquestion: print w/ replies, xml ) Need Help??
perl514 has asked for the wisdom of the Perl Monks concerning the following question:

Respected Monks,

Kindly suggest a module that I can use to create CGI/Apache Perl Scripts.

I am planning to create scripts that will pull information from a few SAN Storage Arrays and display it in a webpage. The script will be running on a Win 2003 32 Bit Server. There are chances that I could get access to a Linux Box (Redhat 5.8) from which I can run the scripts as well, so will have to create the scripts accordingly.

Before trying out anything on the office servers, I am planning to play around with it on my personal laptop, but it runs on Ubuntu 12.04. Should I install CentOS/Scientific Linux on my laptop and then try Apache or no need to do so? Because from what I have seen so far, there is a vast difference between the two Linux Versions.

I will be extremely thankful if someone could answer the questions.

Perlpetually Indebted To PerlMonks

use Learning::Perl; use Beginning::Perl::Ovid; print "Awesome Books";
http://dwimperl.com/windows.html is a boon for Windows.

Comment on Module for trying out CGI/Apache+Perl
Download Code
Re: Module for trying out CGI/Apache+Perl
by dasgar (Deacon) on Jun 18, 2013 at 16:05 UTC

    I would suggest checking out Dancer or Mojolicious. Both are web frameworks and will have a small lightweight "web server" that you can use to test your code. When you're ready to go live, you can migrate your code to a web server. (Or, if you know for a fact that very few individuals will be accessing the web stuff, you could just use one of the "web servers" that come with the modules instead of using Apache.)

Re: Module for trying out CGI/Apache+Perl
by sundialsvc4 (Monsignor) on Jun 18, 2013 at 18:08 UTC

    Plan carefully.   There are very-lightweight HTTP servers such as HTTP::Server::Simple which you can execute right within your own login session, and connect-to by opening a specified port-number at localhost, which is always your own machine.   This will create an environment that is functionally identical to the one that Apache will create for you, and it is considerably easier for testing.   (For intra-net purposes, I have been known to use those packages in production, and they work just fine.)

    I happen also to be fond of Plack, and use the plackup command at the command-line to run a local-server instance in the same way.

      Dancer is a PSGI based application. All the benefits of Plack. Plus really, really easy to install, test, and deploy.

Re: Module for trying out CGI/Apache+Perl
by thomas895 (Friar) on Jun 19, 2013 at 01:17 UTC

    If it's only a few lines that do some simple, trivial things and don't need to be accessed several hundred times per second, then just plain old CGI(::Application) will work just fine, too.
    In this case, Apache is overkill, and a server such as thttpd can work just fine.

    ~Thomas~ 
    "Excuse me for butting in, but I'm interrupt-driven..."
Re: Module for trying out CGI/Apache+Perl
by perl514 (Pilgrim) on Jun 19, 2013 at 06:11 UTC

    Respected Monks,

    Thank you very much for taking the time to answer my questions. I will surely try all the options you have given above.

    For some reason, this question does not appear in the "SOPW" or Monastery Section. It only lists under my name. Is there something wrong with my question? Kindly let me know.

    Perlpetually Indebted To PerlMonks

    use Learning::Perl; use Beginning::Perl::Ovid; print "Awesome Books";
    http://dwimperl.com/windows.html is a boon for Windows.

      "For some reason, this question does not appear in the "SOPW" or Monastery Section. It only lists under my name. Is there something wrong with my question? Kindly let me know."

      This thread hasn't been FrontPaged so it won't appear in The Monastery Gates (assuming that's what you meant by "Monastery Section").

      If you didn't see it in Seekers of Perl Wisdom, it probably hadn't been approved at the time when you checked. "Unapproved Nodes" appear at the end of the listing. If you also tried there and didn't find it, go to your home node, follow the "Settings" link then check "Show Unapproved Nodes".

      -- Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1039576]
Approved by Happy-the-monk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (15)
As of 2014-04-17 13:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (448 votes), past polls