Perl CGI utilities?

Discussion in 'Perl Misc' started by JWhite, Jul 1, 2008.

  1. JWhite

    JWhite Guest

    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
     
    JWhite, Jul 1, 2008
    #1
    1. Advertising

  2. JWhite

    JWhite Guest

    >
    > 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
     
    JWhite, Jul 1, 2008
    #2
    1. Advertising

  3. JWhite

    Time Waster Guest

    In article <7a968$486a479c$89e0e08f$>,
    Leon Timmermans <> wrote:
    >
    >
    >On Tue, 01 Jul 2008 16:42:50 +0200, JWhite wrote:
    >
    >> 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.

    >
    >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.
     
    Time Waster, Jul 1, 2008
    #3
  4. JWhite

    Mirco Wahab Guest

    JWhite wrote:
    > 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
     
    Mirco Wahab, Jul 1, 2008
    #4
  5. JWhite

    Ben Morrow Guest

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

    --
    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.
     
    Ben Morrow, Jul 1, 2008
    #5
  6. JWhite

    Todd Wade Guest

    On Jul 1, 10:42 am, JWhite <> wrote:
    > 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
     
    Todd Wade, Jul 5, 2008
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. kath
    Replies:
    4
    Views:
    700
    J. Gleixner
    Apr 9, 2007
  2. $Bill

    Re: utilities in perl

    $Bill, Sep 21, 2013, in forum: Perl Misc
    Replies:
    4
    Views:
    239
    $Bill
    Sep 22, 2013
  3. George Mpouras

    Re: utilities in perl

    George Mpouras, Sep 21, 2013, in forum: Perl Misc
    Replies:
    5
    Views:
    193
    J. Gleixner
    Sep 26, 2013
  4. Peter J. Holzer

    Re: utilities in perl

    Peter J. Holzer, Sep 21, 2013, in forum: Perl Misc
    Replies:
    14
    Views:
    241
    J├╝rgen Exner
    Sep 25, 2013
  5. Ben Bacarisse

    Re: perl hash utilities

    Ben Bacarisse, Sep 26, 2013, in forum: Perl Misc
    Replies:
    1
    Views:
    181
    Ben Bacarisse
    Sep 26, 2013
Loading...

Share This Page