request object in imported subroutines

2002-09-19 Thread Andre Landwehr
Hi, I have a file containing some [$sub$]'s which I import with Execute ({inputfile => 'functions.epo', import => 1}) I don't seem to have access to the request object in those subs although I have [-$req=shift;-] in the top of the page. My guess is that an imported page is only parsed once and f

Re: Urgent DBIx::Recordset question

2002-09-19 Thread Angus Lees
At Tue, 17 Sep 2002 19:09:49 -0400, Kee Hinckley wrote: > At 8:10 AM +1000 9/18/02, Angus Lees wrote: > >you haven't set $DBIx::Recordset::FetchsizeWarn=0, have you? > > Yes. Why? perhaps that doesn't work for your database? (it doesn't for postgresql) it might appear to work sometimes, if th

Re: request object in imported subroutines

2002-09-19 Thread Angus Lees
At Thu, 19 Sep 2002 11:54:59 +0200, Andre Landwehr wrote: > I have a file containing some [$sub$]'s which I import with > Execute ({inputfile => 'functions.epo', import => 1}) > I don't seem to have access to the request object in those > subs although I have [-$req=shift;-] in the top of the pag

Re: request object in imported subroutines

2002-09-19 Thread Andre Landwehr
On Thu, Sep 19, 2002 at 09:23:46PM +1000, Angus Lees wrote: > since you're importing, the code/functions will be run in the same > "namespace" as the page doing the Execute. > > thus you can only do $req=shift in either the Executing page or the > Executed page, since they're shifting the same @_

Re: request object in imported subroutines

2002-09-19 Thread Cameron McBride
On Thu, Sep 19, 2002 at 03:15:12PM +0200, Andre Landwehr wrote: > [- $req = shift; -] > [- Execute ({inputfile => 'functions.epo', import => 1}); -] > [- > logprint ("bla bla bla"); # <- this is the function > print OUT "my log: $req->{log}"; # here it works > -] > > functions.epo: > [$ sub

How to put DBI $sth->fetchrow_hashref results into %fdat?

2002-09-19 Thread Scott Chapman
I'm confused about perl references here. I get a hash reference back from fetchrow_hashref and I want to put the hash that is referred to into %fdat so it will populate a form correctly. How do I do this? Scott - To unsubscr

Re: How to put DBI $sth->fetchrow_hashref results into %fdat?

2002-09-19 Thread Kee Hinckley
At 9:17 AM -0700 9/19/02, Scott Chapman wrote: >I'm confused about perl references here. I get a hash reference back from >fetchrow_hashref and I want to put the hash that is referred to into %fdat so >it will populate a form correctly. How do I do this? %fdat = %$hashref; -- Kee Hinckley -

Re: request object in imported subroutines

2002-09-19 Thread Angus Lees
At Thu, 19 Sep 2002 09:55:48 -0400, Cameron McBride wrote: > I did something similiar, but used 'isa' from Execute and OO method call > for my function to pass around the $req object. > Perhaps this approach might help, as I think it will give the same > functionality. and it will be more memor