Skip Menu |

This queue is for tickets about the autodie CPAN distribution.

Report information
The Basics
Id: 105344
Status: resolved
Priority: 0/
Queue: autodie

People
Owner: Nobody in particular
Requestors: davem [...] iabyn.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.30



Subject: autodie's t/mkdir.t fails if build dir path has metachars.
Date: Thu, 18 Jun 2015 18:08:48 +0100
To: bug-autodie [...] rt.cpan.org
From: Dave Mitchell <davem [...] iabyn.com>
I've just monkey-patched blead with the following, which will need back-porting upstream to autodie: autodie/t/mkdir.t: escape build dir path This test file creates a regex which includes the path of the build directory. If that path includes regex metachars (e.g. blead_g++_quick) then the test fails. Easily fixed with \Q...\E. --- a/cpan/autodie/t/mkdir.t +++ b/cpan/autodie/t/mkdir.t @@ -3,8 +3,8 @@ use strict; use Test::More; use FindBin qw($Bin); use constant TMPDIR => "$Bin/mkdir_test_delete_me"; -use constant ERROR_REGEXP => qr{Can't mkdir\('${\(TMPDIR)}', 0777\):}; -use constant SINGLE_DIGIT_ERROR_REGEXP => qr{Can't mkdir\('${\(TMPDIR)}', 0010\):}; +use constant ERROR_REGEXP => qr{Can't mkdir\('\Q${\(TMPDIR)}\E', 0777\):}; +use constant SINGLE_DIGIT_ERROR_REGEXP => qr{Can't mkdir\('\Q${\(TMPDIR)}\E', 0010\):}; # Delete our directory if it's there rmdir TMPDIR; -- If life gives you lemons, you'll probably develop a citric acid allergy.
This was merged to master as https://github.com/pjf/autodie/commit/44c0adb561191c040da0b7f5213ae35d1d222819 and should already be on CPAN. Please let me know if I'm mistaken. Thanks, Todd