[pkg-perl-tools] 06/09: syntax.t: Refactor configuration file reading code

Niko Tyni ntyni at moszumanska.debian.org
Sat Dec 3 21:01:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

ntyni pushed a commit to branch ntyni/autopkgtest
in repository pkg-perl-tools.

commit c7083e486618e1c545a1517186120a07a20c7eb2
Author: Niko Tyni <ntyni at debian.org>
Date:   Sun Nov 27 21:32:18 2016 +0200

    syntax.t: Refactor configuration file reading code
    
    We'll be using this for another purpose soon.
    
    Gbp-Dch: ignore
---
 autopkgtest/scripts/runtime-deps-and-recommends.d/syntax.t | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/autopkgtest/scripts/runtime-deps-and-recommends.d/syntax.t b/autopkgtest/scripts/runtime-deps-and-recommends.d/syntax.t
index a2f0abe..d2c5ff3 100755
--- a/autopkgtest/scripts/runtime-deps-and-recommends.d/syntax.t
+++ b/autopkgtest/scripts/runtime-deps-and-recommends.d/syntax.t
@@ -35,8 +35,13 @@ sub readskip {
     my $skip = "debian/tests/pkg-perl/syntax-skip";
     $skip = "debian/tests/pkg-perl/skip-syntax" if ! -r $skip;
     -r $skip or return ();
-    open (S, '<', $skip)
-        or BAIL_OUT("$skip exists but can't be read");
+    readfile($skip);
+}
+
+sub readfile {
+    my $file = shift;
+    open (S, '<', $file)
+        or BAIL_OUT("$file exists but can't be read");
 
     my @ret;
     while (<S>) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git



More information about the Pkg-perl-cvs-commits mailing list