--- a/SI/tools.pm Fri Jan 15 23:17:23 2010 +0100
+++ b/SI/tools.pm Sat Jan 16 23:53:50 2010 +0100
@@ -3,7 +3,8 @@
use strict;
use warnings;
use base "Exporter";
-our @EXPORT = qw(&run);
+our @EXPORT = qw(&run &verbose);
+use if $ENV{DEBUG} ~~ /tools|all/ => "Smart::Comments";
sub run(@) {
system(@_);
@@ -11,5 +12,13 @@
if $?;
}
+my $last = "\n";
+sub verbose(@) {
+ print $last eq "\n" ? "" : " "
+ if not(@_ == 1 and length($_[0]) == 1);
+ print @_;
+ $last = substr($_[-1], -1, 1);
+};
+
1;
# vim:sts=4 sw=4 aw ai si: