@@ -25,62 +25,62 @@ if (!open $fh, '<', $file) {
2525close $fh or warn qq{ Could not close "$file ": $! \n } ;
2626
2727if ($slurp !~ / \$ action_info = (.+?)\} /s ) {
28- fail q{ Could not find the 'action_info' section} ;
28+ fail q{ Could not find the 'action_info' section} ;
2929}
3030my $chunk = $1 ;
3131my @actions ;
3232for my $line (split /\n/ => $chunk ) {
33- push @actions => $1 if $line =~ / ^\s *(\w +)/ ;
33+ push @actions => $1 if $line =~ / ^\s *(\w +)/ ;
3434}
3535
3636# # Make sure each of those still exists as a subroutine
3737for my $action (@actions ) {
38- next if $action =~ / last_auto/ ;
38+ next if $action =~ / last_auto/ ;
3939
40- my $match = $action ;
41- $match = ' pgb_pool' if $match =~ / pgb_pool/ ;
40+ my $match = $action ;
41+ $match = ' pgb_pool' if $match =~ / pgb_pool/ ;
4242
43- if ($slurp !~ / \n\s *sub check_$match / ) {
44- fail qq{ Could not find a check sub for the action '$action ' ($match )!} ;
45- }
43+ if ($slurp !~ / \n\s *sub check_$match / ) {
44+ fail qq{ Could not find a check sub for the action '$action ' ($match )!} ;
45+ }
4646}
4747pass ' Found matching check subroutines for each action inside of action_info' ;
4848
4949# # Make sure each check subroutine is documented
5050while ($slurp =~ / \n\s *sub check_(\w +)/g ) {
51- my $match = $1 ;
51+ my $match = $1 ;
5252
53- # # Skip known exceptions:
54- next if $match eq ' last_vacuum_analyze' or $match eq ' pgb_pool' ;
53+ # # Skip known exceptions:
54+ next if $match eq ' last_vacuum_analyze' or $match eq ' pgb_pool' ;
5555
56- if (! grep { $match eq $_ } @actions ) {
57- fail qq{ The check subroutine check_$match was not found in the help!} ;
58- }
56+ if (! grep { $match eq $_ } @actions ) {
57+ fail qq{ The check subroutine check_$match was not found in the help!} ;
58+ }
5959}
6060pass ' Found matching help for each check subroutine' ;
6161
6262# # Make sure each item in the top help is in the POD
6363my @pods ;
6464while ($slurp =~ / \n =head2 B<(\w +)>/g ) {
65- my $match = $1 ;
65+ my $match = $1 ;
6666
67- # # Skip known exceptions:
68- next if $match =~ / symlinks/ ;
67+ # # Skip known exceptions:
68+ next if $match =~ / symlinks/ ;
6969
70- if (! grep { $match eq $_ } @actions ) {
71- fail qq{ The check subroutine check_$match was not found in the POD!} ;
72- }
70+ if (! grep { $match eq $_ } @actions ) {
71+ fail qq{ The check subroutine check_$match was not found in the POD!} ;
72+ }
7373
74- push @pods => $match ;
74+ push @pods => $match ;
7575}
7676pass ' Found matching POD for each check subroutine' ;
7777
7878# # Make sure things are in the same order for both top (--help) and bottom (POD)
7979for my $action (@actions ) {
80- my $pod = shift @pods ;
81- if ($action ne $pod ) {
82- fail qq{ Docs out of order: expected $action in POD section, but got $pod instead!} ;
83- }
80+ my $pod = shift @pods ;
81+ if ($action ne $pod ) {
82+ fail qq{ Docs out of order: expected $action in POD section, but got $pod instead!} ;
83+ }
8484}
8585pass ' POD actions appear in the correct order' ;
8686
0 commit comments