portability fix on linux

This commit is contained in:
Oliver Gorwits
2014-08-08 06:32:02 +00:00
parent d5675c1bb3
commit f176d7c1ba
4 changed files with 9 additions and 6 deletions

View File

@@ -7,6 +7,9 @@ use FindBin;
FindBin::again(); FindBin::again();
use Path::Class 'dir'; use Path::Class 'dir';
# get a segfault if we load this later
use if $^O eq 'linux', 'Sys::Proctitle';
BEGIN { BEGIN {
# stuff useful locations into @INC # stuff useful locations into @INC
unshift @INC, unshift @INC,

View File

@@ -69,8 +69,8 @@ sub summary {
return join ' ', return join ' ',
$job->action, $job->action,
($job->device || ''), ($job->device || ''),
($job->port || ''), ($job->port || '');
($job->subaction ? (q{'}. $job->subaction .q{'}) : ''); # ($job->subaction ? (q{'}. $job->subaction .q{'}) : '');
} }
=head1 ADDITIONAL COLUMNS =head1 ADDITIONAL COLUMNS

View File

@@ -57,8 +57,8 @@ sub summary {
return join ' ', return join ' ',
$job->action, $job->action,
($job->device || ''), ($job->device || ''),
($job->port || ''), ($job->port || '');
($job->subaction ? (q{'}. $job->subaction .q{'}) : ''); # ($job->subaction ? (q{'}. $job->subaction .q{'}) : '');
} }
=head1 ADDITIONAL COLUMNS =head1 ADDITIONAL COLUMNS

View File

@@ -3,8 +3,8 @@ package App::Netdisco::Util::Daemon;
use strict; use strict;
use warnings; use warnings;
use Module::Load (); # make sure this is already done elsewhere
eval { Module::Load::load 'Sys::Proctitle' }; use if $^O eq 'linux', 'Sys::Proctitle';
use base 'Exporter'; use base 'Exporter';
our @EXPORT = 'prctl'; our @EXPORT = 'prctl';