Posterous theme by Cory Watilo

Acme::Don't - search.cpan.org

DESCRIPTION ^

The Acme::Don't module provides a don't command, which is the opposite of Perl's built-in do.

It is used exactly like the do BLOCK function except that, instead of executing the block it controls, it...well...doesn't.

Regardless of the contents of the block, don't returns undef.

You can even write:

don't {
        # code here
    } while condition();

And, yes, in strict analogy to the semantics of Perl's magical do...while, the don't...while block is unconditionally not done once before the test. ;-)

Note that the code in the don't block must be syntactically valid Perl. This is an important feature: you get the accelerated performance of not actually executing the code, without sacrificing the security of compile-time syntax checking.

:-)