File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,19 +119,23 @@ sub column_printer {
119119 }
120120 }
121121
122- # Print by row
123- my $col_idx = $self -> column_count - 1;
124- my $row_idx = scalar @{$items_in_cols -> [0]} - 1;
122+ $self -> print_by_row($items_in_cols );
123+
124+ return ;
125+ }
125126
126- my $templ = $self -> build_printf_template($items_in_cols , $col_idx );
127+ sub print_by_row {
128+ my ( $self , $items_in_cols ) = @_ ;
129+ my $col_idx = $self -> column_count - 1;
130+ my $row_idx = scalar @{ $items_in_cols -> [0] } - 1;
131+ my $templ = $self -> build_printf_template( $items_in_cols , $col_idx );
127132 for my $r ( 0 .. $row_idx ) {
128133 my @row = ();
129134 for my $c ( 0 .. $col_idx ) {
130135 push @row , $items_in_cols -> [$c ][$r ] // ' ' ;
131136 }
132137 printf " $templ \n " , @row ;
133138 }
134-
135139 return ;
136140}
137141
You can’t perform that action at this time.
0 commit comments