Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, andwantarray() changes
[email protected] (Damian Conway) Mon, 28 Aug 2000 12:08:50 +1100 (EST)
| Newsgroups | perl.perl6.language.subs |
|---|---|
| Message-ID | <[email protected]> |
> DC> However, I have given thought to allowing conditions to be grouped,
> DC> and de-activated by group. This would probably meet your need.
>
> DC> pre mymethod : group("safe-coding practice") { @_ > 0 }
> DC> pre mymethod : group("debugging") { print @_, "\n"; }
>
> Makes it difficult to specify on the command line. Unless you have
> another way of matching them to higherarchy or perhaps a cost level?
There would be a 'contract' pragma:
use contract qw("safe-coding practice");
no contract qw("debugging");
no contract; # turn everything off (production code)
Damian