I am a new Perl developer and just found out about the great benefits of
mod_perl.
I had a Perl cgi script that ran fine. It consisted of 1 main.pl file
and multiple subroutines that each had their own file in a directory
called libs (it is in the same directory as main.pl). When I got
mod_perl
://perl.apache.org/docs/1.0/guide/ for
your own good ;)
I had a Perl cgi script that ran fine. It consisted of 1 main.pl file
and multiple subroutines that each had their own file in a directory
called libs (it is in the same directory as main.pl). When I got
mod_perl properly configured
Great feedback, many thanks. But as always, one problem becomes another !
I've compiled + installed Apache-DB
I've compiled + installed DProf-19990108
I've added this to my httpd.conf:
PerlModule Apache::DProf
I've added this to my modperl.conf (called by httpd.conf):
use Apache::DProf;
use
David Brown wrote:
Great feedback, many thanks. But as always, one problem becomes another !
I've compiled + installed Apache-DB
I've compiled + installed DProf-19990108
I've added this to my httpd.conf:
PerlModule Apache::DProf
I've added this to my modperl.conf (called by
Thankyou, but I have read the documentation.
Nothing gets written to a rootdir/dprof directory, not even an empty file
when the scripts are run.
You aren't doing it wrong. Next step is to run the script and usually it
helps to read the docs :)
David Brown wrote:
Thankyou, but I have read the documentation.
Nothing gets written to a rootdir/dprof directory, not even an empty file
when the scripts are run.
sorry, you should have told this :0)
Could be write permissions?
Can you profile a normal perl script?
You aren't doing it
David Brown wrote:
All good and well I thought.. But erm.. nothing is being created in the
dprof directory in the server-root.
When you call the script, do you get segfaults in the error log?
Make sure that you do the DProf stuff, including Apache::DB-init(),
before you load any of your
: Perrin Harkins [EMAIL PROTECTED]
To: David Brown [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, March 21, 2002 7:07 PM
Subject: Re: Subroutines taking time to return..
David Brown wrote:
All good and well I thought.. But erm.. nothing is being created in the
dprof directory
Hi there,
On Thu, 21 Mar 2002, Perrin Harkins wrote:
When you call the script, do you get segfaults in the error log?
Coming into this thread a little late, so sorry if you already said,
what version of Perl are you using? I had problems with Devel::Dprof
and dprofpp on 5.7.1 which were
Hi again,
On Thu, 21 Mar 2002, David Brown wrote:
OK, I have it working now.
Guess I shold read ALL my mail before replying to any of it...
73,
Ged.
I've been profiling my MySQL driven Mod_Perl website by adding debug
messages throughout the code which relays what time has elapsed since the
script was invoked (using Time::HiRes)
Now the script is pretty whizzy, serving up complete pages in circa 0.010
seconds.
I got to wondering how those
Have you tried using Apache::DProf? Using this is a lot easier than
trying to add tons of debug messages. If you haven't used it or the
regular DProf, it does what your doing automatically. It generates a
file of data that you run 'dprofpp' on and you can get a list of the top
10 or so most
Hi there,
On Wed, 20 Mar 2002, David Brown wrote:
I've been profiling my MySQL driven Mod_Perl website
[snip]
(using Time::HiRes)
[snip]
I expected all the complicated DB access stuff to make up the time
MySQL is pretty quick. :)
instead it seems to be consuming 0.005 in returning from
the total run-time of the code that does something.
No, for benchmarking nearly-empty subroutines run times. Since the error
here can be 1000% and more. You are still running on time-sharing
machine and if your sub didn't fit into one CPU timeslice, but the other
did, the relative difference can
are getting overriden,
and subroutines from package on one tree, get called by programs in the
other tree.
The mod_perl documentation suggests that by using the Apache::PerlVINC
module it is possible to load
the appropriate module based upon the name of the virtual host used.
The 2 questions I have
Howdy,
I am attempting to move a few subroutines from my Apache::ASP pages into a central
module, but get the error:
Undefined subroutine Apache::ASP::Demo::date_swap called at (eval 6) line 67. ,
/usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 1506
Is there something funky in the Apache
Andrew Koebrick wrote:
Howdy,
I am attempting to move a few subroutines from my Apache::ASP pages into a central
module, but get the error:
Undefined subroutine Apache::ASP::Demo::date_swap called at (eval 6) line 67. ,
/usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 1506
PerlSetVar
Carl Lipo wrote:
Does anyone know what causes these kinds of errors? The 'subroutine' that
the output is referring to is the name of the page (in this case
search.htm) that is being loaded and that sits in the content directory --
there are no real missing subroutines...Maddeningly, if I
Does anyone know what causes these kinds of errors? The 'subroutine' that
the output is referring to is the name of the page (in this case
search.htm) that is being loaded and that sits in the content directory --
there are no real missing subroutines...Maddeningly, if I hit reload
enough times
Hi!
I should migrate Perl-CGIs to mod_perl for performance reasons.
We use many subroutines in our CGIs, which read and write
global (my-defined) variables. Our plain subroutines are not nested,
but they are when the mod_perl wrapper is put around them at execution time.
In this special case
for such subroutines?
A good programming practice is to never let
a sub {} depend nor use any variables which are not explicitly
passed to it. If severel subs should have some kind of globally
used structures to work with, explicitly pass it by reference
to each sub. If you follow that basic rule, you
I'm seconding Ime's suggestion, and adding one piece, you don't have
to use anonymous subroutines for everything..., that would be.., well,
a big pain. Named subroutines where EVERYTHING it uses is passed in
via references. Also it's return values are sent back via reference
as well
Hello Everyone,
I am in the process of developing an Embperl/Mysql site and have a
couple of questions.
One thing that I am doing now is making use of Embperl [$ sub $] [$
endsub $] for defining subroutines. If I read the documentation
correctly these subroutines will be 'imported' into any
One thing that I am doing now is making use of Embperl [$ sub $] [$
endsub $] for defining subroutines. If I read the documentation
correctly these subroutines will be 'imported' into any page that I
import them into. I see no mention of reuse of these subroutines, each
page seems to get
24 matches
Mail list logo