=cut
+
$prompt ||= 'Password';
my $password;
=cut
- open my $pipe, '|', $to
+ open my $pipe, '|-', $to
or error "Unable to open pipe - $!", 1;
foreach (@output) {
=item $log
-Logger object to log stats to (if specified)
+Logger object to log stats to (if specified). Note: if the Logger object has
+errors or warnings then they will be automatically included in the output.
=back
my $msg = "$FindBin::Script Run Statistics:";
- if (scalar keys %$total) {
+ if ($log and ref $log eq 'Logger') {
+ $total->{errors} = $log->{errors};
+ $total->{warnings} = $log->{warnings};
+ } # if
+
+ if (keys %$total) {
# Display statistics (if any)
if ($log) {
$log->msg ($msg);
} # if
foreach (sort keys %$total) {
- $msg = $$total{$_} . "\t $_";
+ $msg = $total->{$_} . "\t $_";
if ($log) {
- $log->msg ($$total{$_} . "\t $_");
+ $log->msg ($total->{$_} . "\t $_");
} else {
display $msg;
} # if
L<POSIX>
-L<Term::ReadKey>
-
=head2 ClearSCM Perl Modules
=for html <p><a href="/php/scm_man.php?file=lib/Display.pm">Display</a></p>