Graham Barr <[EMAIL PROTECTED]> writes:

> I have not looked at SelfTest, but I have always done this with
> 
> unless (defined wantarray) {
>   # Self Test
> }
> 
> This works because whenever a file is use'd, require'd etc. it is
> evaluated in a scalar context. The main file is in a void context.

Nice. I use

  if ( ! caller ) {
     # selftest
  }

-- Johan

Reply via email to