The following commit has been merged in the master branch:
commit 6e2750d65d278b641b638251ef607f607a59e4c6
Author: Guillem Jover <[email protected]>
Date: Thu Jan 3 00:17:45 2013 +0100
scripts: Do not use indirect object syntax
Fixes Objects::ProhibitIndirectSyntax.
Warned-by: perlcritic
diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl
index bce37b9..e894c53 100755
--- a/scripts/dpkg-scanpackages.pl
+++ b/scripts/dpkg-scanpackages.pl
@@ -172,7 +172,7 @@ defined($override) and (-e $override or
$pathprefix //= '';
-my $find_h = new IO::Handle;
+my $find_h = IO::Handle->new();
open($find_h, '-|', 'find', '-L', "$binarydir/", @find_args, '-print')
or syserr(_g("Couldn't open %s for reading"), $binarydir);
FILE:
diff --git a/scripts/t/200_Dpkg_Shlibs.t b/scripts/t/200_Dpkg_Shlibs.t
index 5459052..2072e20 100644
--- a/scripts/t/200_Dpkg_Shlibs.t
+++ b/scripts/t/200_Dpkg_Shlibs.t
@@ -169,9 +169,9 @@ use File::Basename qw(basename);
sub save_load_test {
my ($symfile, $comment, @opts) = @_;
- my $save_file = new File::Temp;
+ my $save_file = File::Temp->new();
$symfile->save($save_file->filename, @opts);
- my $dup = new Dpkg::Shlibs::SymbolFile(file => $save_file->filename);
+ my $dup = Dpkg::Shlibs::SymbolFile->new(file => $save_file->filename);
# Force sync of non-stored attributes
$dup->{file} = $symfile->{file};
$dup->{arch} = $symfile->{arch};
diff --git a/test/100_critic.t b/test/100_critic.t
index 671c6d3..307b8b0 100644
--- a/test/100_critic.t
+++ b/test/100_critic.t
@@ -66,6 +66,7 @@ my @policies = qw(
Modules::RequireEndWithOne
Modules::RequireExplicitPackage
Modules::RequireFilenameMatchesPackage
+ Objects::ProhibitIndirectSyntax
Subroutines::ProhibitExplicitReturnUndef
Subroutines::ProhibitNestedSubs
Subroutines::ProhibitReturnSort
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]