Re: modperl on Win32 is still happening

2007-12-11 Thread Jim Brandt
With thread support in mod_perl 2, it's much more of an option on Win32 
than with mod_perl 1, so you might even see more interest from the 
Windows side.


Foo JH wrote:
Looking at the (albeit small) stream of entries to the mailing list, I'm 
actually quite happy to notice that people are:

1. Still using modperl. Some newbie questions may suggest fresh blood...
2. Still using modperl on Win32 (despite the 'limitations'). Good news 
for Microsoft, but I personally believe it's a gentle step for people to 
learn modperl, then move into the Linux/ BSD platform.





--
Jim Brandt
Administrative Computing Services
University at Buffalo



Re: modperl on Win32 is still happening

2007-12-11 Thread Vladimir Yardan
On Dec 6, 2007 10:38 AM, Foo JH [EMAIL PROTECTED] wrote:

 Looking at the (albeit small) stream of entries to the mailing list, I'm
 actually quite happy to notice that people are:
 1. Still using modperl. Some newbie questions may suggest fresh blood...
 2. Still using modperl on Win32 (despite the 'limitations'). Good news
 for Microsoft, but I personally believe it's a gentle step for people to
 learn modperl, then move into the Linux/ BSD platform.


 I am on my way to studying mod_perl on Windows are you saying I should go
for other choices? What is a good one for windows?


Re: Using dtrace to determine which modules aren't loaded at startup time

2007-12-11 Thread Michael Peters
Fred Moyer wrote:

 I've been having fun with dtrace, and I most recently used it to see
 what files are being accessed by mod_perl during requests.  I've
 preloaded all the modules in my application that I know about into
 startup.pl, but when I startup my httpd server and make a request, I got
 some unexpected results.
 
 sudo rwsnoop -n httpd
 
   501   3509 httpdR 405 http.pm
   501   3509 httpdR   0 http.pm
   501   3509 httpdR2239 _server.pm
   501   3509 httpdR   0 _server.pm
   501   3509 httpdR4096 _generic.pm
   501   3509 httpdR1563 _generic.pm
   501   3509 httpdR   0 _generic.pm
   501   3509 httpdR2052 _query.pm
   501   3509 httpdR   0 _query.pm

I've done the same thing in the past by dumping %INC to a file at startup and
then at the end of a request (using a cleanup handler) and then comparing the 2.
And I get the benefit of the full path to the file. Is there something else that
dtrace provides that my approach doesn't?

-- 
Michael Peters
Developer
Plus Three, LP



Re: Bug#422026: (mod-perl2) PerlSetEnv vars not available in PerlPostConfigRequire startup script

2007-12-11 Thread Gunnar Wolf
Martín Ferrari dijo [Tue, Dec 11, 2007 at 12:11:30AM -0300]:
 From: srdjan [EMAIL PROTECTED]
 To: Debian Bug Tracking System [EMAIL PROTECTED]
 Subject: libapache2-mod-perl2: PerlSetEnv vars not available in
 PerlPostConfigRequire
  startup script
 Date: Thu, 03 May 2007 12:50:55 +1200
 
 Package: libapache2-mod-perl2
 Version: 2.0.2-2.4
 Severity: normal
 
 Documentation is not explicit on weather PerlSetEnv updates %ENV
 only for requests, but it certainly breaks mod_perl 1 behaviour - it
 used to work for PerlRequire.

Umh... Sorry, I should have answered to this earlier (as I'm the one
who adopted this package and put it under the pkg-perl group
maintenance)... 

This bug should be closed, if no further answers indicate otherwise -
mod_perl1 and mod_perl2 are completely different beasts, and expecting
one behaviour in the other... Just leads to pain ;-)

-- 
Gunnar Wolf - [EMAIL PROTECTED] - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF


pgpXQyBHuqQoO.pgp
Description: PGP signature


$m-session

2007-12-11 Thread Darragh Gammell
Does anyone know what $m-session pertains to. ie. Is it part of a mod_perl
or mason package.

I am attempting to run this command on a site using mod_perl2, Apache2 and
Mason 1.37 but keep getting an error:

Can't locate object method session via package
HTML::Mason::Request::ApacheHandler at /home/mc2/public_html/autohandler
line 404.

*404:*  if ($m-session-{textonly} eq on) {
Its from code used on a website Im trying to relocate to a new server.

Any indications would be helpful.

Thanks

Darragh


Re: $m-session

2007-12-11 Thread Darragh Gammell
From the mason devel Manual we see:

$m, the Mason request object, provides an analogous API for Mason. Almost
all Mason features not activated by syntactic tags are accessed via $m
methods.

But looking under HTML::Mason::Request - Mason Request Class there is no
reference to $m-session. This is where I'm getting confused.

Is it possible that whomever wrote this website created their own Object
called $m-session and thats why I cant find it anywhere?

My Apologies for the silly questions, trying to get to grips with new
technologies with no developers present.

Regards

Darragh


On Dec 12, 2007 11:48 AM, Aaron Dalton [EMAIL PROTECTED] wrote:

 $m-session is a Mason construct.

 --
 Aaron Dalton
 http://perlkonig.com




Re: Using dtrace to determine which modules aren't loaded at startup time

2007-12-11 Thread Fred Moyer

Michael Peters wrote:

Fred Moyer wrote:


I've been having fun with dtrace, and I most recently used it to see
what files are being accessed by mod_perl during requests.  I've
preloaded all the modules in my application that I know about into
startup.pl, but when I startup my httpd server and make a request, I got
some unexpected results.

sudo rwsnoop -n httpd

  501   3509 httpdR 405 http.pm
  501   3509 httpdR   0 http.pm
  501   3509 httpdR2239 _server.pm
  501   3509 httpdR   0 _server.pm
  501   3509 httpdR4096 _generic.pm
  501   3509 httpdR1563 _generic.pm
  501   3509 httpdR   0 _generic.pm
  501   3509 httpdR2052 _query.pm
  501   3509 httpdR   0 _query.pm


I've done the same thing in the past by dumping %INC to a file at startup and
then at the end of a request (using a cleanup handler) and then comparing the 2.
And I get the benefit of the full path to the file. Is there something else that
dtrace provides that my approach doesn't?


Only that the code doesn't have to be instrumented.  I was surprised 
that those files weren't loaded at startup, up to this point I hadn't 
taken into consideration modules which were required at runtime.


There were a few other neat things I was able to do, like seeing that 
mod_perl wrote to disk for $r-error calls during the request, as 
opposed to waiting until after the response had been sent to the client 
like the access log does.  Stuff I knew was happening before, but seeing 
it in action (same as when seeing the results of instrumenting my code) 
make me think a bit more about the code I was writing.


Re: modperl on Win32 is still happening

2007-12-11 Thread Foo JH
Firstly: mod_perl is a good choice. :) There are other languages out 
there which can probably do the same job 90% of the time. But what you 
have chosen is a language that is:

1. OS independent
2. Highly extensible via CPAN
3. Fast to cook, good to eat

It's not a question of whether you can do job X with language Y, but 
it's more of how easily it is done, and how flexible it can be. mod_perl 
tends to do pretty well in that path.



Vladimir Yardan wrote:



I am on my way to studying mod_perl on Windows are you saying I should 
go for other choices? What is a good one for windows?