Problem with mod_perl and subroutines in multiple files.

2003-03-04 Thread Benjamin Grabkowitz
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

Re: Problem with mod_perl and subroutines in multiple files.

2003-03-04 Thread Stas Bekman
://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

Re: Subroutines taking time to return..

2002-03-21 Thread David Brown
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

Re: Subroutines taking time to return..

2002-03-21 Thread Stas Bekman
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

Re: Subroutines taking time to return..

2002-03-21 Thread David Brown
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 :)

Re: Subroutines taking time to return..

2002-03-21 Thread Stas Bekman
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

Re: Subroutines taking time to return..

2002-03-21 Thread Perrin Harkins
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

Re: Subroutines taking time to return..

2002-03-21 Thread David Brown
: 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

Re: Subroutines taking time to return..

2002-03-21 Thread Ged Haywood
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

Re: Subroutines taking time to return..

2002-03-21 Thread Ged Haywood
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.

Subroutines taking time to return..

2002-03-20 Thread David Brown
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

Re: Subroutines taking time to return..

2002-03-20 Thread Garth Winter Webb
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

Re: Subroutines taking time to return..

2002-03-20 Thread Ged Haywood
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

Re: Subroutines taking time to return..

2002-03-20 Thread Stas Bekman
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

subroutines

2001-10-29 Thread Arshavir Grigorian
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

Apache::ASP error re: subroutines

2001-05-22 Thread Andrew Koebrick
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

Re: Apache::ASP error re: subroutines

2001-05-22 Thread Joshua Chamas
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

Re: Apache::ASP question: undefined subroutines

2000-10-31 Thread Joshua Chamas
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

Apache::ASP question: undefined subroutines

2000-10-30 Thread Carl Lipo
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

To-Experts: BIG problem: my variables in nested subroutines, which call each other

2000-05-09 Thread Christoph Haberberger
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

Re: To-Experts: BIG problem: my variables in nested subroutines,whic h call each other

2000-05-09 Thread Ime Smits
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

Re: To-Experts: BIG problem: my variables in nested subroutines, whic h call each other

2000-05-09 Thread shane
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

Embperl Subroutines

1999-11-23 Thread Owen Stenseth
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

RE: Embperl Subroutines

1999-11-23 Thread Gerald Richter
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