diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-02-04 20:46:25 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-02-04 20:46:25 +0000 |
commit | 7ad017a8809c03aa288ac99952c8d4599b17f858 (patch) | |
tree | a0245a32f0f3214e23c7fdd58288c20e2201758e /make_ext.pl | |
parent | c5aac6ab2185ab7d2daf43bdd9b22939121004c6 (diff) | |
download | perl-7ad017a8809c03aa288ac99952c8d4599b17f858.tar.gz |
When normalising @extspec, use the result of s/// in if() rather than m//
Diffstat (limited to 'make_ext.pl')
-rw-r--r-- | make_ext.pl | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/make_ext.pl b/make_ext.pl index c5a91599cd..2875422b3a 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -76,18 +76,15 @@ my $dynamic = $opts{dynamic} || $opts{all}; # canonise into X/Y form (pname) foreach (@extspec) { - if (/^lib/) { + if (s{^lib/auto/}{}) { # Remove lib/auto prefix and /*.* suffix - s{^lib/auto/}{}; s{/[^/]+\.[^/]+$}{}; - } elsif (/^ext/) { + } elsif (s{^ext/}{}) { # Remove ext/ prefix and /pm_to_blib suffix - s{^ext/}{}; s{/pm_to_blib$}{}; - } elsif (/::/) { + } elsif (s{::}{\/}g) { # Convert :: to / - s{::}{\/}g; - } elsif (/\..*o$/) { + } else { s/\..*o//; } } |