difference between perl and mod_perl

Discussion in 'Perl Misc' started by vdhinesh@gmail.com, Jul 4, 2007.

  1. Guest

    hi all,

    can any one tell what is the difference between perl and
    mod_perl ???
    , Jul 4, 2007
    #1
    1. Advertising

  2. wrote:

    > hi all,
    >
    > can any one tell what is the difference between perl and
    > mod_perl ???


    perl executes perl script as a standalone process.

    mod_perl runs perl script in the context of an Apache web server.

    The latter imposes some constraints and expectations on the script.

    HTH

    Tim
    Tim Southerwood, Jul 4, 2007
    #2
    1. Advertising

  3. Dinesh kumar Guest

    On Jul 4, 5:02 pm, Tim Southerwood <> wrote:
    > wrote:
    > > hi all,

    >
    > > can any one tell what is thedifferencebetweenperland
    > >mod_perl???

    >
    > perlexecutesperlscript as a standalone process.
    >
    > mod_perlrunsperlscript in the context of an Apache web server.
    >
    > The latter imposes some constraints and expectations on the script.
    >
    > HTH
    >
    > Tim




    Hi

    can you explain in brief???????

    dhinesh
    Dinesh kumar, Jul 4, 2007
    #3
  4. On Wed, 04 Jul 2007 04:36:00 -0700, wrote:

    > can any one tell what is the difference between perl and
    >mod_perl ???


    Perl: a programming language.
    perl: a specific Perl interpreter.
    mod_perl: optional module for the Apache HTTP server which embeds a
    Perl interpreter into Apache.


    Michele
    --
    {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
    (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
    ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
    256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
    Michele Dondi, Jul 4, 2007
    #4
  5. Dinesh kumar wrote:

    > On Jul 4, 5:02 pm, Tim Southerwood <> wrote:
    >> wrote:
    >> > hi all,

    >>
    >> > can any one tell what is thedifferencebetweenperland
    >> >mod_perl???

    >>
    >> perlexecutesperlscript as a standalone process.
    >>
    >> mod_perlrunsperlscript in the context of an Apache web server.
    >>
    >> The latter imposes some constraints and expectations on the script.
    >>
    >> HTH
    >>
    >> Tim

    >
    >
    >
    > Hi
    >
    > can you explain in brief???????
    >
    > dhinesh


    That's pretty brief - what are you having trouble understanding?
    Tim Southerwood, Jul 4, 2007
    #5
  6. Guest

    On Jul 4, 6:36 am, wrote:
    > hi all,
    >
    > can any one tell what is the difference between perl and
    > mod_perl ???


    God forbid a newbie asks a question here... You will most likely
    encounter idiots who will indirectly flame you for saying 'perl'
    instead of 'Perl'.

    Guys... It's NOT a big deal. You KNOW what he meant. This is one of
    the reasons why the Perl usenet group is complete garbage. A lot of
    brains but very poor social skills.

    I've said it before and I'll say it again... Some of you guys need
    some lessons in social situations because you do NOT know how to
    interact with other people!!!

    To answer the original posters question... Perl and mod_perl is the
    same language, Perl. But mod_perl embeds a perl interputer into Apache
    HTTP. With mod_perl the code is compiled once (on first time execution
    after update) and remains cached in memory. This saves on start up
    time thus making your code 'run' faster. With mod_perl you can also
    control the Apache life cycle.
    , Jul 5, 2007
    #6
  7. On Wed, 04 Jul 2007 16:05:40 -0700, wrote:

    : Guys... It's NOT a big deal. You KNOW what he meant. This is one of
    : the reasons why the Perl usenet group is complete garbage. A lot of
    : brains but very poor social skills.

    While I may occasionally buy the argument, I'd like to see you explain
    how anyone of those who answered failed to convey the correct
    information:


    On Wed, 04 Jul 2007 13:02:49 +0100, Tim Southerwood <>
    wrote:

    : perl executes perl script as a standalone process.
    :
    : mod_perl runs perl script in the context of an Apache web server.
    :
    : The latter imposes some constraints and expectations on the script.

    Wrong? Garbage? Flame?


    On Wed, 04 Jul 2007 15:37:39 +0200, Michele Dondi
    <> wrote:

    : Perl: a programming language.
    : perl: a specific Perl interpreter.
    : mod_perl: optional module for the Apache HTTP server which embeds a
    : Perl interpreter into Apache.

    Wrong? Garbage? Flame?


    On Wed, 04 Jul 2007 17:21:19 -0400, Sherm Pendley
    <> wrote:

    : Perl, aka /usr/bin/perl, is a standalone interpreter. Mod_perl is an inter-
    : preter that's been embedded into an Apache instance.
    :
    : Both use the Perl interpreter in the libperl library - in fact, if you do a
    : "ls -l /usr/bin/perl", you'll see that it's positively tiny, being little
    : more than a main() function that calls into libperl for its "heavy lifting".
    :
    : Because they literally use the same interpreter, there's no language-level
    : difference between the two, although there are modules that only work in
    : one environment or the other, for reasons that have nothing to do with the
    : interpreter itself.

    Wrong? Garbage? Flame?


    Michele
    --
    {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
    (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
    ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
    256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
    Michele Dondi, Jul 5, 2007
    #7
  8. Brad Baxter Guest

    On Jul 4, 7:05 pm, wrote:
    > On Jul 4, 6:36 am, wrote:
    >
    > > hi all,

    >
    > > can any one tell what is the difference between perl and
    > > mod_perl ???

    >
    > God forbid a newbie asks a question here... You will most likely
    > encounter idiots who will indirectly flame you for saying 'perl'
    > instead of 'Perl'.


    Example?


    > Guys... It's NOT a big deal. You KNOW what he meant. This is one of
    > the reasons why the Perl usenet group is complete garbage. A lot of
    > brains but very poor social skills.


    Projecting?


    > I've said it before and I'll say it again... Some of you guys need
    > some lessons in social situations because you do NOT know how to
    > interact with other people!!!


    Is this one of those lessons?


    > To answer the original posters question... Perl and mod_perl is the
    > same language, Perl. But mod_perl embeds a perl interputer into Apache
    > HTTP. With mod_perl the code is compiled once (on first time execution
    > after update) and remains cached in memory. This saves on start up
    > time thus making your code 'run' faster. With mod_perl you can also
    > control the Apache life cycle.


    That sounds a lot like all the other answers given.

    --
    Brad
    Brad Baxter, Jul 5, 2007
    #8
  9. -berlin.de Guest

    Brad Baxter <> wrote in comp.lang.perl.misc:
    > On Jul 4, 7:05 pm, wrote:


    [...]

    > > same language, Perl. But mod_perl embeds a perl interputer into Apache

    >
    > That sounds a lot like all the other answers given.


    ....except for the "interputer". I like the word.

    Anno
    -berlin.de, Jul 5, 2007
    #9
  10. Brad Baxter Guest

    On Jul 5, 12:28 pm, -berlin.de wrote:
    > Brad Baxter <> wrote in comp.lang.perl.misc:
    >
    > > On Jul 4, 7:05 pm, wrote:

    >
    > [...]
    >
    > > > same language, Perl. But mod_perl embeds a perl interputer into Apache

    >
    > > That sounds a lot like all the other answers given.

    >
    > ...except for the "interputer". I like the word.


    You might have a computer. What you had first might have been an
    anteputer (or preputer). Then you might have had your interputer (or
    transputer). In the future, you might get a postputer. You might have
    a bunch of peripherals circumputer, periputer, epiputer, amphiputer,
    or even exputer. If you kept everything, you might be polyputer (vs.
    monoputer or soloputer). They might be homoputer or heteroputer. Not
    that there's anything wrong with that. Your wife may be aputer, but if
    they take up a lot of space, she might be downright antiputer.

    Any disputers?

    --
    Brad
    Brad Baxter, Jul 6, 2007
    #10
  11. Adam Funk Guest

    On 2007-07-06, Brad Baxter wrote:

    >> > > same language, Perl. But mod_perl embeds a perl interputer into Apache

    >>
    >> > That sounds a lot like all the other answers given.

    >>
    >> ...except for the "interputer". I like the word.

    >
    > You might have a computer. What you had first might have been an
    > anteputer (or preputer). Then you might have had your interputer (or
    > transputer). In the future, you might get a postputer. You might have
    > a bunch of peripherals circumputer, periputer, epiputer, amphiputer,
    > or even exputer. If you kept everything, you might be polyputer (vs.
    > monoputer or soloputer). They might be homoputer or heteroputer. Not
    > that there's anything wrong with that. Your wife may be aputer, but if
    > they take up a lot of space, she might be downright antiputer.
    >
    > Any disputers?


    "computational appliance"

    --
    Unix is a user-friendly operating system. It's just very choosy about
    its friends.
    Adam Funk, Jul 6, 2007
    #11
  12. Tim Southerwood wrote:
    > Dinesh kumar wrote:
    >
    >> On Jul 4, 5:02 pm, Tim Southerwood <> wrote:
    >>> wrote:
    >>>> hi all,
    >>>
    >>>> can any one tell what is thedifferencebetweenperland
    >>>> mod_perl???
    >>>
    >>> perlexecutesperlscript as a standalone process.
    >>>
    >>> mod_perlrunsperlscript in the context of an Apache web server.
    >>>
    >>> The latter imposes some constraints and expectations on the script.
    >>>
    >>> HTH
    >>>
    >>> Tim

    >>
    >>
    >>
    >> Hi
    >>
    >> can you explain in brief???????
    >>
    >> dhinesh

    >
    > That's pretty brief - what are you having trouble understanding?


    I think what he wanted to know was what sort of "constraints and
    expectations" are imposed?

    --
    CL
    Clenna Lumina, Jul 6, 2007
    #12
  13. Sherm Pendley wrote:
    [...]
    > Both use the Perl interpreter in the libperl library - in fact, if
    > you do a "ls -l /usr/bin/perl", you'll see that it's positively tiny,


    Not as tiny as /usr/local/perl1/bin/perl though :)

    (I only have this for historical purposes - it's nice to know how Perl
    was in it's first incarnation.)

    --
    CL
    Clenna Lumina, Jul 6, 2007
    #13
  14. wrote:
    > On Jul 4, 6:36 am, wrote:
    >> hi all,
    >>
    >> can any one tell what is the difference between perl and
    >> mod_perl ???

    >

    [...]
    > To answer the original posters question... Perl and mod_perl is the
    > same language, Perl.


    The subject actually read "difference between perl and mod_perl", so as
    far as I can tell, that would be the correct way to say it. As someone
    else pointed out, both the normal perl (eg: /usr/bin/perl) and mod_perl
    use the same libperl, so the only real differences (in regards to the
    language) I can tell are modules that make specific use of one
    environment or another. One that a tailored for mod_perl are probably in
    fact tailored to CGI use in general.

    > But mod_perl embeds a perl interputer into Apache
    > HTTP. With mod_perl the code is compiled once (on first time execution
    > after update) and remains cached in memory. This saves on start up
    > time thus making your code 'run' faster. With mod_perl you can also
    > control the Apache life cycle.


    True, mod_perl is specifically trailored for Apache.

    --
    CL
    Clenna Lumina, Jul 6, 2007
    #14
  15. On Thu, 5 Jul 2007 23:38:39 -0700, "Clenna Lumina"
    <> wrote:

    >environment or another. One that a tailored for mod_perl are probably in
    >fact tailored to CGI use in general.


    Just to nitpick: s/CGI/webby stuff/;


    Michele
    --
    {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
    (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
    ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
    256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
    Michele Dondi, Jul 6, 2007
    #15
  16. Joe Smith wrote:

    > Tim Southerwood wrote:
    >
    >> The latter imposes some constraints and expectations on the script.

    >
    > Global variables may or may not be set to undef when the script runs.
    > For example:
    >
    > our $active_accounts;
    > if ($active_accounts) {
    > reset_global_variables(); # Clear out junk from previous invocation
    > $active_accounts = 0;
    > }
    >
    > The idiom of "our local $variable_name;" is useful in mod_perl.
    >
    > -Joe


    Here's some extra stuff about mod_perl too:

    http://modperlbook.org/html/ch06_04.html

    Tim
    Tim Southerwood, Jul 6, 2007
    #16
    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. jakk
    Replies:
    4
    Views:
    12,021
  2. Santa
    Replies:
    1
    Views:
    1,059
    Mark A. Odell
    Jul 17, 2003
  3. Replies:
    2
    Views:
    438
    Big and Blue
    Jan 25, 2006
  4. PerlFAQ Server
    Replies:
    2
    Views:
    101
    brian d foy
    Jan 12, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    79
    PerlFAQ Server
    Mar 1, 2011
Loading...

Share This Page