#####################################################################
#
-# the Perl::Tidy::IndentationItem class supplies items which contain
+# The Perl::Tidy::IndentationItem class supplies items which contain
# how much whitespace should be used at the start of a line
#
#####################################################################
package Perl::Tidy::IndentationItem;
use strict;
use warnings;
-our $VERSION = '20220613';
+our $VERSION = '20230309';
BEGIN {
_K_begin_line_ => $i++,
_arrow_count_ => $i++,
_standard_spaces_ => $i++,
+ _K_extra_space_ => $i++,
};
-}
+} ## end BEGIN
sub AUTOLOAD {
======================================================================
EOM
exit 1;
-}
+} ## end sub AUTOLOAD
sub DESTROY {
$self->[_K_begin_line_] = $input_hash{K_begin_line};
$self->[_arrow_count_] = 0;
$self->[_standard_spaces_] = $input_hash{standard_spaces};
+ $self->[_K_extra_space_] = $input_hash{K_extra_space};
bless $self, $class;
return $self;
-}
+} ## end sub new
sub permanently_decrease_available_spaces {
$item->set_recoverable_spaces(0);
return $deleted_spaces;
-}
+} ## end sub permanently_decrease_available_spaces
sub tentatively_decrease_available_spaces {
$item->decrease_SPACES($deleted_spaces);
$item->increase_recoverable_spaces($deleted_spaces);
return $deleted_spaces;
-}
+} ## end sub tentatively_decrease_available_spaces
sub get_stack_depth {
return $_[0]->[_stack_depth_];
$self->[_marked_] = $value;
}
return $self->[_marked_];
-}
+} ## end sub set_marked
sub get_available_spaces {
return $_[0]->[_available_spaces_];
$self->[_spaces_] -= $value;
}
return $self->[_spaces_];
-}
+} ## end sub decrease_SPACES
sub decrease_available_spaces {
my ( $self, $value ) = @_;
+
if ( defined($value) ) {
$self->[_available_spaces_] -= $value;
}
return $self->[_available_spaces_];
-}
+} ## end sub decrease_available_spaces
sub get_align_seqno {
return $_[0]->[_align_seqno_];
$self->[_recoverable_spaces_] = $value;
}
return $self->[_recoverable_spaces_];
-}
+} ## end sub set_recoverable_spaces
sub increase_recoverable_spaces {
my ( $self, $value ) = @_;
$self->[_recoverable_spaces_] += $value;
}
return $self->[_recoverable_spaces_];
-}
+} ## end sub increase_recoverable_spaces
sub get_ci_level {
return $_[0]->[_ci_level_];
return $_[0]->[_K_begin_line_];
}
+sub get_K_extra_space {
+ return $_[0]->[_K_extra_space_];
+}
+
sub set_have_child {
my ( $self, $value ) = @_;
if ( defined($value) ) {
$self->[_have_child_] = $value;
}
return $self->[_have_child_];
-}
+} ## end sub set_have_child
sub get_have_child {
return $_[0]->[_have_child_];
$self->[_arrow_count_] = $value;
}
return $self->[_arrow_count_];
-}
+} ## end sub set_arrow_count
sub get_arrow_count {
return $_[0]->[_arrow_count_];
$self->[_comma_count_] = $value;
}
return $self->[_comma_count_];
-}
+} ## end sub set_comma_count
sub get_comma_count {
return $_[0]->[_comma_count_];
$self->[_closed_] = $value;
}
return $self->[_closed_];
-}
+} ## end sub set_closed
sub get_closed {
return $_[0]->[_closed_];