Skip Menu |

This queue is for tickets about the Makefile-DOM CPAN distribution.

Report information
The Basics
Id: 120809
Status: new
Priority: 0/
Queue: Makefile-DOM

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

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



Subject: Tests fail with List-MoreUtils-0.418
After upgrading List-Moreutils from 0.416 to 0.418, I observe test failures like this: t/mdom/gmake/comment.t .............. ok Use of uninitialized value in string eq at /builddir/build/BUILD/Makefile-DOM-0.008/blib/lib/MDOM/Document/Gmake.pm line 474, <$in> line 1. [...] Use of uninitialized value in string eq at /builddir/build/BUILD/Makefile-DOM-0.008/blib/lib/MDOM/Document/Gmake.pm line 474, <$in> line 5. # Failed test 'TEST 1: multi-line var assignment (the 'define' directive) - DOM structure ok' # at t/GmakeDOM.pm line 36. # @@ -1,13 +1,11 @@ # MDOM::Document::Gmake # - MDOM::Directive # - MDOM::Token::Bare 'define' # - MDOM::Token::Whitespace ' ' # - MDOM::Token::Bare 'remote-file' # + MDOM::Unknown # + MDOM::Token::Bare 'define remote-file' # MDOM::Token::Whitespace '\n' # MDOM::Unknown # MDOM::Token::Bare ' ' # MDOM::Token::Interpolation '$(if $(filter unix, $($1.type)), \\n /net/$($1.host)/$($1.path), \\n //$($1.host)/$($1.path))' # MDOM::Token::Whitespace '\n' # - MDOM::Directive # + MDOM::Unknown # MDOM::Token::Bare 'endef' # MDOM::Token::Whitespace '\n' t/mdom/gmake/directive-define.t ..... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests [...] Test Summary Report ------------------- t/mdom/gmake/directive-define.t (Wstat: 256 Tests: 2 Failed: 1) Failed test: 2 Non-zero exit status: 1 t/mdom/gmake/directive-export.t (Wstat: 256 Tests: 2 Failed: 1) Failed test: 2 Non-zero exit status: 1 t/mdom/gmake/directive-include.t (Wstat: 768 Tests: 10 Failed: 3) Failed tests: 2, 4, 10 Non-zero exit status: 3 t/mdom/gmake/directive-vpath.t (Wstat: 768 Tests: 6 Failed: 3) Failed tests: 2, 4, 6 Non-zero exit status: 3 Files=19, Tests=305, 5 wallclock secs ( 0.18 usr 0.05 sys + 4.22 cusr 0.22 csys = 4.67 CPU)
From: ppisar [...] redhat.com
Dne Pá 31.bře.2017 04:28:03, ppisar napsal(a): Show quoted text
> After upgrading List-Moreutils from 0.416 to 0.418, I observe test > failures like this:
The fix is attached.
Subject: Makefile-DOM-0.008-Do-not-use-_-in-a-List-Moreutils-any-code-argument.patch
From f0a935f1056c9580144fb11f5eda64b6e453fbc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Fri, 21 Apr 2017 15:05:02 +0200 Subject: [PATCH] Do not use @_ in a List::Moreutils::any code argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After upgrading List-Moreutils to 0.418, t/mdom/gmake/comment.t failed. This is because MDOM::Document::Gmake::_is_keyword() uses @_ in the any() code argument and the @_ is overrided in the pure-perl any() implementation. In my opinion, this cannot be fixed in the List::Moreutils, this this patch changes MDOM::Document::Gmake::_is_keyword(). CPAN RT#120809 Signed-off-by: Petr Písař <ppisar@redhat.com> --- lib/MDOM/Document/Gmake.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MDOM/Document/Gmake.pm b/lib/MDOM/Document/Gmake.pm index 2bc3367..515b0b9 100644 --- a/lib/MDOM/Document/Gmake.pm +++ b/lib/MDOM/Document/Gmake.pm @@ -471,7 +471,8 @@ sub _state_str { } sub _is_keyword { - any { $_[0] eq $_ } @keywords; + my $token = $_[0]; + any { $token eq $_ } @keywords; } 1; -- 2.7.4