Skip to content

Commit

Permalink
Added "say" option (auto-append "\n" to output)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjendoubi committed Aug 11, 2011
1 parent 9fdfa45 commit fa8319d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.swp
3 changes: 3 additions & 0 deletions lib/Debug/Simple.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ sub warning {
return if $opt->{quiet};
#warn ("Warning: ", @_);
print YELLOW ("Warning: ", @_);
print "\n" if defined $opt->{say};
print "";
}

Expand All @@ -52,6 +53,7 @@ sub debug {
#print "TEST\n" if defined $opt->{test} && $level[3];

my $str = shift || '';
$str = $str . "\n" if defined $opt->{say};
my $name = shift;

print BOLD "Debug: " unless $level[1] || $level[2];
Expand All @@ -74,6 +76,7 @@ sub verbose {
|| ($opt->{test} && $level[1]);

print @_;
print "\n" if defined $opt->{say};
print "";
}

Expand Down

0 comments on commit fa8319d

Please sign in to comment.