@@ -127,7 +127,7 @@ my %commands = (
127127sub new {
128128 my ( $class , $args ) = @_ ;
129129
130- $args = {} unless defined $args ;
130+ $args = {} unless defined $args ;
131131 die " Argument to new is not a hashref.\n " unless ' HASH' eq ref $args ;
132132 foreach my $arg (@required ) {
133133 die " Missing required '$arg ' argument.\n " unless defined $args -> {$arg } and length $args -> {$arg };
@@ -140,14 +140,14 @@ sub new {
140140 $self -> {$arg } = $args -> {$arg };
141141 }
142142 $self -> {sdir } ||= $self -> {qdir } if $self -> {sname };
143- $self -> {out } ||= \*STDOUT ;
143+ $self -> {out } ||= \*STDOUT ;
144144
145145 return bless $self , $class ;
146146}
147147
148148sub run {
149149 my ( $self , $cmd , @args ) = @_ ;
150- die " No command supplied to run.\n " unless $cmd ;
150+ die " No command supplied to run.\n " unless $cmd ;
151151 die " Unrecognized command '$cmd ' to run.\n " unless exists $commands {$cmd };
152152
153153 $commands {$cmd }-> {code }-> ( $self , $self -> {out }, $self -> _get_queue(), $self -> _get_scheduler(), @args );
@@ -177,7 +177,7 @@ sub _get_queue {
177177 {
178178 name => $self -> {qname },
179179 state_dir => $self -> {qdir },
180- ( exists $self -> {logger } ? ( logger => $self -> {logger } ) : () ),
180+ ( exists $self -> {logger } ? ( logger => $self -> {logger } ) : () ),
181181 ( defined $self -> {serial } ? ( serial => $format { lc $self -> {serial } } ) : () ),
182182 }
183183 );
@@ -194,7 +194,7 @@ sub _get_scheduler {
194194 {
195195 name => $self -> {sname },
196196 state_dir => $self -> {sdir },
197- ( exists $self -> {logger } ? ( logger => $self -> {logger } ) : () ),
197+ ( exists $self -> {logger } ? ( logger => $self -> {logger } ) : () ),
198198 ( defined $self -> {serial } ? ( serial => $format { lc $self -> {serial } } ) : () ),
199199 }
200200 );
@@ -318,7 +318,7 @@ sub list_tasks {
318318 my ( $ctrl , $fh , $queue , $sched , @subcmds ) = @_ ;
319319 my $print = \&_print_task;
320320 if ( _any_is( ' verbose' , @subcmds ) ) {
321- $print = \&_verbosely_print_task;
321+ $print = \&_verbosely_print_task;
322322 @subcmds = grep { $_ ne ' verbose' } @subcmds ;
323323 }
324324
@@ -451,7 +451,7 @@ sub _convert_a_state_file {
451451 my $curr_serial = $q -> _serializer();
452452 if ( $new_serial ne $curr_serial ) {
453453 my $curr_state_file = $q -> _state_file();
454- my $new_state_file = $new_serial -> filename( substr ( $curr_state_file , 0, rindex ( $curr_state_file , ' .' ) ) );
454+ my $new_state_file = $new_serial -> filename( substr ( $curr_state_file , 0, rindex ( $curr_state_file , ' .' ) ) );
455455 open my $ifh , ' <' , $curr_state_file or die " Unable to read '$curr_state_file ': $! \n " ;
456456 open my $ofh , ' >' , $new_state_file or die " Unable to write '$new_state_file ': $! \n " ;
457457 $new_serial -> save( $ofh , $curr_serial -> load($ifh ) );
@@ -541,9 +541,9 @@ sub delete_unprocessed_tasks {
541541
542542sub _print_task {
543543 my ( $fh , $task ) = @_ ;
544- print $fh ' [' , $task -> uuid, ' ]: ' , $task -> full_command, " \n " ;
544+ print $fh ' [' , $task -> uuid, ' ]: ' , $task -> full_command, " \n " ;
545545 print $fh " \t Queued: " , scalar ( localtime $task -> timestamp ), " \n " ;
546- print $fh " \t Started: " , scalar ( localtime $task -> started ), " \n " if defined $task -> started;
546+ print $fh " \t Started: " , scalar ( localtime $task -> started ), " \n " if defined $task -> started;
547547 return ;
548548}
549549
0 commit comments