The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Syntax::Feature::Loop - Provides the loop BLOCK syntax for unconditional loops.

VERSION

Version 1.8.0

SYNOPSIS

    use syntax qw( loop );

    loop {
       ...
       last if ...;
       ...
    }

DESCRIPTION

Syntax::Feature::Loop is a lexically-scoped pragma that provides the loop BLOCK syntax for unconditional loops.

This module serves as a demonstration of the cv_set_call_parser and cv_set_call_checker Perl API calls.

use syntax qw( loop );

use Syntax::Feature::Loop;

Enables the use of loop BLOCK until the end of the current lexical scope.

no syntax qw( loop );

no Syntax::Feature::Loop;

Restores the standard behaviour of loop (a sub call) until the end of the current lexical scope.

loop BLOCK

Repeatedly executes the BLOCK until it is exited using last, return, die, etc.

In other words, it behaves just like all of the following:

  • for (;;) BLOCK

  • while (1) BLOCK

  • while () BLOCK

Like other flow control statements, there is no need to terminate the statement with a semi-colon (;).

SEE ALSO

BUGS

Please report any bugs or feature requests to bug-Syntax-Feature-Loop at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Syntax-Feature-Loop. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Syntax::Feature::Loop

You can also look for information at:

AUTHOR

Eric Brine, <ikegami@adaelis.com>

COPYRIGHT & LICENSE

No rights reserved.

The author has dedicated the work to the Commons by waiving all of his or her rights to the work worldwide under copyright law and all related or neighboring legal rights he or she had in the work, to the extent allowable by law.

Works under CC0 do not require attribution. When citing the work, you should not imply endorsement by the author.