difference between perl and mod_perl

T

Tim Southerwood

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
 
D

Dinesh kumar

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
 
M

Michele Dondi

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
 
K

krakle

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.
 
M

Michele Dondi

On Wed, 04 Jul 2007 16:05:40 -0700, (e-mail address removed) 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:


: 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

: 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

: 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
 
B

Brad Baxter

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.
 
A

anno4000

Brad Baxter said:
On Jul 4, 7:05 pm, (e-mail address removed) 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
 
B

Brad Baxter

Brad Baxter said:
On Jul 4, 7:05 pm, (e-mail address removed) 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?
 
A

Adam Funk

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"
 
C

Clenna Lumina

Tim said:
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?
 
C

Clenna Lumina

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.)
 
C

Clenna Lumina

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.
 
M

Michele Dondi

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
 
T

Tim Southerwood

Joe said:
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
 

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

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top