I have tried to install that PHP interpreter under Windows, but it gave some
bad errors. Isn't it working under Windows?
Teddy
- Original Message -
From: "Nikolay Ananiev" <[EMAIL PROTECTED]>
To:
Sent: Saturday, August 20, 2005 23:16 PM
Subject: Re: mod_perl and php
> As I read again
As I read again, this can't be done. Anyway, it seems to be a great tool,
but is it really usable with mod_perl? Does the php interpreter take a lot
of memory?
"Nikolay Ananiev" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This is great! If it really works I can use it to create m
On Sat, 2005-08-20 at 15:17 -0400, Christopher H. Laco wrote:
> I do have a start_document sub, so if I always reset my @context = () in
> that, I should be fine.
This will only work if you do something like this:
my @context;
sub do_something {
push @context
}
sub reset_context {
On Sat, 2005-08-20 at 15:09 -0400, Christopher H. Laco wrote:
> I want all subs in the module to share the stagte of one variable...in
> my case @context.
>
> I also want any changes to @context to only effect the current
> user/request under mod_perl.
>
> What's the best approach?
Either pass
Christopher H. Laco wrote:
So, let's reverse this.
I have a module that will be used in perl.
I want all subs in the module to share the stagte of one variable...in
my case @context.
I also want any changes to @context to only effect the current
user/request under mod_perl.
What's the bes
Perrin Harkins wrote:
On Sat, 2005-08-20 at 19:44 +0200, Frank Maas wrote:
package A::B::C;
my %CFG = ( some_tag => some_config, ... }
...
sub do_something {
...
do_something_else( $CFG{some_tag} );
...
}
...
1;
After reading much of this discussion I am beginning to wonder if I am
creatin
Generally I make it a habit to pass the data explicitly:
package A::B::C;
my %CFG = ( some_tag => some_config, ... }
...
do_something( \%CFG );
sub do_something {
...
my $CFG = shift;
do_something_else( $CFG->{some_tag} );
...
}
...
1;
Boysenberry
boysenberrys.com |
On Sat, 2005-08-20 at 19:44 +0200, Frank Maas wrote:
> package A::B::C;
> my %CFG = ( some_tag => some_config, ... }
> ...
> sub do_something {
> ...
> do_something_else( $CFG{some_tag} );
> ...
> }
> ...
> 1;
>
> After reading much of this discussion I am beginning to wonder if I am
> crea
Guys,
I am getting a bit nervous and since it is Saturday and I am -1 day before
a deadline, this is not good. So, although this thread (and my question) is
drifting towards basic Perl, I try my luck.
I make use of the following construction
package A::B::C;
my %CFG = ( some_tag => some_config,
On Sat, 2005-08-20 at 12:55 -0400, Todd Finney wrote:
> This is probably just an issue of style, but avoiding stuff like this...
>
> our $x=10;
>
> 600 lines of code...
>
> sub foo {
> return $x++;
> }
> &foo();
>
> ...strikes me as common sense.
Sometimes you actually need a pers
Boysenberry Payne wrote:
If you worried about @context persisting my @context ought to keep it
local to the scope
@context is declared in unless you register it as a global while
manipulating it.
This is technically true, but confusing. Because the pushcontext() sub
below refers to a variabl
Christopher H. Laco wrote:
You're right. This got convoluted. Let's start over.
package MyApp;
my @context;
sub dosomething {
push @context, 'doingsomething';
};
1;
When this module is loaded into MP then given to each child process, for
each request the user makes to a page
Todd Finney wrote:
Perhaps I'm just underinformed, but using a variable in a subroutine
without declaring it or passing it in seems like asking for weird bugs.
Or asking for a persistent variable. Usually "our $color" is a bit
clearer for that though.
- Perrin
Please tell me how I can test:
- Why that 404 error appears
- Why sometimes it takes so long to display the same kind of page
other
times displays much faster
- How can I test where the script hangs, which part of the script
is so slow
I'd look into your apache error logs
you can also d
You're right. This got convoluted. Let's start over.
package MyApp;
my @context;
sub dosomething {
push @context, 'doingsomething';
};
1;
When this module is loaded into MP then given to each child process, for
each request the user makes to a page that calls dosomething(
In Devel::Leak's doc is it gives the following example:
use Devel::Leak;
... setup code
my $count = Devel::Leak::NoteSV($handle);
... code that may leak
Devel::Leak::CheckSV($handle);
What would $handle be?
sub handler {
my $r = shift;
}
Would it be $r?
Boysenberry
boysenberrys
I was just showing you an example to explain the scoping.
In a working situation it just depends on what you need @context for.
my @context allows you to declare @context local to where ever it's
declared. So:
my @context = qw( test1 );
{
@context = qw( test2 )
print @context
If you worried about @context persisting my @context ought to keep it
local to the scope
@context is declared in unless you register it as a global while
manipulating it. In other
words it should stay only as long as the scope it's declared in. So
that:
package MyMod1;
my @context = qw( test
On Sat, 2005-08-20 at 08:28 -0400, Christopher H. Laco wrote:
> Huh? Now I'm really confused. MyMod2 calls MyMod1::dosomething alters
> it's own @context (it should've been push @context, 'foo')...
>
> MyMod2 calls MyMod1::pushcontext('anotherfoo') to also alter MyMod1s
> @context.
I've lost tr
Perrin Harkins wrote:
On Fri, 2005-08-19 at 20:55 -0400, Christopher H. Laco wrote:
So, changing to
package MyMod;
my @context;
sub dosomething {
push @context;
#...do other stuff..
};
sub pushcontext {
push @context, shift;
};
1;
Woudld fix the persistance is
Hi,
I have made a site using mod_perl with ModPerl::Registry.
It works much faster than using a simple cgi script, but it still works slow
sometimes and I would like to change some things.
There are 3 situations:
1. The page is displayed pretty fast (less than a second)
2. The same kind of pag
On Wed, Jun 08, 2005 at 12:00:01AM +1000, Stas Bekman wrote:
> Great! William, can you please write a new entry for the troubleshooting
> chapter? With a full diagnosis and the solution? Really it should belong
> to the Apache-Test troubleshooting, but as at the moment it doesn't exist,
> we wil
This is great! If it really works I can use it to create modules for php
nuke and other portal systems for my perl applications.
"Jonathan Vanasco" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> there was a lot of talk on this about 2 weeks ago
>
> for those who were battling with t
23 matches
Mail list logo