428
|
3 |
63 |
0 |
$line =~ /
\A
\s *+ # requires perl v5.10
( $RE{'name'} )
(*PRUNE) # requires perl v5.10
(?:
\s ++
( $RE{'mark'} )
(*PRUNE)
(?:
\s ++
( $RE{'comment'} )
) ?
) ?
\s *
\z
/x and do {
my($name, $mark, $comment) = ($1, $2, $3);
if ($name =~ s/ \A ' ( . * ) ' \z /$1;/ex) {
$name =~ s/ \\ ( ['\\] ) /$1;/egx;
};
if (exists $files{$name}) {
my $f = $files{$name};
$self->log_error(['%s at %s line %d', $name, $manifest, $n]);
$self->log_error([' also listed at %s line %d.', $manifest, $f->{'line'}]);
push @errors, $n, 'The file also listed at line ' . $f->{'line'} . '.', $f->{'line'}, 'The file also listed at line ' . $n . '.';
next;
};
my $file = {'name', $name, 'mark', $mark // '+', 'comment', $comment, 'line', $n};
$files{$name} = $file;
push @files, $file;
1
}
|