Re: apache::request and other newbie questions

2001-11-02 Thread Nouguier Olivier



John Michael wrote:

I have a modperl script that uses.
cgi.pm and actually I have been importing my on cgi params from get and
post but do use cgi.pm for cookies. I have read in some other emails
and now in the guide that it is faster to use Apache::Request so I want
to change my script over to this method since it will eventually come under
a heavy load. I added this to my perl.conf filePerlModule Apache::Request
and apache says that it can not find the module in
@INC (@INC contains: /etc/httpd/lib/perl /usr/lib/perl5/5.6.0/i386-linux
/usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl . /etc/httpd/)
sure enough, I looked in there and it isn't.
I went to the module list and the list claims that apache::request is
included with the standard dist of mod perl.
I'm running Apache 1.3.9 and mod_perl/1.24_01
What should I do? Also, I have a script that is running under apache::registry.I
run the script by using a mod-actions handler that I have in my httpd.conf
file like so.The script runs from a blank index.htm page and creates the
dynamic output depending on the referring url and query-stringDirectory
"/home/usr1/digital/membersurl/html/protected">

Apache::Request is not shipped with mod_perl ...
Take a look at CPAN ...
Or http://httpd.apache.org/apreq/

AddHandler RTS-protected-htm htm
Action RTS-protected-htm /perl/content_manager/handler.pl
/Directory>
I imagine this is not very efficient?
I guess I will eventually have to set it up as a hander?
What is your opinion?

Personnaly, I prefer a very simple handler, using ( owned ) libs,
than a "script.pl", that much easy to maintains

I'm new to packages and modules and have basically little experience
with OOP. The script works fine with no errors, but I expect a heavy
load in the future. I eventually want to have the correct solution but
I'm trying to beat the learning curve before the traffic gets there.
Can I set up the script now as a handler
or does it have to be written in OO format?
I do understand that a few things have
to be changed, like I have to use apache::constants to finalize the handler
phase.
Reading several books and understanding
more and more everyday.
Any suggestions would be greatly appreciated.
Thanks
John Michael

--
My mother always used to tell me, "The early bird gets the worm."
The message seemed pretty clear to me: If you sleep late, you're
a lot less likely to be killed by a bird.
 -- Elliott Downing






Re: [Fwd: Help with @ISA]

2001-08-06 Thread Nouguier Olivier

Hi all,

Don't we need to load the module before using it?

With:

PerlModule My::Module::Name
Location /foo
SetHandler perl-script
PerlHandler My::Module::Name
/Location
## OR  
Location /foo
SetHandler perl-script
PerlHandler +My::Module::Name
/Location
#

Stas Bekman wrote:


 I don't understand why have sent your email as an attachement... how do
 you want us to quote it?

 Anyway:

 Location /foo
 SetHandler perl-script
 PerlHandler my::foo-cookie_check()
 /Location

 s/my::foo-cookie_check/my::foo::cookie_check/ - since it's not a method,
 $r is merely passed to the handler.

 And read the eagle book about stacked handlers if that's what you want.

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

--
My mother always used to tell me, The early bird gets the worm.
The message seemed pretty clear to me: If you sleep late, you're
a lot less likely to be killed by a bird.
-- Elliott Downing






Re: cached value !!

2001-07-26 Thread Nouguier Olivier

raptor wrote:

 hi,

 I have the following problem... a module/object that use a callback
 func..example :

 use Blah;
 my $obj = new Blah(...);

 ..later on ...

 my $firstcall = 1;
 sub checkSomething {
 if ($firstcall) {$firstcall = 0; return 0}
code ...
 };

 $$obj{checkCode} = \checkSomething;

 $obj-callSomemethod();

 the problem is that during the invocations of the script the $firstcall
 sometimes stays 0, instead to be initialised to 1 on every invocation of
 the script  any ideas how can I cure this 

 Thanx alot in advance...
 =
 iVAN
 [EMAIL PROTECTED]
 =

cf manual:
http://perl.apache.org/guide/perl.html#my_Scoped_Variable_in_Nested_S

--
My mother always used to tell me, The early bird gets the worm.
The message seemed pretty clear to me: If you sleep late, you're
a lot less likely to be killed by a bird.
-- Elliott Downing






Re: Child Interprocess Data

2001-07-25 Thread Nouguier Olivier

Kevin Schroeder wrote:

 Hi,I want to create a program for mod_perl that shares information
 in between all the child processes so they all have current
 information.  The data will be stored in a MySQL database, but rather
 than query the DB each time which, due to the kind of server load,
 would work but would be somewhat needless, I would like to have a
 certain amount of data stored within the server and accessable to all
 the Apache processes. Could someone point me in the right
 direction to start? Kevin

Hi,
IPC::ShareLite is your friend

--
My mother always used to tell me, The early bird gets the worm.
The message seemed pretty clear to me: If you sleep late, you're
a lot less likely to be killed by a bird.
-- Elliott Downing






Re: Perl::Flash PerlFlash

2001-07-20 Thread Nouguier Olivier

Jónas Tryggvi Jóhannsson wrote:

 P.S. If anyone knows about any other PERL Flash modules, please don't
 hesitate to mention them ;)


hi,
Look at http://www.opaque.net/ming/ there is perl a binding that works well

--
My mother always used to tell me, The early bird gets the worm.
The message seemed pretty clear to me: If you sleep late, you're
a lot less likely to be killed by a bird.
-- Elliott Downing