[libconfig-model-dpkg-perl] 03/07: scanner: can use $ENV{COPYRIGHT_SCANNER_INPUT} as input for tests..
dod at debian.org
dod at debian.org
Fri May 8 17:04:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.
commit 61ffa19ea03938635184d7ec69add737d47959ef
Author: Dominique Dumont <dod at debian.org>
Date: Fri May 8 18:42:49 2015 +0200
scanner: can use $ENV{COPYRIGHT_SCANNER_INPUT} as input for tests..
instead of the output of licensecheck (which can be quite long on huge
source package like icedove)
---
lib/Dpkg/Copyright/Scanner.pm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index ed64c09..c33a377 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -7,6 +7,7 @@ use 5.20.0;
use IO::Pipe;
use Exporter::Lite;
use Array::IntSpan;
+use Path::Tiny;
use feature qw/postderef signatures/;
no warnings qw/experimental::postderef experimental::signatures/;
@@ -81,8 +82,11 @@ sub print_copyright ( %args ) {
sub scan_files ( %args ) {
my @lines ;
- if ($args{in}) {
- @lines = $args{in}->lines_utf8; # for tests
+ if (my $file = $ENV{COPYRIGHT_SCANNER_INPUT}) {
+ @lines = path($file)->lines_utf8 ; # for tests
+ }
+ elsif ($args{in}) {
+ @lines = $args{in}->lines_utf8; # for other tests
}
else {
my $pipe = IO::Pipe->new();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git
More information about the Pkg-perl-cvs-commits
mailing list