List Info

Thread: Re: Passing data between plugins




Re: Passing data between plugins
user name
2007-02-08 10:02:21
Hi Matt,

>> It appears $self->client->notes only works
within a single plugin,
not
>> between two different plugins :-(

> It only works within the same request - are you trying
to pass data 

> between multiple requests?

No, I understand that, and it's exactly what I want.

Here's what I'm trying to do: I want to create a generic
plugin for
session control. As of my thinking, that should hook the
system very
early in the process, even before authentication, etc. So I
hook
post_read_request - which, to my regret cannot write cookies
so I need
another plugin to update the session cookie - and I then try
to pass
userinformation on to the following plugins - like
$self->client->notes('user_id', $user_id).

It works within a plugin in a hook like xmlresponse, but the
variable
is empty when I initialize it from my session plugin.

Could it be that notes are read-only in post_read_request -
and, if so,
for what reason?

Actually, I would like to pass a bunch of information from
my session
plugin to later stages - are notes the best tool for that,
or could I
pass, say, a hash in some way?

Regards,
Lars
-- 

Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark
 
Tel.: +45 70 25 88 10
 
http://www.skjaerlund.d
k/lars


------------------------------------------------------------
---------
To unsubscribe, e-mail: axkit-users-unsubscribeaxkit.org
For additional commands, e-mail: axkit-users-helpaxkit.org


Re: Passing data between plugins
user name
2007-02-08 13:08:16
On 8-Feb-07, at 11:02 AM, Lars Skjærlund wrote:

> Actually, I would like to pass a bunch of information
from my session
> plugin to later stages - are notes the best tool for
that, or could I
> pass, say, a hash in some way?

Notes are the best way - but they're not limited to text
strings -  
you can store whatever structure you like in there.

But I'm unsure why your code isn't working. Notes should be
available  
right throughout the connection, from connection to the end
of the  
request. Have you typo'd the key by any chance?
------------------------------------------------------------
---------
To unsubscribe, e-mail: axkit-users-unsubscribeaxkit.org
For additional commands, e-mail: axkit-users-helpaxkit.org


parse_post_param again!
user name
2007-02-16 09:56:28
Lo,

I've a problem I don't understand.
I'm trying to POST a field with 3000 bytes in it and it
isn't being saved
as a param.

Now, the thing is, it does work on my laptop, but not on our

production server.

My laptop has perl 5.8.7 and is run from the prompt as an
ordinary 
user.
On the server perl is 5.8.3 and is run as root using
daemontools 
setuid an ordinary user.

any ideas where I could put debug code to try and fix it?

John


------------------------------------------------------------
---------
To unsubscribe, e-mail: axkit-users-unsubscribeaxkit.org
For additional commands, e-mail: axkit-users-helpaxkit.org


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )