Re: Disappearing code

2003-01-12 Thread Ken Fox
Damian Conway wrote:

sub debug is immediate is exported (@message) {
return $debugging ?? { print $*STDERR: @message; } :: {;}
}


Won't @message need lazy evaluation? How will Perl know to
delay interpolation until the result of the macro is called
at run time?

- Ken




Re: Disappearing code

2003-01-12 Thread Damian Conway
Ken Fox wrote:


Won't @message need lazy evaluation? How will Perl know to
delay interpolation until the result of the macro is called
at run time?


Good point. It would also need to be slurped.
So that's:


 sub debug is immediate is exported (*@message is lazy) {
  return $debugging ?? { print $*STDERR: @message; } :: {;}
 }


Damian