[lintian] 01/01: L::C::*: Fix use of undef in a string
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 5a2ad2b9d09db1fb8db1816f1f0cfbc525b4576c
Author: Niels Thykier <niels@thykier.net>
Date: Sun Sep 28 21:09:20 2014 +0200
L::C::*: Fix use of undef in a string
Signed-off-by: Niels Thykier <niels@thykier.net>
---
lib/Lintian/Collect/Binary.pm | 3 ++-
lib/Lintian/Collect/Source.pm | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/Lintian/Collect/Binary.pm b/lib/Lintian/Collect/Binary.pm
index 8d25102..023a7ec 100644
--- a/lib/Lintian/Collect/Binary.pm
+++ b/lib/Lintian/Collect/Binary.pm
@@ -162,11 +162,12 @@ sub control {
## no critic (Subroutines::RequireArgUnpacking)
# - see L::Collect::unpacked for why
my $self = shift(@_);
+ my $f = $_[0] // '';
warnings::warnif(
'deprecated',
'[deprecated] The control method is deprecated. '
- . "Consider using \$info->control_index_resolved_path('$_[0]') instead."
+ . "Consider using \$info->control_index_resolved_path('$f') instead."
. ' Called' # warnif appends " at <...>"
);
return $self->_fetch_extracted_dir('control', 'control', @_);
diff --git a/lib/Lintian/Collect/Source.pm b/lib/Lintian/Collect/Source.pm
index 72c0806..0197500 100644
--- a/lib/Lintian/Collect/Source.pm
+++ b/lib/Lintian/Collect/Source.pm
@@ -563,13 +563,14 @@ sub debfiles {
## no critic (Subroutines::RequireArgUnpacking)
# - see L::Collect::unpacked for why
my $self = shift(@_);
+ my $f = $_[0] // '';
if (defined($_[0]) && blessed($_[0])) {
croak('debfiles does not accept blessed objects');
}
warnings::warnif(
'deprecated',
'[deprecated] The debfiles method is deprecated. '
- . "Consider using \$info->index_resolved_path(\"debian/$_[0]\") instead."
+ . "Consider using \$info->index_resolved_path(\"debian/$f\") instead."
. ' Called' # warnif appends " at <...>"
);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: