Damian Conway writes:
>       pre mymethod : group("safe-coding practice") { @_ > 0 }
>       pre mymethod : group("debugging") { print @_, "\n"; }

Using these for lvalue subs doesn't give you the behaviour you want:

  sub foo :lvalue { $foo }
  post foo { die if $foo == 5 }

  eval {
    foo() = 5;
  };

Should not set the lvalue of foo to 5.  But you can't test for
bad values until after you've made the assignment.

Nat

Reply via email to