Shorten lines
Paul Johnson
1 year, 11 months ago
684 | 684 | } |
685 | 685 | } |
686 | 686 | # e.g.: count:1 | count:2,5 | count:1,4..7 |
687 | $count = $1 if $info =~ /count:(\d+(?:\.\.\d+)?(?:,\d+(?:\.\.\d+)?)*)/; | |
688 | my @counts = map { m/^(\d+)\.\.(\d+)$/ ? ($1 .. $2) : $_ } split m/,/, $count; | |
687 | my $c = qr/\d+(?:\.\.\d+)?/; | |
688 | $count = $1 if $info =~ /count:($c(?:,$c)*)/; | |
689 | my @counts = map { m/^(\d+)\.\.(\d+)$/ ? ($1 .. $2) : $_ } | |
690 | split m/,/, $count; | |
689 | 691 | $class = $1 if $info =~ /class:(\w+)/; |
690 | 692 | $note = $1 if $info =~ /note:(.+)/; |
691 | 693 | |
692 | # no warnings "uninitialized"; | |
693 | # warn "pushing $criterion, $count, $type, $class, $note"; | |
694 | ||
695 | 694 | for my $c (@counts) { |
695 | # no warnings "uninitialized"; | |
696 | # warn "pushing $criterion, $c - 1, $type, $class, $note"; | |
696 | 697 | push @waiting, [$criterion, $c - 1, $type, $class, $note]; |
697 | 698 | } |
698 | 699 |