Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-21 Thread Michael Ludwig
Perrin Harkins schrieb: On Tue, Jan 20, 2009 at 4:19 PM, Michael Ludwig wrote: On the other hand, performance isn't what you'd call great, as access to the database is effectively serialized. Are you sure about that? I'm sure about the queries seeming *effectively* serialized, judging from

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-20 Thread Perrin Harkins
On Tue, Jan 20, 2009 at 4:19 PM, Michael Ludwig wrote: > On the other hand, performance isn't what you'd call great, as access to > the database is effectively serialized. Are you sure about that? Berkeley DB doesn't work that way. It has read and write locks which can be set to work at a (memo

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-20 Thread Michael Ludwig
A sidenote: I've built more or less the same Apache as a prefork MPM, and I'm not seeing any SEGVs any more. On the other hand, performance isn't what you'd call great, as access to the database is effectively serialized. Thirty queries will take thirty seconds, regardless of concurrency level.

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-20 Thread Michael Ludwig
Mark Hedges schrieb: Just curious, did you try eliminating every other module that you might be loading (anywhere in any module loaded by Apache)? i.e. did you try a simple setup that only tries to open your database and does absolutely nothing else and loads no other CPAN modules. With "use

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-19 Thread Michael Ludwig
Torsten Foertsch schrieb: Of course it depends on your setup. If you configure only a small number of interpreters then the overall memory footprint can be lower then with prefork where each process runs its own interpreter. But the effect of the copied interpreters outweighs this very soon. I

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-19 Thread Torsten Foertsch
On Mon 19 Jan 2009, Michael Ludwig wrote: > > In fact, it is worse than fork()ing off unix processes because the > > interpreter data is completely copied while a new interpreter is > > created. On the other hand a forked process copies only those pages > > that are written to. > > Thanks. If I'm u

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-19 Thread Michael Ludwig
Torsten Foertsch schrieb: On Sun 18 Jan 2009, Michael Ludwig wrote: Hmm. Not sure what to make of this threaded Perl. In fact, it is worse than fork()ing off unix processes because the interpreter data is completely copied while a new interpreter is created. On the other hand a forked process

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-19 Thread Michael Ludwig
macke...@animalhead.com schrieb: Yes it is now Abend again. Timewise this is like relationships I have had with Philips (now NXP) European colleagues... And a new morning again, and it goes round and round ... On Jan 18, 2009, at 10:56 AM, Michael Ludwig wrote: macke...@animalhead.com schr

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-19 Thread Torsten Foertsch
On Sun 18 Jan 2009, Michael Ludwig wrote: >  From perldoc perlthrtut: "In this model each thread runs in its own > Perl interpreter, and any data sharing between threads must be > explicit." This does not sound to me as if there is a significant > advantage over spawning child processes, at least n

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-19 Thread Michael Ludwig
I've referenced this thread on the Oracle Berkeley DB forum. Chances are it'll catch the attention of one of the BDB experts. If you're interested, please see: http://forums.oracle.com/forums/thread.jspa?threadID=848390 Michael Ludwig

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-18 Thread Michael Ludwig
macke...@animalhead.com schrieb: What I did to get worker and event working under FreeBSD 6.3, was to eliminate the child_init handler, and at the start of the response handler do something like my $env; sub handler { # this is the response handler my ($r) = @_; if (!$env) { $e

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-16 Thread mackenna
What I did to get worker and event working under FreeBSD 6.3, was to eliminate the child_init handler, and at the start of the response handler do something like my $env; sub handler { # this is the response handler my ($r) = @_; if (!$env) { $env = DbEnv->new;

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-16 Thread Michael Ludwig
Mark Hedges schrieb: *** glibc detected *** free(): invalid pointer: 0x084e6a14 *** If this didn't work in a response handler, I'd guess there's something else wrong. That's the kind of error you get when you use things under threads that are not thread-safe in some way, I remember that sort

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-16 Thread mackenna
I started with 'worker', and it had similar performance to what I saw thereafter with 'event'. Actually slightly better, perhaps because 'event' gained no advantage from KeepAlive because each test process stayed locked to one connection. 'worker' and 'event' were experiments that I decided to t

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-16 Thread Adam Prime
macke...@animalhead.com wrote: Apache is forgiving/robust about specifying nonexistent phase handlers in httpd.conf and inserts thereto. I was using event, and had to let each thread open its own DBs based on an undefined global. Then I found that the identical traffic-test exerciser could get

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-16 Thread Michael Ludwig
macke...@animalhead.com schrieb: Apache is forgiving/robust about specifying nonexistent phase handlers in httpd.conf and inserts thereto. Thanks. I noticed. :-) I was using event, and had to let each thread open its own DBs based on an undefined global. Then I found that the identical traff

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-16 Thread Michael Ludwig
Mark Hedges schrieb: On Thu, 15 Jan 2009, Michael Ludwig wrote: PerlRequire /home/milu/www/eumel/startup.pl PerlChildInitHandler Eumel::Gurke::bla; PerlChildExitHandler Eumel::Gurke2::bla; No trailing semicolons? That was a copy and paste error when composing the mail. But this is an impor

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-15 Thread Mark Hedges
On Thu, 15 Jan 2009, Michael Ludwig wrote: > PerlRequire /home/milu/www/eumel/startup.pl > PerlChildInitHandler Eumel::Gurke::bla; > PerlChildExitHandler Eumel::Gurke2::bla; No trailing semicolons? Probably if you first do PerlLoadModule Foo::Bar it will fail and inform you > > my $container

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-15 Thread mackenna
Apache is forgiving/robust about specifying nonexistent phase handlers in httpd.conf and inserts thereto. I was using event, and had to let each thread open its own DBs based on an undefined global. Then I found that the identical traffic-test exerciser could get 66 files/second back in event an

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-15 Thread Michael Ludwig
anyway. Your startup.pl script is running before the root apache process forks into the child processes. Scalars, lists and hashes will be cloned, but file handles won't, they have to be opened. Cloning might not be what the DbEnv, XmlManager and XmlContainer objects need, or tolerate. O

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-15 Thread Michael Ludwig
Mark Hedges schrieb: Probably what you're thinking of is a PerlChildInitHandler so that each mod_perl child process does your connection for you when the child process first forks. Yes, that's what I thought. But then I noticed that the PerlChildInitHandler I set up is ignored. Apache configura

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-14 Thread Michael Peters
cr...@animalhead.com wrote: I have a vague recollection of reading about the circumstances in which filehandles can be inherited, but can't remember where. I've been bitten by this a few times. Filehandles (and thus sockets) are inherited across forks. If your system isn't very busy you won'

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-14 Thread craig
This is my first time replying to the list. I've seen advice about not being able to share a filehandle opened in a pre-fork stage before, but have two counter-examples: 1) I opened a log file for write/append in the open-logs stage of a module, and was able to (flock and) write to it in child p

Re: Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-14 Thread Mark Hedges
On Wed, 14 Jan 2009, Michael Ludwig wrote: > I want to build a mod_perl2 application using > Sleepycat::DbXml. This is > > However, I don't know how to do this. Currently, I'm > trying to set up things in startup.pl (loaded via > PerlPostConfigRequire), store the database environment > handle in

Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl

2009-01-14 Thread Michael Ludwig
I want to build a mod_perl2 application using Sleepycat::DbXml. This is the Perl bindings to the C++ interface to Berkeley DB and Berkeley DB XML, developed by Sleepycat, now owned by Oracle (keywords: DbEnv, XmlManager, XmlContainer). Has anyone ever used this combination? Note I'm using Apache

Re: Access to Server and Request objects under Registry

2008-04-16 Thread Philippe M. Chiasson
Artem Kuchin wrote: Hello! Is there any way to access server and request objects when script is running under Registry? # From the top-level my $r = shift; OR # PerlOptions +GlobalRequest # Apache2::RequestUtil (http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_request_) use

Re: Access to Server and Request objects under Registry

2008-04-16 Thread adam . prime
access server and request objects when script is running under Registry? -- Regards, Artem

Access to Server and Request objects under Registry

2008-04-16 Thread Artem Kuchin
Hello! Is there any way to access server and request objects when script is running under Registry? -- Regards, Artem

Re: share objects

2008-04-03 Thread Felipe de Jesús Molina Bravo
m all processes later, but if > > > you change it in one process, the change will not be seen in the > > > others. With objects that contain open sockets, file handles, or XS > > > structures, you usually can't share them at all. > > > > Is when they can

Re: share objects

2008-04-03 Thread Perrin Harkins
ange will not be seen in the > > others. With objects that contain open sockets, file handles, or XS > > structures, you usually can't share them at all. > > Is when they can be shared? and if my file handle is open of "ro" it > can share between process

Re: share objects

2008-04-03 Thread Felipe de Jesús Molina Bravo
2008/4/3, Perrin Harkins <[EMAIL PROTECTED]>: > > On Thu, Apr 3, 2008 at 11:32 AM, Felipe de Jesús Molina Bravo > <[EMAIL PROTECTED]> wrote: > > > I know I can share data between processes, but what I also shared > objects? > > > It depends on what you me

Re: share objects

2008-04-03 Thread Felipe de Jesús Molina Bravo
ycat::DBXML) from dbxml; then I create an object (reference > to > > Sleepycat::DBXML) in startup.pl because i want to share it. After some > test > > (stress it) for my application I saw some error in error.log; the > problem is > > that reference to object created in startu

Re: share objects

2008-04-03 Thread Perrin Harkins
On Thu, Apr 3, 2008 at 11:32 AM, Felipe de Jesús Molina Bravo <[EMAIL PROTECTED]> wrote: > I know I can share data between processes, but what I also shared objects? It depends on what you mean by share. You can create a simple perl object in startup.pl and access it from all proces

Re: share objects

2008-04-03 Thread Jeff Pang
tup.pl because i want to share it. After some test > (stress it) for my application I saw some error in error.log; the problem is > that reference to object created in startup.pl was lost > > then the question is ... is possible to share objects? > If your object has its own package

share objects

2008-04-03 Thread Felipe de Jesús Molina Bravo
problem is that reference to object created in startup.pl was lost then the question is ... is possible to share objects? I know I can share data between processes, but what I also shared objects? thanks in advance

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-23 Thread John Doe
Jeremy Nixon am Dienstag, 15. November 2005 23.16: > John Doe <[EMAIL PROTECTED]> wrote: > > Hope it's not a stupid question, but are you sure %d_cache survives a > > request? Maybe I'm totally misunderstanding something but I thought > > after the point > > > > } end lexical scope > > > > %d_cac

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread Badai Aqrandista
On 2005-11-15, at 03.11, Peter1 Alvin wrote: Using mod_perl, how do you keep Perl objects in RAM from page to page?  I don't want to re-instantiate my objects on every page request, and I don't want the overhead of serializing my objects to a persistent store from page to page (I

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread Sive Lindmark
On 2005-11-15, at 03.11, Peter1 Alvin wrote: Please tell me I can do this!   Using mod_perl, how do you keep Perl objects in RAM from page to page?  I don't want to re-instantiate my objects on every page request, and I don't want the overhead of serializing my objects to a persis

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread Jeremy Nixon
Leo Lapworth <[EMAIL PROTECTED]> wrote: > I don't think this would work... > > You can set up a global variable within your startup.pl (before apache > spawns child processed) and all children will get it, but if you > edit it in anyway the changes are only reflected in that specific child > pro

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread Jeremy Nixon
John Doe <[EMAIL PROTECTED]> wrote: > Hope it's not a stupid question, but are you sure %d_cache survives a > request? Maybe I'm totally misunderstanding something but I thought > after the point > > } end lexical scope > > %d_cache gets destroyed (if not still referenced from somewhere else)

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread Perrin Harkins
On Tue, 2005-11-15 at 14:53 -0600, David Nicol wrote: > Or you could toss your apache server and write to Http::Server::Singlethreaded > isntead of mod_perl Or POE for that matter. That wouldn't be very effective if you do a lot of DBI or other blocking calls, but it could work if the data is all

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread David Nicol
On 11/15/05, Perrin Harkins <[EMAIL PROTECTED]> wrote: > Peter1 Alvin wrote: > > I can't believe Perl doesn't support keeping objects in RAM. This would > > de-qualify Perl for half of the projects I need to develop. > > There are languages with better threa

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread Perrin Harkins
Peter1 Alvin wrote: Using mod_perl, how do you keep Perl objects in RAM from page to page? I don't want to re-instantiate my objects on every page request, and I don't want the overhead of serializing my objects to a persistent store from page to page (I use A LOT of objects). I

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread Perrin Harkins
David Baird wrote: No, the 'reference' to the lexical variable doesn't need to be a 'Perl reference', just some mention of the variable in the code. That will make it stick around, but only within the lexical scope specified. David is correct. This is called a closure. Any use of a lexical v

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread David Baird
On 11/15/05, Leo Lapworth <[EMAIL PROTECTED]> wrote: > > On 15 Nov 2005, at 11:35, John Doe wrote: > >>> Hope it's not a stupid question, but are you sure %d_cache > >>> survives a > >>> request? Maybe I'm totally misunderstanding something but I > >>> thought after > >>> the point > >>> > >>> } en

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread David Baird
On 11/15/05, John Doe <[EMAIL PROTECTED]> wrote: > David Baird am Dienstag, 15. November 2005 11.07: > > On 11/15/05, John Doe <[EMAIL PROTECTED]> wrote: > > > Jeremy Nixon am Dienstag, 15. November 2005 08.06: > > > > Peter1 Alvin <[EMAIL PROTECTED]> wrote: > [...] > > > > { # start a lexical sco

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread John Doe
John Doe am Dienstag, 15. November 2005 12.35: > David Baird am Dienstag, 15. November 2005 11.07: > > On 11/15/05, John Doe <[EMAIL PROTECTED]> wrote: > > > Jeremy Nixon am Dienstag, 15. November 2005 08.06: > > > > Peter1 Alvin <[EMAIL PROTECTED]> wrote: > > [...] > > > > > { # start a lexical s

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread Leo Lapworth
On 15 Nov 2005, at 11:35, John Doe wrote: Hope it's not a stupid question, but are you sure %d_cache survives a request? Maybe I'm totally misunderstanding something but I thought after the point } end lexical scope %d_cache gets destroyed (if not still referenced from somewhere else).

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread John Doe
David Baird am Dienstag, 15. November 2005 11.07: > On 11/15/05, John Doe <[EMAIL PROTECTED]> wrote: > > Jeremy Nixon am Dienstag, 15. November 2005 08.06: > > > Peter1 Alvin <[EMAIL PROTECTED]> wrote: [...] > > > { # start a lexical scope > > > my %d_cache; > > > sub handler { > > > # stuff >

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread David Baird
On 11/15/05, John Doe <[EMAIL PROTECTED]> wrote: > Jeremy Nixon am Dienstag, 15. November 2005 08.06: > > Peter1 Alvin <[EMAIL PROTECTED]> wrote: > > > Please tell me I can do this! > > > > > > Using mod_perl, how do you keep Perl objects in RAM

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread John Doe
Jeremy Nixon am Dienstag, 15. November 2005 08.06: > Peter1 Alvin <[EMAIL PROTECTED]> wrote: > > Please tell me I can do this! > > > > Using mod_perl, how do you keep Perl objects in RAM from page to page? [...] > As an example, I have a handler that needs to read

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-15 Thread Leo Lapworth
On 15 Nov 2005, at 02:11, Peter1 Alvin wrote: Please tell me I can do this!   Using mod_perl, how do you keep Perl objects in RAM from page to page?  I don't want to re-instantiate my objects on every page request, and I don't want the overhead of serializing my objects to a persis

AW: mod_perl: How pass variables (objects) from page to page?

2005-11-14 Thread Denis Banovic
You could use memcached, see Cache::Memcached on CPAN   it works great!   Denis Von: Peter1 Alvin [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 15. November 2005 03:11An: modperl@perl.apache.orgBetreff: mod_perl: How pass variables (objects) from page to page? Please tell me I can do

Re: mod_perl: How pass variables (objects) from page to page?

2005-11-14 Thread Jeremy Nixon
Peter1 Alvin <[EMAIL PROTECTED]> wrote: > Please tell me I can do this! > > Using mod_perl, how do you keep Perl objects in RAM from page to page? > I don't want to re-instantiate my objects on every page request, and I > don't want the overhead of serializing m

mod_perl: How pass variables (objects) from page to page?

2005-11-14 Thread Peter1 Alvin
Please tell me I can do this!   Using mod_perl, how do you keep Perl objects in RAM from page to page?  I don't want to re-instantiate my objects on every page request, and I don't want the overhead of serializing my objects to a persistent store from page to page (I use A LOT

Re: Tied Apache::Session objects in AxKit::XSP::BasicSession

2005-06-21 Thread Kjetil Kjernsmo
On mandag 20 juni 2005, 20:26, Perrin Harkins wrote: > > Uh, actually, that's what I did in my first version, as it is the > > intuitive thing to do, and couldn't get it to do what it should... > > To me, it looked as if just the hash was passed, not the tied > > object... Of course, it could be th

Re: Tied Apache::Session objects in AxKit::XSP::BasicSession

2005-06-20 Thread Perrin Harkins
On Mon, 2005-06-20 at 20:22 +0200, Kjetil Kjernsmo wrote: > > No, you want the hash, not the object it's tied to: > > $r->pnotes('session' => \%session); > > > > Then use it like this: > > my $session_ref = $r->pnotes('session'); > > $session->{'key'} = 'value'; > > Uh, actually, that's what I did

Re: Tied Apache::Session objects in AxKit::XSP::BasicSession

2005-06-20 Thread Kjetil Kjernsmo
On Friday 17 June 2005 06:00, Perrin Harkins wrote: > > I currently assign to pnotes like this: > >     $r->pnotes(session => tied %session); > > No, you want the hash, not the object it's tied to: > $r->pnotes('session' => \%session); > > Then use it like this: > my $session_ref = $r->pnotes('sess

Re: Tied Apache::Session objects in AxKit::XSP::BasicSession

2005-06-16 Thread Perrin Harkins
Kjetil Kjernsmo wrote: OK, I have been working a couple of nights now to do this, and have been making some progress. But I seem to have difficulties with actually passing the tied hash, that is, making sure I pass the actually tied object, not just the data hash. I currently assign to pnote

Re: Tied Apache::Session objects in AxKit::XSP::BasicSession

2005-06-16 Thread Kjetil Kjernsmo
Hi and thanks for the response! On onsdag 15 juni 2005, 10:06, Perrin Harkins wrote: > Ideally, I would suggest you stop putting your session in a global. > That's just asking for trouble.   Yeah, I've had ambitions to do this for a long time, but not really a way to implement it gracefully. >

Re: Tied Apache::Session objects in AxKit::XSP::BasicSession

2005-06-14 Thread Perrin Harkins
On Mon, 2005-06-13 at 00:51 +0200, Kjetil Kjernsmo wrote: > To elaborate on some details from there, things go wrong when we > invalidate a session, as the session is supposed to be untied. However, > as described in the Camel Book (pp. 395), this can't happen because we > still have references

Tied Apache::Session objects in AxKit::XSP::BasicSession

2005-06-12 Thread Kjetil Kjernsmo
Hi all! I took over maintenance of AxKit::XSP::BasicSession some time ago from Mike Nachbaur, who wrote it. Recently, we have discovered it has some really bad issues. We have discussed the problems in the usual dahut hangouts, but well, the short story is that none of us grok tie-ing well eno

RE: sharing big global hash and objects

2005-02-17 Thread Barksdale, Ray
> -Original Message- > From: Perrin Harkins [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 17, 2005 3:13 PM > To: Barksdale, Ray > Cc: mod_perl > Subject: Re: sharing big global hash and objects > > > Does that work? It looks really strange t

Re: sharing big global hash and objects

2005-02-17 Thread Perrin Harkins
On Thu, 2005-02-17 at 13:56 -0600, Barksdale, Ray wrote: > The module containing $hash is loaded in startup.pl at boot. > I then have a package that creates an object based on a slice of the hash: > > package FooBar; > > use Config qw($hash); > > sub new { > my ($class, $table, $field) = @

sharing big global hash and objects

2005-02-17 Thread Barksdale, Ray
I have a large structure loaded from a db table that contains parameter values. The structure looks something like following (please excuse formatting, MS lookOut) my $hash = { table1 => { field1 => { param1 => val, param2 =>

Re: Storing Objects in a Session

2005-02-02 Thread Perrin Harkins
On Wed, 2005-02-02 at 12:26 -0500, Jonathan Vanasco wrote: > I never thought of using storable. There's no need for you to use Storable. Apache::Session does it already. Just put your objects in the session. > I thought i could just place an object in the tied session variable a

Re: Storing Objects in a Session

2005-02-02 Thread Jonathan Vanasco
On Feb 2, 2005, at 12:00 AM, David J Radunz wrote: Have you tried to freeze your object and then thaw it on retrieve? perl -MCPAN -e install Storable perldoc Storable On Feb 2, 2005, at 12:28 AM, Perrin Harkins wrote: Yes, you put any object in Apache::Session as long as it can be handled by Stora

Re: Storing Objects in a Session

2005-02-01 Thread Perrin Harkins
jonathan vanasco wrote: is there any way to store an object into an Apache Session ? Yes, you put any object in Apache::Session as long as it can be handled by Storable. You'll need to tell us what you tried and what didn't work about it before we can help you more. - Perrin

Re: Storing Objects in a Session

2005-02-01 Thread David J Radunz
On Tue, 2005-02-01 at 23:52 -0500, jonathan vanasco wrote: > slightly OT, but i'm doing this in mod_perl! > > server > Apache/2.0.52 (Unix) > mod_perl/1.99_16 > Perl/v5.8.1 > > use > use Apache::Cookie; > use Apache::Request (); > use Apache::Session; > u

Storing Objects in a Session

2005-02-01 Thread jonathan vanasco
slightly OT, but i'm doing this in mod_perl! server Apache/2.0.52 (Unix) mod_perl/1.99_16 Perl/v5.8.1 use use Apache::Cookie; use Apache::Request (); use Apache::Session; use Apache::Session::File; is there any way to store an object into an A

Re: [mp1] 64 bit perl/apache and 32 bit shared objects

2004-10-05 Thread Stas Bekman
Robert Landrum wrote: I'm having a bit of trouble with a 64 bit versions of perl and apache not playing nice with 32 bit shared objects under linux. We have an external shared object binary supplied by a vendor that we can link our XS code against just fine, but when we attempt to actually us

[mp1] 64 bit perl/apache and 32 bit shared objects

2004-10-05 Thread Robert Landrum
I'm having a bit of trouble with a 64 bit versions of perl and apache not playing nice with 32 bit shared objects under linux. We have an external shared object binary supplied by a vendor that we can link our XS code against just fine, but when we attempt to actually use the shared methods,

Re: perl module to access php_value include_path objects

2004-02-10 Thread Philippe M. Chiasson
On Sat, 2004-02-07 at 01:36 -0700, Gary C. New wrote: > I am in the middle of a project that requires me to dynamically update > certain default paths within the Apache Server environment. > > I currently am able to update document_root on the fly and now need to > be able to update php_value in

perl module to access php_value include_path objects

2004-02-07 Thread Gary C. New
I am in the middle of a project that requires me to dynamically update certain default paths within the Apache Server environment. I currently am able to update document_root on the fly and now need to be able to update php_value include_path in the same manor. Is there an existing perl module

Re: using pnotes to store/retrieve Class::DBI objects?

2003-12-20 Thread Stas Bekman
Eric J. Hansen wrote: Hurrah! Its working now. Thank you! Cool. Thanks for the report. I'll commit it after releasing 1.99_12 on Monday, so it'll be available in 1.99_13 hopefully somewhere next month. I can't add it to 1.99_12 since it wasn't tested. When I try to retrieve this Class::DBI ob

RE: using pnotes to store/retrieve Class::DBI objects?

2003-12-20 Thread Eric J. Hansen
Hurrah! Its working now. Thank you! Eric > > When I try to retrieve this Class::DBI object from the Cleanup > > Handler, the pnotes values are totally gone. However, > regular scalers > > that I've put in 'notes' are still there. Perhaps pnotes has (by > > design) already been cleaned up

Re: using pnotes to store/retrieve Class::DBI objects?

2003-12-19 Thread Stas Bekman
Eric J. Hansen wrote: After looking at this further, it turns out that Perrin's suggested code *does* work, but only in the PerlResponseHandler or earlier stages. And unfortunately, I mis-stated the original problem... which is that I am trying to retrieve that pnotes object (Class::DBI instance)

RE: using pnotes to store/retrieve Class::DBI objects?

2003-12-19 Thread Eric J. Hansen
losing its namespace. > > That's not it. Many people have successfully stored objects > in pnotes > before. > > > In the first handler (where I define > > the object and store it in pnotes) I'm logging the value of "ref > > $dbrecord" an

Re: using pnotes to store/retrieve Class::DBI objects?

2003-12-18 Thread Perrin Harkins
Eric J. Hansen wrote: On further investigation, the problem seems to be that the object is losing its namespace. That's not it. Many people have successfully stored objects in pnotes before. In the first handler (where I define the object and store it in pnotes) I'm logging the val

RE: using pnotes to store/retrieve Class::DBI objects?

2003-12-18 Thread Eric J. Hansen
at this must be the problem... any other ideas? thanks Eric > -Original Message- > From: Perrin Harkins [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 18, 2003 9:22 PM > To: Eric J. Hansen > Cc: [EMAIL PROTECTED] > Subject: Re: using pnotes to store/retrieve Class::DBI

Re: using pnotes to store/retrieve Class::DBI objects?

2003-12-18 Thread Perrin Harkins
Eric J. Hansen wrote: my $dbrecord = ClassDBI_Table1->retrieve ( 1 ); # ClassDBI_Table1 is of base Class::DBI::mysql $r->pnotes('INFO_FOR_LATER', \$dbrecord ); Should be $r->pnotes('INFO_FOR_LATER', $dbrecord ); my $existing_dbrecord = $r->pnotes('INFO_FOR_LA

using pnotes to store/retrieve Class::DBI objects?

2003-12-18 Thread Eric J. Hansen
I'm trying to use $r->pnotes to store a Class::DBI object in an early stage handler so it may be retrieved by a later stage handler. Specifically: in my PerlTransHandler: my $dbrecord = ClassDBI_Table1->retrieve ( 1 ); # ClassDBI_Table1 is of base Class::DBI::mysql $r->p

Re: Objects

2003-12-04 Thread Stas Bekman
Patricio Muñoz wrote: Hi, I have the script <% $mypath = "D:\Apache\Apache2\asp\aplicacion\videos"; $fso = $Server->CreateObject("Scripting.FileSystemObject"); $fls = $fso->GetFolder($Server->MapPath($mypath)); %> when execute in the browser, appear the next error: [Thu Dec 04 13:14:40 2003] [

Objects

2003-12-04 Thread Patricio Muñoz
Hi, I have the script <% $mypath = "D:\Apache\Apache2\asp\aplicacion\videos"; $fso = $Server->CreateObject("Scripting.FileSystemObject"); $fls = $fso->GetFolder($Server->MapPath($mypath)); %> when execute in the browser, appear the next error: [Thu Dec 04 13:14:40 2003] [error] [asp] [-98744

Re: Objects

2003-12-03 Thread Ged Haywood
Hi there, On Wed, 3 Dec 2003, [iso-8859-1] Patricio Muñoz wrote: > I don't found the examples or documentation where can make the > convertion to Apache::ASP Apache::ASP is purely for Perl scripting, you can't use the same code that you would use in the M1cr0$0ft world. There is a separate Web

Objects

2003-12-03 Thread Patricio Muñoz
Hi all, I problem with work Objects. The next code work fine with ASP <% Set filesystem = CreateObject("Scripting.FileSystemObject") Set folder = filesystem.GetFolder(server.mappath(mypath)) Set subfolders = folder.SubFolders Set filecollection = folder.Files %> n

Re: apache::DBI handling extended DBI objects...

2003-11-13 Thread Perrin Harkins
On Thu, 2003-11-13 at 13:19, Stas Bekman wrote: > I doubt it's an Apache::DBI problem. Most likely something is borked in the > sub-classing implementation, so you probably want to contact the author of the > subclass. I agree, it is probably a result of the fact that Apache::DBI does some stran

Re: apache::DBI handling extended DBI objects...

2003-11-13 Thread Stas Bekman
olkit, so basically I'm storing under Apache::DBI not 'vanilla' DBI class objects but Extropia::Core::DataSource::DBI class objects (which directly extend DBI class). The error I catch is: [error] undef error - Undefined subroutine &Apache::DBI::db::quote called at /A

apache::DBI handling extended DBI objects...

2003-11-13 Thread Masetti Marco
y I'm storing under Apache::DBI not 'vanilla' DBI class objects but Extropia::Core::DataSource::DBI class objects (which directly extend DBI class). The error I catch is: [error] undef error - Undefined subroutine &Apache::DBI::db::quote called at /ADT/Modules/Extropia/Core/Dat

Re: Storing Objects with Apache::Session

2003-10-24 Thread Perrin Harkins
On Fri, 2003-10-24 at 07:06, harm wrote: > On Thu, Oct 23, 2003 at 03:19:25PM -0400, Perrin Harkins wrote: > > On Thu, 2003-10-23 at 14:56, Brendan W. McAdams wrote: > > > Tried timestamping the second layer, and saving directly, no luck. > > > > The timestamp has to be in the first layer. It doe

Re: Storing Objects with Apache::Session

2003-10-24 Thread harm
On Thu, Oct 23, 2003 at 03:19:25PM -0400, Perrin Harkins wrote: > On Thu, 2003-10-23 at 14:56, Brendan W. McAdams wrote: > > Tried timestamping the second layer, and saving directly, no luck. > > The timestamp has to be in the first layer. It doesn't have to be a > timestamp, actually. Any write

Re: Storing Objects with Apache::Session

2003-10-23 Thread Perrin Harkins
On Thu, 2003-10-23 at 14:56, Brendan W. McAdams wrote: > Tried timestamping the second layer, and saving directly, no luck. The timestamp has to be in the first layer. It doesn't have to be a timestamp, actually. Any write at all in the first layer is fine, e.g. $session{'changed'} = 1. I forgo

Re: Storing Objects with Apache::Session

2003-10-23 Thread Brendan W. McAdams
e, just a blessed hash > > inside) within Apache::Session. I'm doing this: > > $session->{tax_swap}->{preview_sell_candidates} = [EMAIL PROTECTED]; > > where @items is an array of SellCandidate objects... I've stored array > > references in Apache::Session before; is

Re: Storing Objects with Apache::Session

2003-10-23 Thread Perrin Harkins
Hi Brendan, > I'm trying to store an object (simple datatype, just a blessed hash > inside) within Apache::Session. I'm doing this: > $session->{tax_swap}->{preview_sell_candidates} = [EMAIL PROTECTED]; > where @items is an array of SellCandidate objects... I

Re: Storing Objects with Apache::Session

2003-10-23 Thread Brendan W. McAdams
I also should note that the following subroutine works: # Persists sell candidates to session storage # Should take an array of Apache::MuniCenter::MarkupMatrix::TaxSwap::Candidate Objects # Should this be redone as an object (Yes, but question is when..) sub savePreviewSellList { my

Storing Objects with Apache::Session

2003-10-23 Thread Brendan W. McAdams
I'm trying to store an object (simple datatype, just a blessed hash inside) within Apache::Session. I'm doing this: $session->{tax_swap}->{preview_sell_candidates} = [EMAIL PROTECTED]; where @items is an array of SellCandidate objects... I've stored array references in Apach