From 502d9f8e35f6cbc5beadc748c75126d38b1f126d Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 29 Jul 2019 11:56:16 -0600 Subject: [PATCH] devel/scanprov: Extract code into a fcn This is in preparation for it being called from other places (cherry picked from commit 56bf67b75f766a453aa2373db9f6f09935cbae2e) Signed-off-by: Nicolas R --- dist/Devel-PPPort/devel/scanprov | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dist/Devel-PPPort/devel/scanprov b/dist/Devel-PPPort/devel/scanprov index 5ed3de8..4d26550 100755 --- a/dist/Devel-PPPort/devel/scanprov +++ b/dist/Devel-PPPort/devel/scanprov @@ -120,7 +120,14 @@ for my $v (keys %v) { $write and (open F, ">>$file" or die "$file: $!\n"); for (@new) { print "adding $_\n"; - $write and printf F "%-30s # added by $0\n", $_; + $write and print F format_output_line($_); } $write and close F; } + +sub format_output_line +{ + my $sym = shift; + + return sprintf "%-30s # added by $0\n", $sym; +} -- 1.8.3.1