Acme-MITHALDU-XSGrabBag
view release on metacpan or search on metacpan
inc/Inline/denter.pm view on Meta::CPAN
local $_ = shift @{$o->{lines}};
$o->{line}++;
}
sub _setup_line {
my $o = shift;
$o->{done}++, $o->{level} = -1, return unless @{$o->{lines}};
my ($width, $tabwidth) = @{$o}{qw(width tabwidth)};
while (1) {
local $_ = $o->{lines}[0];
# expand tabs in leading whitespace;
$o->next_line, next if /^(\s*$|\#)/; # skip comments and blank lines
while (s{^( *)(\t+)}
{' ' x (length($1) + length($2) * $tabwidth -
length($1) % $tabwidth)}e){}
croak $o->M01_invalid_indent_width unless /^(( {$width})*)(\S.*)$/;
$o->{level} = length($1) / $width;
$o->{content} = $3;
last;
}
}
( run in 1.841 second using v1.01-cache-2.11-cpan-97f6503c9c8 )