Perl CGI utilities?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have been doing Perl for years, but only as local programming.  That is
to say, I never had any reason to build web pages or other 'Net' stuff.
Lately I have been playing with CGI on our local network as a way to
deliver applications without worrying about the OS on the other end. A
vendor can show up in our mostly Linux shop with a Mac, connect to the
inhouse server and never know the difference.  It works well enough that
we will be moving a lot of our utilities to CGI.

So it comes back to the fact that I am not a web programmer, yet.

My question, for Perl programmers who are, is what do you use as the
programming environment?  Writing raw CGI into your Perl is great for
learning, but there is probably a more productive way.  I know that there
isn't a "Perl on Rails" all-in-one type of suite yet, but there must be
productivity enhancing utilities available.

Perl-CGI seems to be the most popular, but opinions will be welcome.  My
search is just starting.

Thanks any
James W

Re: Perl CGI utilities?

Quoted text here. Click to load it

Oops, I meant, not Perl-CGI.

 Thanks any
 James W

Re: Perl CGI utilities?

On Tue, 01 Jul 2008 16:42:50 +0200, JWhite wrote:

Quoted text here. Click to load it

There are plenty of frameworks out there. Catalyst seems to be the one
that's picking up the most steam right now. It gets bonus points for
having a book about it (ISBN: 978-1847190956). Other options include
Maypole, Jifty and a few others.


Re: Perl CGI utilities?

Quoted text here. Click to load it

Yes, it seems Catalyst is very popular.  But CGI::Application seemed
just right for my small needs, see: (small intro article) (another intro) (more of
a homepage for them, though i think there's another more official one)

I've knocked about a dozen interconnected pages having no web
experience at all (but I wanted to use Perl for the underlying logic).
You'll also probably use an HTML template engine and plenty of
direct CGI calls, but the framework helps with transitions from
page to page (runmodes).  Pretty low level, but I don't have anything
in the Perl world to compare it, too, only heavier weight JSP/Servlet
& Struts in the Java world.

Re: Perl CGI utilities?

JWhite wrote:
Quoted text here. Click to load it


Quoted text here. Click to load it

Is your term 'CGI' meant as "I have only /cgi-bin/-style external
processes available and no Apache modules"?

If you control the server, I'd give HTML::Mason a shot. You
install the Package into your mod_perl enabled Apache (I can
post the necessary configuration steps and some hints if required).

After you have all up and running, you have a
lot of possibilities to get along.

You may then (as in PHP) intersperse plain HTML with Perl code,
use modules, use templates whatever. This is a powerful thing,
imho. / /



Re: Perl CGI utilities?

Quoted text here. Click to load it

Catalyst is, I believe, quite close to 'Perl on Rails' (I must admit
I've never used either Ruby or Rails). It requires a small amount of
effort to understand how it thinks before you start, but after that it
makes things very much simpler. One issue is that is has a lot of
dependancies, and can be a little slow to start up: for production use
it's certainly worth installing it as a FastCGI or mod_perl app rather
than using the CGI interface. If you have access to your web server
config file this is straightforward.


   Razors pain you / Rivers are damp
   Acids stain you / And drugs cause cramp.                    [Dorothy Parker]
Guns aren't lawful / Nooses give
  Gas smells awful / You might as well live.         

Re: Perl CGI utilities?

Quoted text here. Click to load it

For your situation I recommend CGI::Application.

It has lots of plugins that handle most things you need to do to get
directly to work on an app's business logic (search CPAN for
CGI::Application::Plugin), and from the description of your
experience, the learning curve should be very shallow.

As an example, here is how easy it is to get first class sessions in
to your application with CGI::App:

Catalyst is good (its the best web app framework available in my
opinion), but because you are describing yourself as "not a web
programmer" I suggest starting off with CGI::App and then migrating to
Catalyst when/if you've reached the extent of CGI::App's capabilities.


Site Timeline