syphilis has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
The current Inline/C/Makefile.PL (http://search.cpan.org/src/INGY/Inline-0.44/C/Makefile.PL) begins with the following code:
Cheers,
Rob
The current Inline/C/Makefile.PL (http://search.cpan.org/src/INGY/Inline-0.44/C/Makefile.PL) begins with the following code:
I have difficulty working out how $cc will ever match |/:\[| - can someone here provide some insight into the point of that test ?use strict; use ExtUtils::MakeMaker; use Config; use File::Spec; my ($cc, $exe) = @Config{'cc', '_exe'}; $cc =~ s/\s+-.+$//; #remove possible trailing options my $found = 0; my $delim = $^O eq 'MSWin32' ? ';' : ':'; if ($cc =~ m|/:\[|) { $found = -f "$cc$exe"; } else { for my $lib (split $delim, $ENV{PATH}) { $found = -f File::Spec->catfile($lib,"$cc$exe") and last; } }
Cheers,
Rob
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Stumped by regex
by JavaFan (Canon) on Nov 10, 2008 at 11:43 UTC | |
by syphilis (Archbishop) on Nov 10, 2008 at 21:25 UTC | |
by ikegami (Patriarch) on Nov 10, 2008 at 22:33 UTC | |
by blazar (Canon) on Nov 11, 2008 at 11:49 UTC | |
Re: Stumped by regex
by ikegami (Patriarch) on Nov 10, 2008 at 11:17 UTC |
Back to
Seekers of Perl Wisdom