Re: Platform list
On Sun, 18 Jun 2000, Matt Sergeant wrote: > Does anyone have a definitive list of working platforms for mod_perl? I > realise its probably just a simple combination of the platforms that both > Perl and Apache work on, but I was wondering if theres a simple list > anywhere (I've looked, but can't find one). Should be an easy task if netcraft keeps this info. Just inquire them. > If not, perhaps it would be a cool idea to do the same sort of thing that > Perl does: The test suit upon pass or fail sends a mail to the list > stating pass/fail and the test output for failures. This can then be > compiled into working and broken platforms. (note that "platforms" in this > case can mean more than just "Linux" - it can mean "Linux + ithreads" or > "Linux + usemymalloc" etc). > > -- > > > Fastnet Software Ltd. High Performance Web Specialists > Providing mod_perl, XML, Sybase and Oracle solutions > Email for training and consultancy availability. > http://sergeant.org | AxKit: http://axkit.org > > _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://perl.org http://stason.org/TULARC http://singlesheaven.com http://perlmonth.com http://sourcegarden.org
Re: Platform list
On Sun, 18 Jun 2000, Matt Sergeant wrote: > Does anyone have a definitive list of working platforms for mod_perl? I > realise its probably just a simple combination of the platforms that both > Perl and Apache work on, but I was wondering if theres a simple list > anywhere (I've looked, but can't find one). > There's some platforms listed at http://testers.cpan.org/search?request=dist&dist=mod_perl - mostly linux (of various flavours), solaris, and MSWin32. The lack of other platforms probably is more a reflection of a lack of testers willing/able to do the testing. best regards, randy kobes
Re: [OT] Making apps (un)available solution
On Tue, 13 Jun 2000, Erich L. Markert wrote: > I'm trying to figure out the best way to make apps (un)available without > having to edit the apache config files. We did something like this by making a handler like this: package Foo::PerlHandler; use Class::MethodMaker new_with_init => 'new', get_set => [qw/request/]; sub handler { my ($class, $r) = @_; ($class, $r) = (__PACKAGE__, $class) unless defined $r; if (-f /tmp/foo.unavailable) { $r->headers_out->add('Location', '/maintenance/index.html'); return REDIRECT; } my $this = $class->new($r); $this->service; } sub init { my ($this, $r) = @_; $this->request($r); } sub service { die "service is virtual!\n"; } __END__ Then in our actual apps, we inherit Foo::PerlHandler: package Foo::MyApp; use Foo::PerlHandler; @ISA = qw(Foo::PerlHandler); sub handler { my ($class, $r) = @_; ($class, $r) = (__PACKAGE__, $class) unless defined $r; # do pre-request things specific to Foo::MyApp return $class->SUPER::handler($r); } sub service { my ($this) = @_; my $r = $this->request; # do whatever here that you would do in your handler. } __END__ In httpd.conf: SetHandler perl-script PerlHandler Foo::MyApp In actuality, we usually dont have to even define a handler() in our application classes because the one provided by Foo::PerlHandler does everything we need. Occasionally it is useful to do overload it though (which is why I show the simple example above. The benefit of this is that as long as all of our applications make use of Foo::PerlHandler as their parent class, then we can shut down all applications and make them redirect to /maintenance/index.html by simply doing "touch /tmp/foo.unavailable" on the web server(s). No need to restart, no need to fiddle with config files. To make the applications available again, just "rm /tmp/foo.unavailable" and requests are not redirected to the maintenance page anymore. Anyways, this is how we decided to deal with this issue. Theres lots of other ways I am sure :). Mike
Platform list
Does anyone have a definitive list of working platforms for mod_perl? I realise its probably just a simple combination of the platforms that both Perl and Apache work on, but I was wondering if theres a simple list anywhere (I've looked, but can't find one). If not, perhaps it would be a cool idea to do the same sort of thing that Perl does: The test suit upon pass or fail sends a mail to the list stating pass/fail and the test output for failures. This can then be compiled into working and broken platforms. (note that "platforms" in this case can mean more than just "Linux" - it can mean "Linux + ithreads" or "Linux + usemymalloc" etc). -- Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org