NAME
Syntax::Feature::Loop - Provides the loop BLOCK
syntax for unconditional loops.
VERSION
Version 1.10.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 ability to add keywords to the Perl language using PL_keyword_plugin
.
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
DOCUMENTATION AND SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Syntax::Feature::Loop
You can also find it online at this location:
If you need help, the following are great resources:
You may also contact the author directly.
BUGS
Please report any bugs or feature requests using https://github.com/ikegami/perl-Syntax-Feature-Loop/issues. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
REPOSITORY
AUTHOR
Eric Brine, <ikegami@adaelis.com>
COPYRIGHT AND 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.