Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove spurious newline from Mac command results #1

Merged
merged 2 commits into from May 27, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes
@@ -1,6 +1,9 @@
Revision history for Perl library Devel-Platform-Info 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 0.08 01/04/2011
- added Scientific Linux distro (as suggested by Norbert Gruener). - added Scientific Linux distro (as suggested by Norbert Gruener).


Expand Down
2 changes: 1 addition & 1 deletion lib/Devel/Platform/Info.pm
Expand Up @@ -4,7 +4,7 @@ use strict;
use warnings; use warnings;


use vars qw($VERSION); use vars qw($VERSION);
$VERSION = '0.08'; $VERSION = '0.09';


#---------------------------------------------------------------------------- #----------------------------------------------------------------------------


Expand Down
6 changes: 3 additions & 3 deletions lib/Devel/Platform/Info/Mac.pm
Expand Up @@ -4,7 +4,7 @@ use strict;
use warnings; use warnings;


use vars qw($VERSION); use vars qw($VERSION);
$VERSION = '0.08'; $VERSION = '0.09';


#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------


Expand All @@ -21,7 +21,7 @@ sub new {
sub get_info { sub get_info {
my $self = shift; my $self = shift;
$self->{info}{osname} = 'Mac'; $self->{info}{osname} = 'Mac';
$self->{info}{osflag} = $^O; $self->{info}{osflag} = $^O;


my $uname_s = $self->_command('uname -s'); my $uname_s = $self->_command('uname -s');
if ($uname_s =~ /Darwin/i) { if ($uname_s =~ /Darwin/i) {
Expand Down Expand Up @@ -62,10 +62,10 @@ sub _command {
my $self = shift; my $self = shift;
my $command = shift; my $command = shift;
my $result = `$command`; my $result = `$command`;
chomp $result;


$self->{info}{source}{$command} = $result; $self->{info}{source}{$command} = $result;


chomp $result;
return $result; return $result;
} }


Expand Down