Re: Presenting conditional HTML

2001-03-24 Thread Kee Hinckley
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 At 10:20 PM +0100 3/24/01, Gerald Richter wrote: >What about creating a loop: > > [- $rec = $set[$row] -] > [$foreach $field ('organization_name', 'address1', >'address2') $] > [$ if ($data= $rec ->

Talk at ApacheCon and infos about Embperl 2.0 available

2001-03-24 Thread Gerald Richter
Hi, those of you who are not able to come to the ApacheCon 2001 and those who just want to read some words about Embperl 2.0 can now download my talk from http://www.ecos.de/ep/pod/conf/ApCon2001.Embperl.zip Gerald - Gerald Richter

Re: Presenting conditional HTML

2001-03-24 Thread Gerald Richter
> > Ooops. I was just addressing the problem of outputting the data in a > more clean way, obviously there is more code that could check the data > integrity. Sorry that I didn't make that clear. As I see it this was a > question about making the code cleaner, not so much about the bigger > issues

Re: Presenting conditional HTML

2001-03-24 Thread Neil Gunton
Gerald Richter wrote: > > > How about: > > > > [+ $set[$row]{org_name} ? "$set[$row]{org_name}" : "" +] > > [+ $set[$row]{address1} ? "$set[$row]{address1}" : "" +] > > [+ $set[$row]{address2} ? "$set[$row]{address2}" : "" +] > > > > etc > > > > You may need to set $escmode to 0 to stop the bein

Re: Call Embperl from a CGI script

2001-03-24 Thread Gerald Richter
> I'm looking at possibly using EmbPerl. However, the way I want to use it > is kind of different from what you describe in your readme files. > > Basically, I want Embperl to act as just a module, not as an Apache plugin > or anything that would be closely tied in to Apache or the machine it i

Re: Presenting conditional HTML

2001-03-24 Thread Gerald Richter
> > I often find myself with code like this: > > [+ $set[$row]{organization_name} +] > [+ $set[$row]{address1} +] >... Assuming that $set is a DBIx::Recordset object, you can leave out the $row if it doesn't have changed, e.g. [+ $set[$row]{organi

Re: Presenting conditional HTML

2001-03-24 Thread Gerald Richter
> How about: > > [+ $set[$row]{org_name} ? "$set[$row]{org_name}" : "" +] > [+ $set[$row]{address1} ? "$set[$row]{address1}" : "" +] > [+ $set[$row]{address2} ? "$set[$row]{address2}" : "" +] > > etc > > You may need to set $escmode to 0 to stop the being escaped, I > can't remember. > That's ve

Re: Presenting conditional HTML

2001-03-24 Thread Neil Gunton
Oops, sorry, hit "send" too soon. Should read: How about: [+ $set[$row]{org_name} ? "$set[$row]{org_name}" : "" +] [+ $set[$row]{address1} ? "$set[$row]{address1}" : "" +] [+ $set[$row]{address2} ? "$set[$row]{address2}" : "" +] etc You may need to set $escmode to 0 to stop the being escaped,

Re: Presenting conditional HTML

2001-03-24 Thread Neil Gunton
How about: [+ $set[$row]{organization_name} ? "$set[$row]{organization_name}" : "" +] [+ $set[$row]{address1} ? "$set[$row]{address1}" : "" +] [+ $set[$row]{address2} ? "$set[$row]{address2}" : "" +] etc You may need to set $escmode to 0 to stop the being escaped, I can't remember. It's a lit

Presenting conditional HTML

2001-03-24 Thread Kee Hinckley
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I often find myself with code like this: [+ $set[$row]{organization_name} +] [+ $set[$row]{address1} +] [+ $set[$row]{address2} +] [+ $set[$row]{address3} +] [+ $set[$row