trouble with mod-perl soap handler

2002-02-27 Thread Rizwan Majeed




Hi all,

I really need some help.

Iam using the mod-perl handler for soap. 

I wasnt sure how to test it. Can any body tell me 
how to test the service I make.

MORE Importantly.
how should I make sure the handler is invoked. I 
think it is not being invoked. I have also copied the package in the perls @INC 
path "//site_perl". The package has a handler function that should be 
invoked.


Thanks

Riz


How to do connection pooling

2002-02-27 Thread A.C.Sekhar



Hi all,
How can I maintain the connections in perl? For 
this I want to use connection pooling to contol the traffic of my site. How can 
I do this in perl? Can anybody help me in this regard? If possible please give 
the steps included in this. 

Thanks and Regards
A C Sekhar



Re: How to do connection pooling

2002-02-27 Thread Dave Hodgkinson

A.C.Sekhar [EMAIL PROTECTED] writes:

 Hi all,
 
 How can I maintain the connections in perl? For this I want to use connection
 pooling to contol the traffic of my site. How can I do this in perl? Can
 anybody help me in this regard? If possible please give the steps included in
 this.

Use a two-tier Apache and restrict MaxClients on the back-end.

-- 
Dave Hodgkinson, Wizard for Hire http://www.davehodgkinson.com
Editor-in-chief, The Highway Starhttp://www.thehighwaystar.com
   Interim Technical Director, Web Architecture Consultant for hire



Re: trouble with mod-perl soap handler

2002-02-27 Thread Mark Fowler

On Wed, 27 Feb 2002, Rizwan Majeed wrote:

 I am using the mod-perl handler for soap.  I wasnt sure how to test it.
 Can any body tell me how to test the service I make.

Hi.

I was playing with this stuff yesterday, so here are some points from 
someone who's new to this stuff

First off, there's an example in the mod_perl cookbook.  See chapter 15,
secion 15.16 Creating a SOAP server.  In particular, the listing you
might want to take a look at is the example of a script that calls thier
soap server server.

http://www.modperlcookbook.org/code/ch15/HalfLife-QueryServer-0.10/eg/querysoap.pl

Secondly, have a look at Leon Brocard's stuff at  
http://www.astray.com/services/  This is a further example of using SOAP - 
this time to call a infobot.

Basically what you want to do from your client is

#!/usr/bin/perl

use SOAP::Lite +autodispatch =
  uri   = 'Some unique uri to identify your request',
  proxy = 'The url that is in your Location in httpd.conf';

my $object = NameOfMySOAPedModule-new();
$object-a_method();
$object-an_other_method();

 MORE Importantly. how should I make sure the handler is invoked. I think
 it is not being invoked. I have also copied the package in the perls
 @INC path //site_perl. The package has a handler function that
 should be invoked.

Try GETing the url.  Assuming you have LWP installed:

[mark@pate mark]$ GET http://2shortplanks.com/mod_soap
HTML
HEADTITLEAn Error Occurred/TITLE/HEAD
BODY
H1An Error Occurred/h1
405 Method Not Allowed
/BODY
/HTML

For a simple GET if the handler is being called you should get the 405 
(as you didn't issue a proper soap request.)

-- 
s''  Mark Fowler London.pm   Bath.pm
 http://www.twoshortplanks.com/  [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t-Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t-Tgoto(cm,$_,$y). $w;select$k,$k,$k,.03}$y+=2}




Net::LDAP::Extension

2002-02-27 Thread Murugan K

Hi
 Can please  you direct me to the   Net::LDAP::Extension 
Documentation. 

Thanks in advance.

Regards
K.Murugan




Re: Net::LDAP::Extension

2002-02-27 Thread Jon Molin

Murugan K wrote:
 
 Hi
  Can please  you direct me to the   Net::LDAP::Extension
 Documentation.
 

http://search.cpan.org/search?mode=modulequery=Net%3A%3ALDAP%3A%3AExtension

 Thanks in advance.
 
 Regards
 K.Murugan



another article on perl.com

2002-02-27 Thread Geoffrey Young

it seems mod_perl is gathering some serious momentum lately...

in addition to Paul's Preventing Cross-site Scripting Attacks
article last week

http://www.perl.com/pub/a/2002/02/20/css.html

we have a new article by Stas, Why mod_perl?

http://perl.com/pub/a/2002/02/26/whatismodperl.html

so, mod_perl is front and center on perl.com this week.

nice work everyone!

--Geoff



Re: trouble with mod-perl soap handler

2002-02-27 Thread Rizwan Majeed

Thanks for the help

I am doing the following:

#--
package ServerDemo;

use strict;


use SOAP::Transport::HTTP::Apache;


sub handler {

   my $safe_classes = {

   BlotterService = undef


   };


   SOAP::Transport::HTTP::Apache-handler($safe_classes);

}

#---

package BlotterService;

use strict;




sub new {

 bless {}, shift;

}


sub handle_request {

 my ($self, $headers, $body, $envelopeMaker) = @_;

$body-{extra_stuff} = heres some extra stuff;

foreach my $header (@$headers)
{
$header-{extra_stuff} = heres some more extra stuff;
$envelopeMaker-add_header(undef, undef, 0, 0, $header);
}

$envelopeMaker-set_body(undef, 'myresponse', 0, $body);

}




I am still unable to check it/ write a client for it. I always get the error
Bad Request. I have also addedd the location tag in httpd.conf


Thanks.

Rizwan






- Original Message -
From: Mark Fowler [EMAIL PROTECTED]
To: Rizwan Majeed [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 2:58 PM
Subject: Re: trouble with mod-perl soap handler


 On Wed, 27 Feb 2002, Rizwan Majeed wrote:

  I am using the mod-perl handler for soap.  I wasnt sure how to test it.
  Can any body tell me how to test the service I make.

 Hi.

 I was playing with this stuff yesterday, so here are some points from
 someone who's new to this stuff

 First off, there's an example in the mod_perl cookbook.  See chapter 15,
 secion 15.16 Creating a SOAP server.  In particular, the listing you
 might want to take a look at is the example of a script that calls thier
 soap server server.


http://www.modperlcookbook.org/code/ch15/HalfLife-QueryServer-0.10/eg/querys
oap.pl

 Secondly, have a look at Leon Brocard's stuff at
 http://www.astray.com/services/  This is a further example of using SOAP -
 this time to call a infobot.

 Basically what you want to do from your client is

 #!/usr/bin/perl

 use SOAP::Lite +autodispatch =
   uri   = 'Some unique uri to identify your request',
   proxy = 'The url that is in your Location in httpd.conf';

 my $object = NameOfMySOAPedModule-new();
 $object-a_method();
 $object-an_other_method();

  MORE Importantly. how should I make sure the handler is invoked. I think
  it is not being invoked. I have also copied the package in the perls
  @INC path //site_perl. The package has a handler function that
  should be invoked.

 Try GETing the url.  Assuming you have LWP installed:

 [mark@pate mark]$ GET http://2shortplanks.com/mod_soap
 HTML
 HEADTITLEAn Error Occurred/TITLE/HEAD
 BODY
 H1An Error Occurred/h1
 405 Method Not Allowed
 /BODY
 /HTML

 For a simple GET if the handler is being called you should get the 405
 (as you didn't issue a proper soap request.)

 --
 s''  Mark Fowler London.pm   Bath.pm
  http://www.twoshortplanks.com/  [EMAIL PROTECTED]
 ';use Term'Cap;$t=Tgetent Term'Cap{};print$t-Tputs(cl);for$w(split/  +/
 ){for(0..30){$|=print$t-Tgoto(cm,$_,$y). $w;select$k,$k,$k,.03}$y+=2}




Re: How to do connection pooling

2002-02-27 Thread Perrin Harkins

A.C.Sekhar wrote:
 How can I maintain the connections in perl?

Which connections?  Connections to a database?  A web browser? 
Something else?

- Perrin




Re: another article on perl.com

2002-02-27 Thread Stas Bekman

Geoffrey Young wrote:
 it seems mod_perl is gathering some serious momentum lately...
 
 in addition to Paul's Preventing Cross-site Scripting Attacks
 article last week
 
 http://www.perl.com/pub/a/2002/02/20/css.html
 
 we have a new article by Stas, Why mod_perl?
 
 http://perl.com/pub/a/2002/02/26/whatismodperl.html
 
 so, mod_perl is front and center on perl.com this week.
 
 nice work everyone!

Yeah, I'm trying to push mod_perl everywhere I can. publicity never hurts.

There is a bunch of articles I'm republishing at apacheweek.com.

Unfortunately apachetoday.com doesn't publish anymore (but the articles 
are still available if you search the site) and perlmonth.com has gone ;(

At this moment I'm poking Dr.Dobb's J. and a few others.
If you know of other prospective magazines looking for articles please 
let me know.
I've about 18 articles in stock and growing.
If you want to publish yourself, go ahead help yourself with the guide 
(reuse/reuse/reuse/...), we need many articles in all possibly relevant 
publications.

Soon I will start working on the new articles for 2.0, but not before 
the new site is released.

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: Net::LDAP::Extension

2002-02-27 Thread [EMAIL PROTECTED]

hi,
  Have you looked at CPAN ? once you have untarred then do a 
less *.pm . Read code assimulate. Read README.. Read INSTALL
Search Engines. Try tests. Analyse tests .. done.
Hope that helps.

Best Regards,
[EMAIL PROTECTED]

On Wed, Feb 27, 2002 at 04:37:05AM -0700, Murugan K wrote:
 Hi
  Can please  you direct me to the   Net::LDAP::Extension 
 Documentation. 
 
 Thanks in advance.
 
 Regards
 K.Murugan

-- 

/*  Security is a work in progress - dreamwvr */
# 
# Note: To begin Journey type man afterboot,man help,man hier[.]  
# 
// Who's Afraid of Schrodinger's Cat? /var/(.)?mail/me \?  ;-]




Re: Net::LDAP::Extension

2002-02-27 Thread Mark Fowler

On Wed, 27 Feb 2002, [EMAIL PROTECTED] wrote:

 hi,
   Have you looked at CPAN 

In particular you might want to have a look at search.cpan.org which will 
allow you to search for modules and read the built in documentation 
(called pod - ships with every module on CPAN) on the web before you 
install it.

http://search.cpan.org
http://search.cpan.org/search?mode=modulequery=Net::LDAP::Extension

Are you enquiring which pod in particular links to the documentation for 
Net::LDAP::Extension within the perl-ldap distribution?  Normally each 
module has it's own pod, but sometimes - when it's clearer - a collection 
of modules are described at once in other module's pod.  

Net::LDAP::Extension doesn't seem to have any pod itself, so maybe 
someone else who's used the package could point out which bit of the 
perl-ldap documentation describes it.

Mark.

-- 
s''  Mark Fowler London.pm   Bath.pm
 http://www.twoshortplanks.com/  [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t-Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t-Tgoto(cm,$_,$y). $w;select$k,$k,$k,.03}$y+=2}






Re: another article on perl.com

2002-02-27 Thread Issac Goldstand

Can I humbly suggest some articles that would lead to a guide for mod_perl
2?  I'm actually a bit embarrassed to admit that this is more out of
personal laziness than real need... I've just been so swamped lately, I've
never gotten around to looking at the API for Apache 2.0, and therefore have
no idea what to expect :-)

But it's still a useful thing to have...

  Issac

- Original Message -
From: Stas Bekman [EMAIL PROTECTED]
To: Geoffrey Young [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 5:34 PM
Subject: Re: another article on perl.com


 Geoffrey Young wrote:
  it seems mod_perl is gathering some serious momentum lately...
 
  in addition to Paul's Preventing Cross-site Scripting Attacks
  article last week
 
  http://www.perl.com/pub/a/2002/02/20/css.html
 
  we have a new article by Stas, Why mod_perl?
 
  http://perl.com/pub/a/2002/02/26/whatismodperl.html
 
  so, mod_perl is front and center on perl.com this week.
 
  nice work everyone!

 Yeah, I'm trying to push mod_perl everywhere I can. publicity never hurts.

 There is a bunch of articles I'm republishing at apacheweek.com.

 Unfortunately apachetoday.com doesn't publish anymore (but the articles
 are still available if you search the site) and perlmonth.com has gone ;(

 At this moment I'm poking Dr.Dobb's J. and a few others.
 If you know of other prospective magazines looking for articles please
 let me know.
 I've about 18 articles in stock and growing.
 If you want to publish yourself, go ahead help yourself with the guide
 (reuse/reuse/reuse/...), we need many articles in all possibly relevant
 publications.

 Soon I will start working on the new articles for 2.0, but not before
 the new site is released.

 _
 Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
 http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
 mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
 http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: another article on perl.com

2002-02-27 Thread Geoffrey Young

Issac Goldstand wrote:
 
 Can I humbly suggest some articles that would lead to a guide for mod_perl
 2?  I'm actually a bit embarrassed to admit that this is more out of
 personal laziness than real need... I've just been so swamped lately, I've
 never gotten around to looking at the API for Apache 2.0, and therefore have
 no idea what to expect :-)
 
 But it's still a useful thing to have...
 

Stas is definitely ahead of me on the 2.0 game.  really, after spending months and 
months working on
our book I haven't had the time to delve into 2.0 as much as I would like.  that, and 
with the
economy being what it is, my free time to get familiar with, contribute to, and work 
with 2.0 is
practically null...

of course, with proper funding, that could all change...

:)

--Geoff



Re: another article on perl.com

2002-02-27 Thread Stas Bekman

Issac Goldstand wrote:
 Can I humbly suggest some articles that would lead to a guide for mod_perl
 2?  I'm actually a bit embarrassed to admit that this is more out of
 personal laziness than real need... I've just been so swamped lately, I've
 never gotten around to looking at the API for Apache 2.0, and therefore have
 no idea what to expect :-)

give me some time, unless someone bits me to it. Once the new site is 
done I'll write some.

The new site already includes quite a few documents on 2.0, just give us 
a little more time as we polish things.

Just to assure you, 99.9% of the old code will run as is. Though there 
are many new things ;)




 But it's still a useful thing to have...
 
   Issac
 
 - Original Message -
 From: Stas Bekman [EMAIL PROTECTED]
 To: Geoffrey Young [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, February 27, 2002 5:34 PM
 Subject: Re: another article on perl.com
 
 
 
Geoffrey Young wrote:

it seems mod_perl is gathering some serious momentum lately...

in addition to Paul's Preventing Cross-site Scripting Attacks
article last week

http://www.perl.com/pub/a/2002/02/20/css.html

we have a new article by Stas, Why mod_perl?

http://perl.com/pub/a/2002/02/26/whatismodperl.html

so, mod_perl is front and center on perl.com this week.

nice work everyone!

Yeah, I'm trying to push mod_perl everywhere I can. publicity never hurts.

There is a bunch of articles I'm republishing at apacheweek.com.

Unfortunately apachetoday.com doesn't publish anymore (but the articles
are still available if you search the site) and perlmonth.com has gone ;(

At this moment I'm poking Dr.Dobb's J. and a few others.
If you know of other prospective magazines looking for articles please
let me know.
I've about 18 articles in stock and growing.
If you want to publish yourself, go ahead help yourself with the guide
(reuse/reuse/reuse/...), we need many articles in all possibly relevant
publications.

Soon I will start working on the new articles for 2.0, but not before
the new site is released.

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





-- 


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: another article on perl.com

2002-02-27 Thread Stas Bekman

Keith G. Murphy wrote:
 Stas Bekman wrote:
 
If you know of other prospective magazines looking for articles please
let me know.

 
 Well, on the web side of things, there's this:
 
 http://www-106.ibm.com/developerworks/
 
 They have a fair number of decent articles, including one on CGI.pm
 (under the Linux topic, for some reason).  So mod_perl should at least
 get equal time.
 
 Article submission is here:
 
 http://www-105.ibm.com/developerworks/newcontent.nsf/myidea
 

Great, thanks Keith.

For those who plan to send me prospective zines, I already have:

Dr.Dobb's Journal, New Architect (prev. Web Techniques), CNet, 
LinuxMagazine, SysAdmin, the perl review.

Those who publish the articles already are: perl.com, apacheweek.com, 
apachetoday.com.


-- 


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Making perl handlers handle non-Perl

2002-02-27 Thread Andy Lester


How can I get mod_perl to handle all Apache output, whether or not it
originates with mod_perl?

I'm writing a module that needs to analyze all output generated by Apache.
That's easy enough with stacked handlers, but I'm goofing something up
with, say, static HTML.

If I do this:

Location /test
PerlHandler MyFilter
/Location

Then static HTML gets served up OK, but MyFilter doesn't seem to get
called.  Or is it, and I'm screwing something up in the filter?

And of course if I do this:

Location /test
SetHandler  perl-script
PerlHandler MyFilter
/Location

Then I get no output because the .html files that I'm trying to serve up
out of /test aren't Perl.

Pointers please?  I've got both the Cookbook and the Eagle book if you
want to just point to a page.

Thanks,
Andy


-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]   





Re: another article on perl.com

2002-02-27 Thread Issac Goldstand

[snip]

 Just to assure you, 99.9% of the old code will run as is. Though there
 are many new things ;)

 Actually, that's what I'm interested in...  I've mentioned on the IRC room
on a number of occasions, that I'd like to try to use the new threaded
interface to try to design some new innovative types of WebApps, based on
IPC or shared memory pools...  Every once in a while I decide to start
looking into it, and then just as quickly put off delving into the Apache
2.0 API...  Oh well... It can wait, I suppose :)

  Issac




Re: another article on perl.com

2002-02-27 Thread clayton cottingham

Stas Bekman wrote:
 
 Keith G. Murphy wrote:
  Stas Bekman wrote:
 
 If you know of other prospective magazines looking for articles please
 let me know.
 
 
  Well, on the web side of things, there's this:
 
  http://www-106.ibm.com/developerworks/
 
  They have a fair number of decent articles, including one on CGI.pm
  (under the Linux topic, for some reason).  So mod_perl should at least
  get equal time.
 
  Article submission is here:
 
  http://www-105.ibm.com/developerworks/newcontent.nsf/myidea
 
 
 Great, thanks Keith.
 
 For those who plan to send me prospective zines, I already have:
 
 Dr.Dobb's Journal, New Architect (prev. Web Techniques), CNet,
 LinuxMagazine, SysAdmin, the perl review.
 
 Those who publish the articles already are: perl.com, apacheweek.com,
 apachetoday.com.
 


what about slashdot and perlmonks?


 --
 
 _
 Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
 http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
 mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
 http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



Re: Making perl handlers handle non-Perl

2002-02-27 Thread Geoffrey Young

Andy Lester wrote:
 
 How can I get mod_perl to handle all Apache output, whether or not it
 originates with mod_perl?
 
 I'm writing a module that needs to analyze all output generated by Apache.
 That's easy enough with stacked handlers, but I'm goofing something up
 with, say, static HTML.
 
 If I do this:
 
 Location /test
 PerlHandler MyFilter
 /Location
 
 Then static HTML gets served up OK, but MyFilter doesn't seem to get
 called.  Or is it, and I'm screwing something up in the filter?
 
 And of course if I do this:
 
 Location /test
 SetHandler  perl-script
 PerlHandler MyFilter
 /Location
 
 Then I get no output because the .html files that I'm trying to serve up
 out of /test aren't Perl.
 
 Pointers please?  I've got both the Cookbook and the Eagle book if you
 want to just point to a page.
 

ok, SetHandler sets a content handler for a given Location - it supersededs 
everything else.

unlike with normal Apache, mod_perl needs two things in order for your handler to be 
called:
the content hander to be perl-script (for Apache) and the name of your handler with 
PerlHandler (for
mod_perl)

you probably want to do something with AddHandler instead of SetHandler

AddHandler .pl perl-script

you can also use Files sections instead of Location

see the later part of Recipe 14.2 gets into this somewhat.  Apache::MIMEMapper might 
also be of help
since, among other things, integrates with Apache::Filter easily...

HTH

--Geoff



Re: Making perl handlers handle non-Perl

2002-02-27 Thread Andy Lester

 ok, SetHandler sets a content handler for a given Location - it supersededs 
everything else.

 unlike with normal Apache, mod_perl needs two things in order for your handler to be 
called:
 the content hander to be perl-script (for Apache) and the name of your handler with 
PerlHandler (for
 mod_perl)

So what we're saying is that with static .html files, there's no way for
me to get mod_perl to interject itself into Apache's chain?  Or PHP for
that matter?

I want my MyFilter to process EVERYTHING that Apache spits out, whether
with mod_perl, mod_php or just reading a .html file from the filesystem,
especially the mod_php stuff.

Should I be looking at one of the later phases (cleanup?) instead of
content generation?

Thanks,
Andy

-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]   





Re: Status of mod_perl 2.0

2002-02-27 Thread Issac Goldstand

Which gives me another nice idea for articles... How about some pointers in
thread safety with Apache/Perl... What you sould and should not do?

  Issac

- Original Message -
From: Stas Bekman [EMAIL PROTECTED]
To: Jeff Stuart [EMAIL PROTECTED]
Cc: Mod Perl Devel List [EMAIL PROTECTED]; Mod perl mailing list
[EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 8:00 PM
Subject: Re: Status of mod_perl 2.0


 Jeff Stuart wrote:
  Question?  What is the status of mod_perl 2.0?  Also, is it working
  with/playing with Apache 2.0 at all?

 Tell me what's the status of apache 2.0 and I'll tell you the status of
 mod_perl 2.0 :)
 But seriously mod_perl 2.0 will be ready about the time apache 2.0 (i.e.
 httpd-2.0) gets released.

 You can start playing with it already. I've successfully run my
 singlesheaven.com code using mod_perl 2.0 a few months ago. And there
 are many tests, so you can see what works and what not. Registry is
 almost completed, a few thread-safety issues unresolved (e.g. chdir() in
 the threaded env).

 If you plan on adding a testing platform for you product, make sure to
 use the Apache::Test framework from 2.0 distro, which rocks!

 _
 Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
 http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
 mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
 http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





Articles

2002-02-27 Thread Andy Lester


Don't forget the fledgling The Perl Review, available at
http://www.theperlreview.com/  We're always lookin' for good stuff...

Andy

-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]   





Re: Status of mod_perl 2.0

2002-02-27 Thread Jeff Stuart

On Wed, 2002-02-27 at 13:00, Stas Bekman wrote:
 Jeff Stuart wrote:
  Question?  What is the status of mod_perl 2.0?  Also, is it working
  with/playing with Apache 2.0 at all?  
 
 Tell me what's the status of apache 2.0 and I'll tell you the status of 
 mod_perl 2.0 :)
 But seriously mod_perl 2.0 will be ready about the time apache 2.0 (i.e. 
 httpd-2.0) gets released.
 
 You can start playing with it already. I've successfully run my 
 singlesheaven.com code using mod_perl 2.0 a few months ago. And there 
 are many tests, so you can see what works and what not. Registry is 
 almost completed, a few thread-safety issues unresolved (e.g. chdir() in 
 the threaded env).
 
 If you plan on adding a testing platform for you product, make sure to 
 use the Apache::Test framework from 2.0 distro, which rocks!
 
 _
 Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
 http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
 mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
 http://singlesheaven.com http://perl.apache.org http://perlmonth.com/

Heh... status of Apache 2.0?  WHO Knows? LOL




Re: Making perl handlers handle non-Perl

2002-02-27 Thread Geoffrey Young

Andy Lester wrote:
 
  ok, SetHandler sets a content handler for a given Location - it supersededs 
everything else.
 
  unlike with normal Apache, mod_perl needs two things in order for your handler to 
be called:
  the content hander to be perl-script (for Apache) and the name of your handler 
with PerlHandler (for
  mod_perl)
 
 So what we're saying is that with static .html files, there's no way for
 me to get mod_perl to interject itself into Apache's chain?  Or PHP for
 that matter?

oh, no.

if you want to intercept absolutely _everything_ I suspect that 

SetHandler perl-script 

at the server level will do the trick (outside of any Location or
other container directive).  just make sure you have a 

PerlHandler My::Foo

somewhere to fill in the mod_perl part, since mod_perl needs both
directives to work.

typically, folks don't want to intercept all requests - it's generally
better to let Apache serve static files itself so that it handles
stuff like HTTP/1.1 conditional headers and the like.

 
 I want my MyFilter to process EVERYTHING that Apache spits out, whether
 with mod_perl, mod_php or just reading a .html file from the filesystem,
 especially the mod_php stuff.
 
 Should I be looking at one of the later phases (cleanup?) instead of
 content generation?

the content-generation phase should be fine.

HTH

--Geoff



Re: Making perl handlers handle non-Perl

2002-02-27 Thread Perrin Harkins

Andy Lester wrote:
 I want my MyFilter to process EVERYTHING that Apache spits out, whether
 with mod_perl, mod_php or just reading a .html file from the filesystem,
 especially the mod_php stuff.

Assuming you mean you want to look at the generated content from 
non-mod_perl handlers and do something with it, apache doesn't work that 
way.  Apache 2.0 does, but that won't help you right now.  You might try 
using a proxy server setup to do this instead.

- Perrin




Re: Status of mod_perl 2.0

2002-02-27 Thread Stas Bekman

Issac Goldstand wrote:
 Which gives me another nice idea for articles... How about some pointers in
 thread safety with Apache/Perl... What you sould and should not do?

please refer to the [EMAIL PROTECTED] list archives, there were quite 
long discussions there.

   Issac
 
 - Original Message -
 From: Stas Bekman [EMAIL PROTECTED]
 To: Jeff Stuart [EMAIL PROTECTED]
 Cc: Mod Perl Devel List [EMAIL PROTECTED]; Mod perl mailing list
 [EMAIL PROTECTED]
 Sent: Wednesday, February 27, 2002 8:00 PM
 Subject: Re: Status of mod_perl 2.0
 
 
 
Jeff Stuart wrote:

Question?  What is the status of mod_perl 2.0?  Also, is it working
with/playing with Apache 2.0 at all?

Tell me what's the status of apache 2.0 and I'll tell you the status of
mod_perl 2.0 :)
But seriously mod_perl 2.0 will be ready about the time apache 2.0 (i.e.
httpd-2.0) gets released.

You can start playing with it already. I've successfully run my
singlesheaven.com code using mod_perl 2.0 a few months ago. And there
are many tests, so you can see what works and what not. Registry is
almost completed, a few thread-safety issues unresolved (e.g. chdir() in
the threaded env).

If you plan on adding a testing platform for you product, make sure to
use the Apache::Test framework from 2.0 distro, which rocks!

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-- 


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: Making perl handlers handle non-Perl

2002-02-27 Thread Andy Lester

 Assuming you mean you want to look at the generated content from
 non-mod_perl handlers and do something with it, apache doesn't work that
 way.  Apache 2.0 does, but that won't help you right now.  You might try
 using a proxy server setup to do this instead.

THAT'S the answer I was looking for.  Not what I wnated, but at least it
answers my question. :-)

So, my HTML::Lint checking is only going to work on output from the
mod_perl chain.  I guess that's better than nothing, but I've got plenty
of PHP code that I'd like to filter thru it as well.

Thanks, all.

Andy

-- 
%_=split/;/,.;;n;u;e;ot;t;her;c; .   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
hack;print map delete$_{$_},split//,q   [EMAIL PROTECTED]   





Re: Making perl handlers handle non-Perl

2002-02-27 Thread Geoffrey Young

Perrin Harkins wrote:
 
 Andy Lester wrote:
  I want my MyFilter to process EVERYTHING that Apache spits out, whether
  with mod_perl, mod_php or just reading a .html file from the filesystem,
  especially the mod_php stuff.
 
 Assuming you mean you want to look at the generated content from
 non-mod_perl handlers and do something with it, apache doesn't work that
 way.  Apache 2.0 does, but that won't help you right now.  You might try
 using a proxy server setup to do this instead.

ah, yes.  right, you can't intercept the output of other content
handlers, like mod_php or mod_cgi.  you can get to stuff handled by
mod_perl via Apache::Filter, or stuff that would be handled by core
Apache by manipulating the resource on disk directly (using
$r-filename), but that's about it.  at least for 1.3 (though I've
always been curious how mod_gzip works with 1.3)

seems I had my brain in the wrong place - thanks Perrin.

--Geoff



Re: Making perl handlers handle non-Perl

2002-02-27 Thread Perrin Harkins

Andy Lester wrote:
 So, my HTML::Lint checking is only going to work on output from the
 mod_perl chain.

If you aren't terribly concerned about performance, there are several 
Apache::Proxy modules which should be easy to modify to put your lint 
checking in.  Do a search for proxy on CPAN to see what's out there.

- Perrin




Status of mod_perl 2.0

2002-02-27 Thread Jeff Stuart

Question?  What is the status of mod_perl 2.0?  Also, is it working
with/playing with Apache 2.0 at all?  




Re: Status of mod_perl 2.0

2002-02-27 Thread Stas Bekman

Jeff Stuart wrote:
 Question?  What is the status of mod_perl 2.0?  Also, is it working
 with/playing with Apache 2.0 at all?  

Tell me what's the status of apache 2.0 and I'll tell you the status of 
mod_perl 2.0 :)
But seriously mod_perl 2.0 will be ready about the time apache 2.0 (i.e. 
httpd-2.0) gets released.

You can start playing with it already. I've successfully run my 
singlesheaven.com code using mod_perl 2.0 a few months ago. And there 
are many tests, so you can see what works and what not. Registry is 
almost completed, a few thread-safety issues unresolved (e.g. chdir() in 
the threaded env).

If you plan on adding a testing platform for you product, make sure to 
use the Apache::Test framework from 2.0 distro, which rocks!

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: Making perl handlers handle non-Perl

2002-02-27 Thread Nico Erfurth

Andy Lester wrote:

 How can I get mod_perl to handle all Apache output, whether or not it
 originates with mod_perl?
 
 I'm writing a module that needs to analyze all output generated by Apache.
 That's easy enough with stacked handlers, but I'm goofing something up
 with, say, static HTML.
 
 If I do this:
 
 Location /test
 PerlHandler MyFilter
 /Location
 
 Then static HTML gets served up OK, but MyFilter doesn't seem to get
 called.  Or is it, and I'm screwing something up in the filter?
 
 And of course if I do this:
 
 Location /test
   SetHandler  perl-script
 PerlHandler MyFilter
 /Location
 
 Then I get no output because the .html files that I'm trying to serve up
 out of /test aren't Perl.
 
 Pointers please?  I've got both the Cookbook and the Eagle book if you
 want to just point to a page.


Just an idea

Jou could try to set a location handler for

LocationMatch /*
   SetHandler perl-script
   PerlHandler My::HandleEverything
/LocationMatch

your handler could tie the output-handle (is this possible?) and run a 
subrequest.

Now it could intercept the output (written to the handle) and do 
changes, or tidy it up, whatever you want..
And at least, it should return DECLINE, if it isn't the main-request

/Just an idea

I'm not sure if this will work, because of the needed tie of the outputhandle and so 
on,

maybe anyone else can give a better statement ;)))


-- 
Mit freundlichen Grüßen
-
Nico Erfurth
Headlight Housingfactory GmbH
Email: [EMAIL PROTECTED]
-






Re: Making perl handlers handle non-Perl

2002-02-27 Thread Perrin Harkins

Nico Erfurth wrote:
 your handler could tie the output-handle (is this possible?) and run a 
 subrequest.

Nope, not possible.  You can only do that for mod_perl requests.

- Perrin




[DIGEST] mod_perl digest 2002/02/17

2002-02-27 Thread jgsmith

--

  mod_perl digest
 
February 17, 2002 - February 23, 2002

--

Recent happenings in the mod_perl world...


Features

  o mod_perl status
  o module announcements
  o module RFCs
  o mod_perl jobs
  o mailing list highlights
  o links


mod_perl status

  o mod_perl
- stable: 1.26 (released July 11, 2001) [1]
- development: 1.26_01-dev [2]
  o Apache
- stable: 1.3.23 (released January 24, 2002) [3]
- development: 1.3.24-dev [4]
  o mod_perl 2.0
- in development (cvs only) [?]
  o Apache 2.0
- beta: 2.0.32 (released February 14, 2002) [5]
  o Perl
- stable: 5.6.1 (released April 9, 2001) [6]
- development: 5.7.2 [7]

module announcements

  o Bricolage-Devel 1.3.0 - content management system [8]

  o libapreq 1.0 - Apache request/cookie library [9]


module RFCs

  o Apache::Site - yet another application framework [10]


mod_perl jobs

  o Web Site Development in Downtown Toronto [11]


mailing list highlights

  o Apache::TaintRequest article on perl.com [12]

  o ApacheCon 2002 [13]


links

  o The Apache/Perl Integration Project [14]
  o mod_perl documentation [15]
  o mod_perl modules on CPAN [16]
  o mod_perl homepage [17]
  o mod_perl news and advocacy [18]
  o mod_perl list archives
  - modperl@ [19] [20] 
  - dev@ [21] [22]
  - advocacy@ [23]


happy mod_perling...

--James
[EMAIL PROTECTED]

--
[1] http://perl.apache.org/dist/
[2] http://perl.apache.org/from-cvs/modperl/
[3] http://www.apache.org/dist/httpd/
[4] http://dev.apache.org/from-cvs/apache-1.3/
[5] http://www.apache.org/dist/httpd/
[6] http://www.cpan.org/src/stable.tar.gz
[7] http://www.cpan.org/src/devel.tar.gz 

[8] http://mathforum.org/epigone/modperl/krykrahsherd
[9] http://mathforum.org/epigone/modperl/slorkhardwoo

[10] http://mathforum.org/epigone/modperl/strerdchexblyr

[11] http://mathforum.org/epigone/modperl/whilskaldflong

[12] http://mathforum.org/epigone/modperl/ghonphaisha
[13] http://mathforum.org/epigone/modperl/blimpproowhoy

[14] http://perl.apache.org
[15] http://perl.apache.org/#docs
[16] http://www.cpan.org/modules/by-module/Apache/
[17] http://www.modperl.com
[18] http://www.take23.org
[19] http://mathforum.org/epigone/modperl/
[20] http://marc.theaimsgroup.com/?l=apache-modperlr=1w=2
[21] http://marc.theaimsgroup.com/?l=apache-modperl-devr=1w=2
[22] http://www.mail-archive.com/dev%40perl.apache.org/
[23] http://www.mail-archive.com/advocacy@perl.apache.org/



virtual host server root

2002-02-27 Thread Rick Myers

I'm trying to create a root directory for each of my
virtuals. The reason is that there's plenty of stuff within
the realm of the virtual that certainly shouldn't be within
the document root -- templates, cache, logs, etc. Plus, I
might want to point a virtual into a user dir somewhere.

I've come up with three solutions, none of which I
particularly like for various reasons.

- PerlSetVar VRoot /someplace
Simple, but I've always had a distaste for
PerlSetVar for some reason. *shrug*

- VRoot /someplace
Not as simple. Requires yet another module to
implement and adds even more overhead to the server
conf file.

- ServerPath /someplace
Pretty simple Server.xs hack, but probably never
supported. Also might open up security holes.

Is anybody else doing this sort of thing?

--rick




how to disable mod_perl in a subdir?

2002-02-27 Thread Dan Baker

I am working with a host that has everything under /cgi-bin running
mod_perl by default, and well as using EmbPerl to run the dynamic pages.
Unfortunately, I have a set of scripts that really need regular perl,
and I can't seem to figure out the configuration to  disable mod_perl in
a specific directory that needs
regular perl. ;( 

I tried this in the httpd.conf file:
Directory /home/mydomain/cgi-bin/webadmin/
  SetHandler default-handler
  AddHandler cgi-script .pl
  AllowOverride All
/Directory 

and then ALSO editted a .htaccess file in
/home/mydomain/cgi-bin/webadmin/ to include:
  options +ExecCGI
  RemoveHandler perl-script
  SetHandler cgi-script 
  AddHandler cgi-script .pl

and it still tries to use mod_perl?!

SERVER_SOFTWARE = Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1
OpenSSL/0.9.6 mod_perl/1.24_01 

PLEASE let me know if there is a way to configure so that a specific
sub-dir uses regular perl.

Dan



Re: how to disable mod_perl in a subdir?

2002-02-27 Thread Marc Slagle

Maybe you can try Apache::PerlRun instead of Apache::Registry for the
directories that you need to run those scripts.  The perldocs show how to
set it up.

Marc Slagle

- Original Message -
From: Dan Baker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 11:14 PM
Subject: how to disable mod_perl in a subdir?


 I am working with a host that has everything under /cgi-bin running
 mod_perl by default, and well as using EmbPerl to run the dynamic pages.
 Unfortunately, I have a set of scripts that really need regular perl,
 and I can't seem to figure out the configuration to  disable mod_perl in
 a specific directory that needs
 regular perl. ;(

 I tried this in the httpd.conf file:
 Directory /home/mydomain/cgi-bin/webadmin/
   SetHandler default-handler
   AddHandler cgi-script .pl
   AllowOverride All
 /Directory

 and then ALSO editted a .htaccess file in
 /home/mydomain/cgi-bin/webadmin/ to include:
   options +ExecCGI
   RemoveHandler perl-script
   SetHandler cgi-script
   AddHandler cgi-script .pl

 and it still tries to use mod_perl?!

 SERVER_SOFTWARE = Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1
 OpenSSL/0.9.6 mod_perl/1.24_01

 PLEASE let me know if there is a way to configure so that a specific
 sub-dir uses regular perl.

 Dan





Re: another article on perl.com

2002-02-27 Thread Joe Brenner


clayton cottingham [EMAIL PROTECTED] wrote:

 what about slashdot and perlmonks?

When I finish reading the Mod_perl Developer's Cookbook, 
I was planning on writing a review and submitting it to
slashdot (presuming no one beats me to it). 

I'm not calling dibs or anything, just making a promise that
I'll do it if no one else does. 




PerlFreshRestart bug - comments please

2002-02-27 Thread Sreeji K Das

Hi

I didn't get a response for my first post :-( So I'm
making another try (Sorry for cross-posting - but I
guess it's relevant to dev list as well)

PerlFreshRestart (is anyone using this feature ?) was
giving me a lot of problems giving a lot of 'Undefined
Subroutine' errors when I restart (USR1) httpd. I
found that it's due to a bug in mod_perl (perl_util.c
- perl_reload_inc()).

ie. the following seems to be  wrong:
while (($k, $v) = each(%INC))
{
 delete($INC{$k}); eval(require $k);
}

When you do a require $k, any further 'use' or
'require' in $k will not be loaded, since they are
already loaded as per %INC. However that's not the
case, since I've used Apache::Symbol to undefine all
those (otherwise I'd get a Subroutine redefined error)
in PerlRestartHandler.

mod_perl-1.19 seems to implement it correctly - but
that part of the code was removed in later versions -
Any idea why ?
ie. there was this line
GvHV(incgv) = Nullhv;
in perl_util.c (perl_reload_inc), but was removed on
later versions.
So basically I reintroduced this line to the current
version (mod_perl-1.26)  the problems are gone.
Can this patch go into the next version ? I guess this
is the reason for so many 'Evil things' happening if
Restart was on ?

I'd like to get some comments before I put this change
to production.

Expecting a reply this time 
Thanx
Sreeji

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com