projects
/
scpubgit/System-Introspector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
c23ab97
)
Remove whitespace around hostname
Robert 'phaylon' Sedlacek [Mon, 21 May 2012 22:30:30 +0000 (22:30 +0000)]
lib/System/Introspector/Host.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/System/Introspector/Host.pm
b/lib/System/Introspector/Host.pm
index
0cc0658
..
6fd49ca
100644
(file)
--- a/
lib/System/Introspector/Host.pm
+++ b/
lib/System/Introspector/Host.pm
@@
-45,6
+45,7
@@
sub _gather_hostname {
my ($self) = @_;
my $hostname = output_from_file '/etc/hostname';
chomp $hostname;
+ $hostname =~ s{(?:^\s+|\s+$)}{}g;
return $hostname;
}