Loop-Control

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      }
   },
   "requires" : {
      "Scalar::Util" : "0",
      "Scope::Upper" : "0",
      "English" : "0",
      "Exporter" : "0",
      "Carp" : "0",
      "perl" : "5.008",
      "Test::More" : "0.88",
      "Test::Differences" : "0",
      "File::Find" : "0",
      "File::Temp" : "0"
   },
   "abstract" : "FIRST and NEXT functions for loops",
   "configure_requires" : {
      "ExtUtils::MakeMaker" : "6.11"
   }
}

META.yml  view on Meta::CPAN

    file: lib/Loop/Control.pm
    version: 1.100861
requires:
  Carp: 0
  English: 0
  Exporter: 0
  File::Find: 0
  File::Temp: 0
  Scalar::Util: 0
  Scope::Upper: 0
  Test::Differences: 0
  Test::More: 0.88
  perl: 5.008
resources:
  bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Loop-Control
  homepage: http://search.cpan.org/dist/Loop-Control/
  repository: http://github.com/hanekomu/Loop-Control
version: 1.100861

Makefile.PL  view on Meta::CPAN

                       'ABSTRACT' => 'FIRST and NEXT functions for loops',
                       'EXE_FILES' => [],
                       'VERSION' => '1.100861',
                       'PREREQ_PM' => {
                                        'Scalar::Util' => '0',
                                        'Scope::Upper' => '0',
                                        'English' => '0',
                                        'Exporter' => '0',
                                        'Carp' => '0',
                                        'Test::More' => '0.88',
                                        'Test::Differences' => '0',
                                        'File::Find' => '0',
                                        'File::Temp' => '0'
                                      },
                       'LICENSE' => 'perl'
                     );


delete $WriteMakefileArgs{LICENSE}
  unless eval { ExtUtils::MakeMaker->VERSION(6.31) };

t/first.pl  view on Meta::CPAN

#!/usr/bin/env perl
use warnings;
use strict;
use Loop::Control;
use Test::More tests => 1;
use Test::Differences;
my $output = '';
sub record { $output .= join '' => @_ }

sub doit {
    my ($level, $iterations) = @_;
    return if $level > 2;
    record "level $level: begin\n";
    for (1 .. $iterations) {
        FIRST { record "level $level, block 1, iter $_: FIRST A\n" };
        record "level $level, block 1, iter $_: before\n";

t/for-next.t  view on Meta::CPAN

#!/usr/bin/env perl
use warnings;
use strict;
use Loop::Control;
use Test::More tests => 1;
use Test::Differences;
my $output = '';
sub record { $output .= join '' => @_ }
record "before the loop\n";

for my $x (1 .. 4) {
    NEXT { record "reap A iteration $x\n" };
    record "begin iteration $x\n";
    NEXT { record "reap B iteration $x\n" };
    next;
    record "end iteration $x\n";

t/while-next.t  view on Meta::CPAN

#!/usr/bin/env perl
use warnings;
use strict;
use Loop::Control;
use Test::More tests => 1;
use Test::Differences;
my $output = '';
sub record { $output .= join '' => @_ }
record "before the loop\n";
my $x = 0;

while ($x < 4) {
    NEXT { record "reap A iteration $x\n" };
    $x++;
    record "begin iteration $x\n";
    NEXT { record "reap B iteration $x\n" };



( run in 0.411 second using v1.01-cache-2.11-cpan-131fc08a04b )