From 90ac21c824364ac0a18681b88bbeb2d25a7456be Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Mon, 10 Nov 2014 10:59:13 +0100 Subject: Portage.pm : Enhanced eix detection code and added an optional debug message to print the found location. --- Portage.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Portage.pm b/Portage.pm index 5aacd42..534de52 100644 --- a/Portage.pm +++ b/Portage.pm @@ -153,8 +153,11 @@ INIT { $_eix_cmd = qx{which eix 2>/dev/null}; defined($_eix_cmd) and chomp $_eix_cmd + and length($_eix_cmd) and -x $_eix_cmd - and $_has_eix = 1; + and $_has_eix = 1 + and debugMsg("Found eix in \"$_eix_cmd\"") + or $_has_eix = 0; # Initialize basics _determine_eprefix_portdir; @@ -211,9 +214,9 @@ INIT { sub debugMsg { my ($msg) = @_; - DEBUG or return; + DEBUG or return 1; print STDERR "$msg\n"; - return; + return 1; } # --- private methods implementations --- -- cgit v1.2.3-65-gdbad