diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-01-22 08:19:58 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-01-22 08:19:58 +0200 |
commit | dd783f47efdb067176eefbde30ef06e442391a2b (patch) | |
tree | 556466a167af8f8fc552206d701fc9439b4cb82f | |
parent | c4082b3de493791a59bff94dc6fe91e2e2a43221 (diff) | |
download | acpp-dd783f47efdb067176eefbde30ef06e442391a2b.tar.gz acpp-dd783f47efdb067176eefbde30ef06e442391a2b.tar.bz2 |
Fix improper use of qr in dump_reformat_synclines_worker
-rw-r--r-- | lib/Apache/Config/Preproc.pm | 2 | ||||
-rw-r--r-- | t/TestPreproc.pm | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/Apache/Config/Preproc.pm b/lib/Apache/Config/Preproc.pm index 7529d3e..71ec18c 100644 --- a/lib/Apache/Config/Preproc.pm +++ b/lib/Apache/Config/Preproc.pm @@ -5,7 +5,7 @@ use warnings; use Carp; use version 0.77; -our $VERSION = '1.05_01'; +our $VERSION = '1.05_02'; sub import { my $class = shift; diff --git a/t/TestPreproc.pm b/t/TestPreproc.pm index d8e518c..2eecdfa 100644 --- a/t/TestPreproc.pm +++ b/t/TestPreproc.pm @@ -71,17 +71,18 @@ sub dump_test { sub dump_reformat_synclines { my $self = shift; - dump_reformat_synclines_worker($self, qr{$self->{_cwd}}); + dump_reformat_synclines_worker($self, $self->{_cwd}); } sub dump_reformat_synclines_worker { my ($tree, $dir) = @_; - my $sep = qr(File::Spec->catfile('','')); + my $sep = File::Spec->catfile('',''); join('', map { - (my $l = $_->locus->format) =~ s{$dir/}{}g; - $l =~ s{$sep}{/}g; + my $l = $_->locus->format; + $l =~ s{\Q$sep\E}{/}g; + $l =~ s{\Q$dir\E/}{}g; "# $l\n" . do { if ($_->type eq 'section') { |