develooper Front page | perl.perl5.porters | Postings from February 2003

Re: Did the assertion patch/feature submission get overlooked?

From:
Salvador "Fandiño"
Date:
February 19, 2003 12:10
Subject:
Re: Did the assertion patch/feature submission get overlooked?
Message ID:
20030219113619.91041.qmail@web13401.mail.yahoo.com
--- hv@crypt.org wrote:

> :>   use assertions '(This && (is || my) || assertion) && filter'
> :
> :I have implemented it, well formed logical expressions composed of
> '&&', :'||', '(', ')', '1', '0' and keywords can be used.
> 
> Thanks, applied as #18750. It all starts to feel a bit
> over-complicated, but lets see what people make of it.

yes, I agree, I don't think that extension could be too useful at
all, but on the other hand I don't want to limit people to use my
preferred pattern (the 'and' one) for structuring assertions, I
prefer to just recommend it by making it the default.


> I note that assertions::activate uses the supplied pattern(s) like
> C< qr/^$_$/ >, which will do the wrong thing on eg "foo|bar": a
> C< qr{^(?:$_)$} > would be better.

ok, done, but anyway, the more shell-friendly ',' can be used instead
of '|'


  perl -Afoo,bar ...


> :Finally, I have also changed '-A' switch to insert '.*' when used
> alone.
> 
> Er, no: it'll still need a patch to perl.c.

oops!, a patch is on the way with a new test for this feature.

Bye,

 - Salva


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About