Re: does pnotes() work at all in 1.27?
I think Mark had tried it without Apache::Request. Also, it was obvious at some point that he wasn't in a subrequest ($r->is_main returned true, but no pnote). Mark, have you tested $r->notes, and is that working? I notice that your 'marktest' pnote test used a string value. Perhaps pnotes insists on storing refs, not strings - I've never tried it though. You might also start farther back in the request cycle and see if pnotes are being passed along at any stage (Init, Access, Fixup, etc). Jim - Original Message - From: "Stas Bekman" <[EMAIL PROTECTED]> To: "Mark Maunder" <[EMAIL PROTECTED]> Cc: "James Hartling" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, July 19, 2003 4:55 AM Subject: Re: does pnotes() work at all in 1.27? > Mark Maunder wrote: > > Hi Stas, > > > > Thanks for the input. Tried that and no luck. I tried using ->instance() > > instead of ->new() in both handlers, and it didn't work. Just for kicks > > I tried using a few combinations of new() and instance() and no go there > > either. I also checked that I had the main request using is_main just to > > be safe after retreiving the existing Apache::Request instance. > > What happens if you remove Apache::Request altogether and try 2 simple > handlers, e.g. response handler and logging handler. Does that setup work for > you? If it does, it has something to do with Apache::Request and not mod_perl > per se. > > > I'm going to upgrade to 1.28 in a coupla days so hopefully that'll solve > > it. wierd that noone seems to have reported this. The server I'm using > > is a stock RH 8.0 server - I dont run redcarpet or anything like that, > > and I've only upgraded the minimum to keep it secure. I'm no C > > developer, just a perl geek, but I was wondering where pnotes() stores > > it's data. In an Apache::Table object? Is there a way for me to manually > > access the store somehow at various phases to figure out where the data > > gets deleted? Any suggestions would help. > > You can debug on the C level. > > > __ > Stas BekmanJAm_pH --> Just Another mod_perl Hacker > http://stason.org/ mod_perl Guide ---> http://perl.apache.org > mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com > http://modperlbook.org http://apache.org http://ticketmaster.com >
Re: does pnotes() work at all in 1.27?
I use pnotes all over the place in 1.27, and haven't noticed any problems. I just stepped through some code and everything looks good between the Init phase and the content handling phase. I'm using Apache::Request->instance everywhere so I'm dealing with the same request object, but even if you're using Apache::Request->new I'd still expect that to work. Jim - Original Message - From: "Mark Maunder" <[EMAIL PROTECTED]> To: "Perrin Harkins" <[EMAIL PROTECTED]> Cc: "Dennis Stout" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, July 18, 2003 3:08 PM Subject: Re: does pnotes() work at all in 1.27? > Hi Perrin, thanks for the reply. > > No progress yet. I just tested pnotes in the same handler and it works. > Tested it again by setting a value in the content handler and trying to > retreive it it my logging handler and no luck. > > #The line in my content handler is: > $sess->get_r()->pnotes('marktest', 'anotherpnotestest'); > warn "PNOTES: " . $sess->get_r()->pnotes('marktest') > if($sess->get_r()->is_main()); > #$sess is my session object where I store $r and my $dbh etc. > > #And the one in my logging phase handler is: > warn "PNOTES2: " . $r->pnotes('marktest') if($r->is_main()); > > This prints out the following: > PNOTES: anotherpnotestest at /usr/local/ziptree/lib/ZT/ViewItem.pm line > 16. > PNOTES2: at /usr/local/ziptree/lib/ZT/Logger.pm line 11. > > I'm using Apache::Request in the content handler, but I've tried it > using the standard Apache->request object in both handlers and still no > luck. > > Thanks, > > Mark. > > On Fri, 2003-07-18 at 10:09, Perrin Harkins wrote: > > On Thu, 2003-07-17 at 16:51, Mark Maunder wrote: > > > > And then install those as a content and logging phase handler. If you > > > > have the time and the interest. I've tried this and the logging handler > > > > comes up with nothing in pnotes. I've also checked that it's not a sub > > > > request. > > > > Did you get any further with this? I've never heard of any problems > > with pnotes(), but I also don't have a 1.27 installed to check it with. > > Does it work if you just set and read a note in the same handler? > > > > - Perrin > -- > Mark Maunder <[EMAIL PROTECTED]> > ZipTree Inc. >