diff options
author | Reini Urban <rurban@x-ray.at> | 2011-11-02 13:17:15 -0500 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-02 12:59:59 -0700 |
commit | 928b2f01177c40be013139c657d79c631790a916 (patch) | |
tree | 85eb4900aab90ad3f441eb7f2d6d701cea0d022c /ext/Errno | |
parent | f3640611309ab8d6271598d071119f09fd9e8cf0 (diff) | |
download | perl-928b2f01177c40be013139c657d79c631790a916.tar.gz |
Errno does not escape archname
With a @ or $ or % character in the user-choosen archname, Errno fails.
I usually use @ to denote git tags in the archlib.
E.g. Possible unintended interpolation of @khwtk in string at ../lib/Errno.pm line 12
Diffstat (limited to 'ext/Errno')
-rw-r--r-- | ext/Errno/Errno_pm.PL | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL index 7cd7a249d2..439f2544ca 100644 --- a/ext/Errno/Errno_pm.PL +++ b/ext/Errno/Errno_pm.PL @@ -2,7 +2,7 @@ use ExtUtils::MakeMaker; use Config; use strict; -our $VERSION = "1.14"; +our $VERSION = "1.15"; my %err = (); my %wsa = (); @@ -316,6 +316,10 @@ EOF } } + # escape $Config{'archname'} + my $archname = $Config{'archname'}; + $archname =~ s/([@%\$])/\\\1/g; + # Write Errno.pm print <<"EDQ"; @@ -330,8 +334,8 @@ use Config; use strict; "\$Config{'archname'}-\$Config{'osvers'}" eq -"$Config{'archname'}-$Config{'osvers'}" or - die "Errno architecture ($Config{'archname'}-$Config{'osvers'}) does not match executable architecture (\$Config{'archname'}-\$Config{'osvers'})"; +"$archname-$Config{'osvers'}" or + die "Errno architecture ($archname-$Config{'osvers'}) does not match executable architecture (\$Config{'archname'}-\$Config{'osvers'})"; our \$VERSION = "$VERSION"; \$VERSION = eval \$VERSION; |