-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
At 5:25 AM +0200 3/26/01, Gerald Richter wrote:
> > I'd have to think about what that would mean in a wysiwyg or
>> syntax-sensitive editor. I guess you'd just tell it to treat them as
>> two separate tags--you wouldn't get balancing feedback, but
>
> That would be much better. But it does introduce a new kind of tag
> that wraps around other tags. I don't know whether that would
> complicate your parser.
>
Embperl 2.0 parser can handle this with just a few lines more in the syntax
definition, I am not sure if I will introduce it in 1.3.
On Sun, Mar 25, 2001 at 01:54:05PM +0200, Gerald Richter wrote:
> >
> > I don't have any great ideas here. The only thing I've come up with
> > so far is that you could have a variation on [+ +] which
> > conditionally affected the line. Let's call it [? ?].
> > [? $foo ?],
> > would result in e
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
At 1:54 PM +0200 3/25/01, Gerald Richter wrote:
>[? [+ $foo +], ?]
>
>which will do actualy the same, but display everything between [? ?] or
>nothing
That would be much better. But it does introduce a new kind of tag
that wraps around other tags.
>
> I don't have any great ideas here. The only thing I've come up with
> so far is that you could have a variation on [+ +] which
> conditionally affected the line. Let's call it [? ?].
> [? $foo ?],
> would result in either
> something,
> or no line at all.
What I don't like at this idea that
-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 ->
>
> 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 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
13 matches
Mail list logo