From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 07BFB1F454 for ; Tue, 10 Oct 2023 09:03:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1696928590; bh=LS6MJyQkYWvY91/BdIWbNTkgt92GvnmiEuJJ21vN004=; h=From:To:Subject:Date:From; b=xGcB+LSOUlt3D5+m7cNQchgtvkWH4WeGmKh/U8ZkM+Eo97iLxcmELTR62qfUf5nLV 6RnQWFNzMA6OaKP8Ontl9FxBueQp+PwMcj9XO/VtlYbWZhqmsl6778BnG6xZA8KE6z +visOsppAaLT2BALrZXJSrIkx7bxTCE583vd325U= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/nntp.t: attempt to track source of undefined vars Date: Tue, 10 Oct 2023 09:03:09 +0000 Message-ID: <20231010090309.327053-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Occasionally, t/nntp.t spews undefined variable warnings under `make check-run'. While the test doesn't fail, it's annoying to see them and it could be a source of deeper problems. --- t/nntp.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/nntp.t b/t/nntp.t index 0d3384d7..42a4ea97 100644 --- a/t/nntp.t +++ b/t/nntp.t @@ -3,14 +3,17 @@ use v5.12; use PublicInbox::TestCommon; use PublicInbox::Eml; -require_mods(qw(DBD::SQLite Data::Dumper)); +require_mods(qw(DBD::SQLite)); use_ok 'PublicInbox::NNTP'; use PublicInbox::Config; use POSIX qw(strftime); +use Data::Dumper; { my $quote_str = sub { - my (undef, $s) = split(/ = /, Data::Dumper::Dumper($_[0]), 2); + my ($orig) = @_; + my (undef, $s) = split(/ = /, Dumper($orig), 2); + $s // diag explain(['$s undefined, $orig = ', $orig]); $s =~ s/;\n//; $s; };