projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed to use $FindBin::Script more consistently.
[clearscm.git]
/
lib
/
Utils.pm
diff --git
a/lib/Utils.pm
b/lib/Utils.pm
index
74fe13c
..
acebce5
100644
(file)
--- a/
lib/Utils.pm
+++ b/
lib/Utils.pm
@@
-346,6
+346,7
@@
Returns:
=cut
=cut
+
$prompt ||= 'Password';
my $password;
$prompt ||= 'Password';
my $password;
@@
-528,7
+529,7
@@
Returns:
=cut
=cut
- open my $pipe, '|', $to
+ open my $pipe, '|
-
', $to
or error "Unable to open pipe - $!", 1;
foreach (@output) {
or error "Unable to open pipe - $!", 1;
foreach (@output) {
@@
-826,7
+827,8
@@
and the values of the hash will be the counters.
=item $log
=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
=back
@@
-848,7
+850,12
@@
Returns:
my $msg = "$FindBin::Script Run Statistics:";
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);
# Display statistics (if any)
if ($log) {
$log->msg ($msg);
@@
-857,10
+864,10
@@
Returns:
} # if
foreach (sort keys %$total) {
} # if
foreach (sort keys %$total) {
- $msg = $
$total
{$_} . "\t $_";
+ $msg = $
total->
{$_} . "\t $_";
if ($log) {
if ($log) {
- $log->msg ($
$total
{$_} . "\t $_");
+ $log->msg ($
total->
{$_} . "\t $_");
} else {
display $msg;
} # if
} else {
display $msg;
} # if
@@
-935,8
+942,6
@@
L<FindBin>
L<POSIX>
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>
=head2 ClearSCM Perl Modules
=for html <p><a href="/php/scm_man.php?file=lib/Display.pm">Display</a></p>