in reply to Problem with ``use if COND, Some::Module'' on Linux
" ... (some code returning an empty list in list context?) ... "
Nothing to do with Proc::Daemon, but with the pattern match that returns an empty list:
Output:use strict; use warnings; use if scalar ( $^O !~ /Win32/ ), 'Proc::Daemon'; use if scalar ( $^O =~ /Win32/ ), 'Win32::Daemon'; print $INC{'Proc/Daemon.pm'}; exit; __END__
perl 1159936.pl /Users/nick/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Proc +/Daemon.pm
Hope this helps!
Updated: force scalar context so we can keep pattern matches
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem with ``use if COND, Some::Module'' on Linux
by stevieb (Canon) on Apr 08, 2016 at 17:39 UTC | |
by VinsWorldcom (Prior) on Apr 08, 2016 at 19:41 UTC | |
by stevieb (Canon) on Apr 08, 2016 at 17:45 UTC | |
by Laurent_R (Canon) on Apr 08, 2016 at 17:51 UTC | |
by Anonymous Monk on Apr 08, 2016 at 19:30 UTC | |
by 1nickt (Canon) on Apr 08, 2016 at 17:48 UTC |