While I like the synactic sugar that Carp::Assert provides I can't decide whether or not to use it: Thanks for any input.

Replies are listed 'Best First'.
Re: assert in Perl
by liz (Monsignor) on Oct 17, 2003 at 12:02 UTC
    The perldelta for 5.8.1 contains this entry in "Future Directions":

    A new feature called assertions will be available. This means that one can have code called assertions sprinkled in the code: usually they are optimised away, but they can be enabled with the "-A" option.

    I'm not sure how this will look like in Perl, but I assume it would be something like:

    ASSERT { stuff to check, things to warn about }

    The code block would not be compiled unless the -A flag is specified.

    I have no idea how that would look in Perl6, but I would assume it would be similar to what 5.10 will bring.

    Liz