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

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

Thread Previous | Thread Next
February 18, 2003 18:09
Re: Did the assertion patch/feature submission get overlooked?
Message ID:
=?ISO-8859-1?Q?Salvador_Fandi=F1o?= <> wrote:
:>> Yes but if you've said "use assertions qw/destructors layerIII/" and
:>> then -Adestructors, your assertions won't be asserted. No ? I just feel
:>> that the interface is not very flexible.
:> yes, I agree, but I didn't want to create a mini language for assertions 
:>  in order to keep it simple. Maybe it is the way to go and you should be 
:> able to use something like
:>   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.

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.

:Finally, I have also changed '-A' switch to insert '.*' when used alone.

Er, no: it'll still need a patch to perl.c.

I note also that the -A switch handling does a forbid_setid("-A").
Any particular reason why it does that? I'd have thought that in
general a script would be expected to run more safely with -A, so
that it should positively be encouraged.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About