=begin pod :kind("Type") :subkind("class") :category("exception")

=TITLE role CX::Next

=SUBTITLE Next control exception

    role CX::Next does X::Control { }

A L<control exception|/language/exceptions#Control_exceptions> that is triggered
when C<next> is called.

=for code
for ^10 {
    CONTROL {
      when CX::Next { say "We're next" };
    }
    next if $_ %% 2;
    say "We're in $_";
}

This will print:

=for code :lang<text>
We're next
We're in 1
We're next
We're in 3
We're next
We're in 5
We're next
We're in 7
We're next
We're in 9


=head1 Methods

=head2 method message

Defined as:

    method message()

Returns "<next control exception>"

=end pod
