DMS-Parser
view release on metacpan or search on metacpan
lib/DMS/Parser.pm view on Meta::CPAN
}
last INNER;
}
$self->{pos} = pos($$src_ref) // $self->{pos};
$self->{line} = $line;
$self->{line_start} = $self->{pos};
}
$self->_skip_trivia;
last if $self->{pos} >= $self->{len};
# Inline _measure_line_indent: hot enough that the call cost
# matters across 50k iterations. For indent==0 (most flat
# tables) we can skip the regex when pos is already at
# line_start with no leading space â by far the common case.
my $li;
if ($indent == 0 && $self->{pos} == $self->{line_start}
&& substr($self->{src}, $self->{pos}, 1) ne ' ') {
$li = 0;
} else {
pos($self->{src}) = $self->{line_start};
$li = $self->{src} =~ /\G( +)/g ? length($1) : 0;
}
( run in 1.196 second using v1.01-cache-2.11-cpan-71847e10f99 )