You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Justin <jb...@dslreports.com> on 2000/09/15 09:22:46 UTC

Re: tracking down why a module was loaded?

Thanks for the hint. It worked perfectly. I didnt connect
Cluck, and BEGIN. doh.

nobody spotted the unintended irony in my question ..
perl-status itself (Apache::Status) was the one pulling in CGI.pm !!

Turns out, if you load Apache::Request before Apache::Status,
it uses that instead of the (large) CGI.pm .. that wasnt mentioned
in my Apache::Status manual :-(

-Justin

On Thu, Sep 14, 2000 at 10:46:39PM +0200, Stas Bekman wrote:
> On Thu, 14 Sep 2000, Justin wrote:
> 
> > Can anyone tell me the easiest slickest way of determining
> > what was responsible for requesting a module, having discovered
> > that it has been loaded when viewing perl-status?
> 
> A.pm:
> -----
> package A;
> use Carp ();
> BEGIN { Carp::cluck("I don't want to wake up!!!")}
> 1;
> 
> test.pl
> -------
> require "A.pm";
> 
> now run:
> % perl test.pl
> I don't want to wake up!!! at A.pm line 4
> 	A::BEGIN() called at A.pm line 4
> 	eval {...} called at A.pm line 4
> 	require A.pm called at test.pl line 1
> 
> Also see:
> perldoc -f caller
> 
> 
> > and while I've got the podium:
> > I would like to congratulate Doug and 
> > everyone involved in modperl.. by checking
> > pcdataonline.com, I found our entirely modperl site is
> > now #1850 in the top 10,000 websites, with over 10 million
> > *entirely dynamic* pages pushed out a month.. to half a 
> > million unique users. This is a single Dell 2300 box with
> > two PII 450s cpus and a gig of memory.. (the mysql server
> > is on another box). Most pages are built between 20-100ms
> > of user time.. the same box runs backend and frontend
> > servers, serves images as well, plus a hunk of other
> > processes.
> > If a fortune500 company asked razor fish / concrete media
> > to build them a website that would scale to that, with
> > entirely dynamic pages, they'd be dragging the client down
> > to Sun to pick out the color of their enterprise 4000, or
> > microsoft would be pushing a cluster of multi processor
> > compaqs and NT servers with all possible software trimmings
> > added.. and then you'd need a team of specialists to keep
> > the whole thing moving.. no wonder dotcoms go broke.
> 
> Wow! That's cool!
> 
> > modperl is the best kept secret on the net. Shame!
> 
> :)
> 
> _____________________________________________________________________
> Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
> http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
> mailto:stas@stason.org   http://apachetoday.com http://jazzvalley.com
> http://singlesheaven.com http://perlmonth.com   perl.org   apache.org
> 

-- 
Justin Beech                      http://www.dslreports.com
Phone:212-269-7052 x252             FAX inbox: 212-937-3800
mailto:jb@dslreports.com --- http://dslreports.com/contacts