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 (or to

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

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 fixe

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

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 ot

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

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

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-20 Thread Stas Bekman
doing work on that machine. Yes, for counting 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 t

Re: Subroutines taking time to return..

2002-03-20 Thread Perrin Harkins
> You cannot reliably measure CPU clocks with wallclock on the > multi-processor machine, unless you are running on Dos :) Even so, wall time is what most people actually care about, and it's fine to use if you're the only one doing work on that machine. > Also search the archives, about a year

Re: Subroutines taking time to return..

2002-03-20 Thread Stas Bekman
David Brown wrote: > 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. >

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 fro

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 t

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

subroutines

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

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

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 Ap

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 subr

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 en

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 v

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

2000-05-09 Thread Ime Smits
| QUESTION: But how should I transform the script, if the anonymous subs call | each other? | I get always the following error: | Undefined soubroutine &main:: called at line . | I don't know how to solve this. Is there any solution for this? Can I make | any prototype defs for such su

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: How do I package my DBI subroutines?

2000-01-20 Thread G.W. Haywood
.004_04 on the new box yet the error message says: /usr/lib/perl5/5.00503/CGI.pm at line 263 ^^^ which is the wrong version of Perl. This doesn't seem like a good idea to me. I'd delete the lot and reinstall everything from scratch. > I have some dbi subroutines

How do I package my DBI subroutines?

2000-01-19 Thread Keith Kwiatek
Hello,   I have some dbi subroutines that I want my mod_perl program to use. how do I go about packaging these (or whatever the correct terminology is) ?   Don't I just create a .pm module and then "USE" it? I tried this, and it keeps comming back saying "U

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 subrouti

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'