-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 ->
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
>
> 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
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
> 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
>
> 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
> 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
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,
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
-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
10 matches
Mail list logo