Perl CGI utilities?

J

JWhite

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
 
J

JWhite

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

Oops, I meant cgi.pm, not Perl-CGI.

Thanks any
James W
 
T

Time Waster

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.

Leon

Yes, it seems Catalyst is very popular. But CGI::Application seemed
just right for my small needs, see:
http://www.perl.com/pub/a/2001/06/05/cgi.html (small intro article)
http://www.perl.com/pub/a/2006/10/19/cgi_application.html (another intro)
http://www.perlfoundation.org/perl5/index.cgi?cgi_application (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.
 
M

Mirco Wahab

JWhite said:
I have been doing Perl for years, but only as local programming.
!!

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.

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.

http://www.masonhq.com/docs/manual/
http://www.masonbook.com/

Regards

Mirco
 
B

Ben Morrow

Quoth JWhite said:
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.

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.

Ben
 
T

Todd Wade

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.

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:

http://cgi-app.org/index.cgi?CgiApplicationPluginSessionExample

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.

trwww
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top