> I would have assumed that a pre/post/invariant would not be used regularly,
   > but rather under optional control. So this would lose that feature.

The option is to opt out of preconditions, not opt in.

Besides, I intend to propose an attribute that makes them un-opt-out-able:

        sub new { bless {}, $_[0] }
        sub x   { lreturn $_[0]->{x} }
        post x : mandatory  { $_[0]->{x} >= 0 }

Damian

Reply via email to