X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=lib%2FSpeak.pm;h=d46249075db8f77950fdf171ba1410040b809adc;hb=97eb546aaaa669555baded5ba13ba5aaf2a16f33;hp=0869ed4aecae2d48e86f7b162849d342ddaca5a2;hpb=ded8d315fd3f6c050f759865b09f053ae85e52a5;p=clearscm.git diff --git a/lib/Speak.pm b/lib/Speak.pm index 0869ed4..d462490 100644 --- a/lib/Speak.pm +++ b/lib/Speak.pm @@ -47,6 +47,7 @@ use warnings; use base 'Exporter'; use FindBin; +use Clipboard; use lib "$FindBin::Bin/../lib"; @@ -103,15 +104,19 @@ Returns: =cut if (-f "$FindBin::Bin/shh") { + $msg .= ' [silent]'; if ($log) { - $log->msg("Not speaking because we were asked to be quiet - $msg"); + $log->msg($msg); } else { - verbose "Not speaking because we were asked to be quiet - $msg"; + verbose $msg; } # if return; } # if + # Handle the case where $msg is not passed in. Then use the clipboard; + $msg = Clipboard->paste unless $msg; + # Handle the case where $msg is a filehandle $msg = <$msg> if ref $msg eq 'GLOB';