Permalink
Browse files

Merge pull request #1 from jonallen/master

Remove spurious newline from Mac command results
  • Loading branch information...
barbie committed May 27, 2011
2 parents 9016711 + 8c4266e commit c86511eeea8242eec9e44084168215762cadc8ca
Showing with 7 additions and 4 deletions.
  1. +3 −0 Changes
  2. +1 −1 lib/Devel/Platform/Info.pm
  3. +3 −3 lib/Devel/Platform/Info/Mac.pm
View
@@ -1,6 +1,9 @@
Revision history for Perl library Devel-Platform-Info
=====================================================
+0.09 25/05/2011
+ - remove trailing newlines from Mac command results (JJ)
+
0.08 01/04/2011
- added Scientific Linux distro (as suggested by Norbert Gruener).
@@ -4,7 +4,7 @@ use strict;
use warnings;
use vars qw($VERSION);
-$VERSION = '0.08';
+$VERSION = '0.09';
#----------------------------------------------------------------------------
@@ -4,7 +4,7 @@ use strict;
use warnings;
use vars qw($VERSION);
-$VERSION = '0.08';
+$VERSION = '0.09';
#-------------------------------------------------------------------------------
@@ -21,7 +21,7 @@ sub new {
sub get_info {
my $self = shift;
$self->{info}{osname} = 'Mac';
- $self->{info}{osflag} = $^O;
+ $self->{info}{osflag} = $^O;
my $uname_s = $self->_command('uname -s');
if ($uname_s =~ /Darwin/i) {
@@ -62,10 +62,10 @@ sub _command {
my $self = shift;
my $command = shift;
my $result = `$command`;
+ chomp $result;
$self->{info}{source}{$command} = $result;
- chomp $result;
return $result;
}

0 comments on commit c86511e

Please sign in to comment.