Can you tell me how to change from regular Perl to Mod_perl

Discussion in 'Perl Misc' started by Picker Leon, Dec 4, 2003.

  1. Picker Leon

    Picker Leon Guest

    Do I just simple add a
    use mod_perl;
    then all my old perl program can work with mod_perl?

    Any sample code is ok.

    I looked at perl.apache.org, but could not find any sample codes.
     
    Picker Leon, Dec 4, 2003
    #1
    1. Advertising

  2. Picker Leon

    Picker Leon Guest

    My webhost allows mod_perl and there is a perl dir in the html dir and I was
    told that is where I put my mod_perl scripts to. I don't understand it. Do I
    have to use mod_perl only in certain dir but not in all dir? I can use perl
    in all dir now. Not sure if mod_perl is part of perl or part of apache.

    > Do I just simple add a
    > use mod_perl;
    > then all my old perl program can work with mod_perl?
    >
    > Any sample code is ok.
    >
    > I looked at perl.apache.org, but could not find any sample codes.
    >
    >
     
    Picker Leon, Dec 4, 2003
    #2
    1. Advertising

  3. Picker Leon

    Tore Aursand Guest

    On Thu, 04 Dec 2003 05:30:47 +0000, Picker Leon wrote:
    > Do I just simple add a
    > use mod_perl;
    > then all my old perl program can work with mod_perl?


    No. Please read the documentation on http://perl.apache.org/ before you
    continue asking. There's even a document describing how to migrate from
    CGI to mod_perl on that site.

    > I looked at perl.apache.org, but could not find any sample codes.


    That's bullshit, actually. No more, no less.


    --
    Tore Aursand <>
    "Fighting terrorism is like being a goalkeeper. You can make a hundred
    brilliant saves but the only shot that people remember is the one that
    gets past you." -- Paul Wilkinson
     
    Tore Aursand, Dec 4, 2003
    #3
  4. Picker Leon

    Tom Guest

    what the f is mod perl anway?
     
    Tom, Dec 4, 2003
    #4
  5. Tom () wrote:

    : what the f is mod perl anway?

    That's mod_perl (note _) as in "google mod_perl".
     
    Malcolm Dew-Jones, Dec 4, 2003
    #5
  6. Picker Leon

    Keith Keller Guest

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On 2003-12-04, Picker Leon <> wrote:
    > Do I just simple add a
    > use mod_perl;
    > then all my old perl program can work with mod_perl?


    No. Read (carefully this time) the docs at perl.apache.org.

    > I looked at perl.apache.org, but could not find any sample codes.


    mod_perl involves more than just code. Go back and read the docs.

    - --keith

    - --
    -francisco.ca.us
    (try just my userid to email me)
    AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.3 (GNU/Linux)

    iD8DBQE/zumghVcNCxZ5ID8RAnD8AJsEFFK5Nggx8vUaSagVHhxJgLCc4QCeOuPz
    BT9vCF7G2FYd4EKvznrkGu0=
    =rSyG
    -----END PGP SIGNATURE-----
     
    Keith Keller, Dec 4, 2003
    #6
  7. Picker Leon

    Tore Aursand Guest

    On Wed, 03 Dec 2003 23:22:11 -0800, Tom wrote:
    > what the f is mod perl anway?


    Read the documentation next time. Don't know where to start? Google
    should get you off, and the link to http://perl.apache.org/ in my previous
    post should give you a clue.

    For now, 'perldoc mod_perl' gives me this (and a lot more):

    The Apache/Perl integration project brings together the full power of
    the Perl programming language and the Apache HTTP server. This is
    achieved by linking the Perl runtime library into the server and pro-
    viding an object oriented Perl interface to the server's C language
    API. These pieces are seamlessly glued together by the `mod_perl'
    server plugin, making it is possible to write Apache modules entirely
    in Perl. In addition, the persistent interpreter embedded in the
    server avoids the overhead of starting an external interpreter and the
    penalty of Perl start-up (compile) time.

    In short, there are two major benefits from using mod_perl:

    1. Speed (no need to load the Perl interpreter for each request)
    2. Integration with the Apache web-server


    --
    Tore Aursand <>
    "I am become Death, shatterer of worlds." -- J. Robert Oppenheimer,
    upon witnessing the explosion of the first atomic bomb.
     
    Tore Aursand, Dec 4, 2003
    #7
  8. Picker Leon

    Picker Leon Guest

    > On Thu, 04 Dec 2003 05:30:47 +0000, Picker Leon wrote:
    > > Do I just simple add a
    > > use mod_perl;
    > > then all my old perl program can work with mod_perl?

    >
    > No. Please read the documentation on http://perl.apache.org/ before you
    > continue asking. There's even a document describing how to migrate from
    > CGI to mod_perl on that site.

    I still could not find it. There are 1.0 2.0 docutmens and tutorio but
    nothing as you said.
    I see a lot of handlers in mod_perl, but I just want a simple way to change
    my current scripts to mod_perl for faster time. The less change the better.


    >
    > > I looked at perl.apache.org, but could not find any sample codes.

    >
    > That's bullshit, actually. No more, no less.
    >
     
    Picker Leon, Dec 4, 2003
    #8
  9. Picker Leon

    Ben Morrow Guest

    "Picker Leon" <> wrote:
    > > No. Please read the documentation on http://perl.apache.org/ before you
    > > continue asking. There's even a document describing how to migrate from
    > > CGI to mod_perl on that site.

    >
    > I still could not find it. There are 1.0 2.0 docutmens and tutorio but
    > nothing as you said.


    Then you have no imagination. I have never used mod_perl; just for the
    hell of it I started at http://perl.apache.org/ and followed about
    five obvious links; this got me to

    http://perl.apache.org/docs/1.0/guide/porting.html#The_Script_Is_Too_
    Dirty__But_It_Does_The_Job_And_I_Cannot_Afford_To_Rewrite_It_

    (excuse the line-wrapping) which I believe tells you what you want to
    know.

    Ben

    --
    And if you wanna make sense / Whatcha looking at me for? (Fiona Apple)
    * *
     
    Ben Morrow, Dec 4, 2003
    #9
  10. Picker Leon

    Tore Aursand Guest

    On Thu, 04 Dec 2003 18:51:54 +0000, Picker Leon wrote:
    >>> Do I just simple add a
    >>> use mod_perl;
    >>> then all my old perl program can work with mod_perl?


    >> No. Please read the documentation on http://perl.apache.org/ before
    >> you continue asking. There's even a document describing how to migrate
    >> from CGI to mod_perl on that site.


    > I still could not find it. There are 1.0 2.0 docutmens and tutorio but
    > nothing as you said.


    Yes it is. Is it _really_ that hard to find it? Go to the following
    address and be sure to read most of the documentation provided there:

    http://perl.apache.org/docs/1.0/guide/index.html

    When I was talking about migrating from CGI to mod_perl, I was referring
    to the following document:

    http://perl.apache.org/docs/1.0/guide/porting.html

    Description: "This chapter is relevant to both writing a new CGI script or
    perl handler from scratch and migrating an application from plain CGI to
    mod_perl."


    --
    Tore Aursand <>
    "Time only seems to matter when it's running out." -- Peter Strup
     
    Tore Aursand, Dec 5, 2003
    #10
    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. Miguel Dias Moura
    Replies:
    2
    Views:
    361
    Martin
    Jun 22, 2004
  2. yogesh
    Replies:
    1
    Views:
    390
    Victor Bazarov
    Mar 14, 2007
  3. Royan
    Replies:
    16
    Views:
    562
    Royan
    Apr 14, 2008
  4. it_says_BALLS_on_your forehead
    Replies:
    0
    Views:
    247
    it_says_BALLS_on_your forehead
    Jan 13, 2006
  5. Replies:
    2
    Views:
    472
    Big and Blue
    Jan 25, 2006
Loading...

Share This Page