line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##################################################################### |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# the Perl::Tidy::VerticalAligner::Alignment class holds information |
4
|
|
|
|
|
|
|
# on a single column being aligned |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
##################################################################### |
7
|
|
|
|
|
|
|
package Perl::Tidy::VerticalAligner::Alignment; |
8
|
39
|
|
|
39
|
|
287
|
use strict; |
|
39
|
|
|
|
|
87
|
|
|
39
|
|
|
|
|
1234
|
|
9
|
39
|
|
|
39
|
|
224
|
use warnings; |
|
39
|
|
|
|
|
118
|
|
|
39
|
|
|
|
|
12328
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
{ #<<< A non-indenting brace |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '20230912'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
6967
|
|
|
6967
|
0
|
13393
|
my ( $class, $rarg ) = @_; |
17
|
6967
|
|
|
|
|
12407
|
my $self = bless $rarg, $class; |
18
|
6967
|
|
|
|
|
13897
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub AUTOLOAD { |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Catch any undefined sub calls so that we are sure to get |
24
|
|
|
|
|
|
|
# some diagnostic information. This sub should never be called |
25
|
|
|
|
|
|
|
# except for a programming error. |
26
|
0
|
|
|
0
|
|
0
|
our $AUTOLOAD; |
27
|
0
|
0
|
|
|
|
0
|
return if ( $AUTOLOAD =~ /\bDESTROY$/ ); |
28
|
0
|
|
|
|
|
0
|
my ( $pkg, $fname, $lno ) = caller(); |
29
|
0
|
|
|
|
|
0
|
my $my_package = __PACKAGE__; |
30
|
0
|
|
|
|
|
0
|
print {*STDERR} <<EOM; |
|
0
|
|
|
|
|
0
|
|
31
|
|
|
|
|
|
|
====================================================================== |
32
|
|
|
|
|
|
|
Error detected in package '$my_package', version $VERSION |
33
|
|
|
|
|
|
|
Received unexpected AUTOLOAD call for sub '$AUTOLOAD' |
34
|
|
|
|
|
|
|
Called from package: '$pkg' |
35
|
|
|
|
|
|
|
Called from File '$fname' at line '$lno' |
36
|
|
|
|
|
|
|
This error is probably due to a recent programming change |
37
|
|
|
|
|
|
|
====================================================================== |
38
|
|
|
|
|
|
|
EOM |
39
|
0
|
|
|
|
|
0
|
exit 1; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
0
|
|
|
sub DESTROY { |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# required to avoid call to AUTOLOAD in some versions of perl |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub get_column { |
48
|
8516
|
|
|
8516
|
0
|
18705
|
return $_[0]->{'column'}; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub increment_column { |
52
|
6368
|
|
|
6368
|
0
|
9919
|
$_[0]->{'column'} += $_[1]; |
53
|
|
|
|
|
|
|
|
54
|
6368
|
|
|
|
|
12715
|
return; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub save_column { |
58
|
3451
|
|
|
3451
|
0
|
6891
|
$_[0]->{'saved_column'} = $_[0]->{'column'}; |
59
|
3451
|
|
|
|
|
6700
|
return; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub restore_column { |
63
|
39
|
|
|
39
|
0
|
79
|
$_[0]->{'column'} = $_[0]->{'saved_column'}; |
64
|
39
|
|
|
|
|
75
|
return; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
} ## end of package VerticalAligner::Alignment |
67
|
|
|
|
|
|
|
1; |