[lintian] 01/01: Style: Call argumentless instance methods without ()
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit b92a5d5ce343432a4705a3c21e033a68a8179cd4
Author: Niels Thykier <niels@thykier.net>
Date: Sat Apr 30 18:37:08 2016 +0000
Style: Call argumentless instance methods without ()
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/binaries.pm | 2 +-
checks/copyright-file.pm | 2 +-
checks/cruft.pm | 6 +--
checks/files.pm | 8 ++--
checks/group-checks.pm | 2 +-
checks/java.pm | 2 +-
checks/manpages.pm | 2 +-
checks/obsolete-sites.pm | 4 +-
collection/unpacked | 2 +-
commands/lintian | 14 +++----
lib/Lintian/Collect.pm | 2 +-
lib/Lintian/Collect/Changes.pm | 2 +-
lib/Lintian/Collect/Source.pm | 2 +-
lib/Lintian/DepMap.pm | 50 +++++++++++------------
lib/Lintian/DepMap/Properties.pm | 2 +-
lib/Lintian/Lab/Entry.pm | 4 +-
lib/Lintian/Path.pm | 10 ++---
lib/Lintian/Processable.pm | 16 ++++----
lib/Lintian/ProcessableGroup.pm | 16 ++++----
lib/Lintian/ProcessablePool.pm | 20 ++++-----
lib/Lintian/SlidingWindow.pm | 2 +-
lib/Lintian/Tag/Override.pm | 2 +-
lib/Lintian/Util.pm | 2 +-
lib/Locale/Po4a/Lintian.pm | 2 +-
t/scripts/Lintian/DepMap/01add-select-satisfy.t | 38 ++++++++---------
t/scripts/Lintian/DepMap/03pending.t | 12 +++---
t/scripts/Lintian/DepMap/04satisfiability.t | 2 +-
t/scripts/Lintian/DepMap/05multi-add.t | 6 +--
t/scripts/Lintian/DepMap/06parents.t | 2 +-
t/scripts/Lintian/DepMap/08initialise.t | 18 ++++----
t/scripts/Lintian/DepMap/08initialise2.t | 6 +--
t/scripts/Lintian/DepMap/09unlink.t | 24 +++++------
t/scripts/Lintian/DepMap/10circular.t | 4 +-
t/scripts/Lintian/DepMap/11prefix.t | 2 +-
t/scripts/Lintian/DepMap/12done.t | 2 +-
t/scripts/Lintian/DepMap/Properties/00construct.t | 2 +-
t/scripts/changelog-format.t | 2 +-
t/scripts/spellintian.t | 2 +-
38 files changed, 149 insertions(+), 149 deletions(-)
diff --git a/checks/binaries.pm b/checks/binaries.pm
index 297b89a..5205f6d 100644
--- a/checks/binaries.pm
+++ b/checks/binaries.pm
@@ -249,7 +249,7 @@ sub run {
tag 'package-name-doesnt-match-sonames', "@sonames"
if @sonames && !$match_found;
- my $src = $group->get_source_processable();
+ my $src = $group->get_source_processable;
if (defined($src)) {
$built_with_golang
= $src->info->relation('build-depends')->implies('golang-go');
diff --git a/checks/copyright-file.pm b/checks/copyright-file.pm
index 333c399..a8e6183 100644
--- a/checks/copyright-file.pm
+++ b/checks/copyright-file.pm
@@ -382,7 +382,7 @@ sub depends_on {
# Checks cross pkg links for /usr/share/doc/$pkg links
sub check_cross_link {
my ($group, $fpkg) = @_;
- my $src = $group->get_source_processable();
+ my $src = $group->get_source_processable;
if ($src) {
# source package is available; check it's list of binary
return if defined $src->info->binary_package_type($fpkg);
diff --git a/checks/cruft.pm b/checks/cruft.pm
index d9d4b1e..743033c 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -692,7 +692,7 @@ sub find_cruft {
# Find mentioning of usr/lib/perl5 inside the packaging
if ($name =~ m{^debian/}) {
- my $short = $entry->basename();
+ my $short = $entry->basename;
# Skip symlinks and other nasty stuff as well as
# debian/changelog
@@ -882,9 +882,9 @@ sub full_text_check {
# string to match in $block. Please emit license tags only once
# per file
BLOCK:
- while (my $block = $sfd->readwindow()) {
+ while (my $block = $sfd->readwindow) {
my ($cleanedblock, %matchedkeyword);
- my $blocknumber = $sfd->blocknumber();
+ my $blocknumber = $sfd->blocknumber;
# Check for non-distributable files - this
# applies even to non-free, as we still need
diff --git a/checks/files.pm b/checks/files.pm
index 5b8d26d..0352f16 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -205,7 +205,7 @@ sub _detect_embedded_libraries {
= Lintian::SlidingWindow->new($fd,sub { $_=lc($_); });
READWINDOW:
- while (my $block = $sfd->readwindow()) {
+ while (my $block = $sfd->readwindow) {
if ($block =~ m{$reinside}) {
$foundre = 1;
last READWINDOW;
@@ -647,7 +647,7 @@ sub run {
my $fd = $file->open(':raw');
my $sfd = Lintian::SlidingWindow->new($fd);
BLOCK:
- while (my $block = $sfd->readwindow()) {
+ while (my $block = $sfd->readwindow) {
# remove comment line
$block =~ s,\#\V*,,gsm;
# remove continuation line
@@ -834,7 +834,7 @@ sub run {
# config file (read only one block)
my $fd = $file->open(':raw');
my $sfd = Lintian::SlidingWindow->new($fd);
- my $block = $sfd->readwindow();
+ my $block = $sfd->readwindow;
# some common stuff found in config file
if (
$block
@@ -2080,7 +2080,7 @@ sub detect_privacy_breach {
my $sfd = Lintian::SlidingWindow->new($fd,sub { $_=lc($_); },BLOCKSIZE);
- while (my $block = $sfd->readwindow()) {
+ while (my $block = $sfd->readwindow) {
# try generic fragment tagging
foreach my $keyword ($PRIVACY_BREAKER_FRAGMENTS->all) {
if(index($block,$keyword) > -1) {
diff --git a/checks/group-checks.pm b/checks/group-checks.pm
index b37e499..474c7aa 100644
--- a/checks/group-checks.pm
+++ b/checks/group-checks.pm
@@ -63,7 +63,7 @@ sub run {
# on some other package from this source.
return if scalar @nodes < 2;
- $sccs = Lintian::group_checks::Graph->new(\@nodes, \%edges)->tarjans();
+ $sccs = Lintian::group_checks::Graph->new(\@nodes, \%edges)->tarjans;
foreach my $comp (@$sccs) {
# It takes two to tango... erh. make a circular dependency.
diff --git a/checks/java.pm b/checks/java.pm
index 7b322e7..6392d09 100644
--- a/checks/java.pm
+++ b/checks/java.pm
@@ -40,7 +40,7 @@ sub run {
my $has_jars = 0;
my $jmajlow = '-';
- my $depends = $info->relation('strong')->unparse();
+ my $depends = $info->relation('strong')->unparse;
# Remove all libX-java-doc packages to avoid thinking they are java libs
# - note the result may not be a valid dependency listing
$depends =~ s/lib[^\s,]+-java-doc//go;
diff --git a/checks/manpages.pm b/checks/manpages.pm
index be7bd45..619a165 100644
--- a/checks/manpages.pm
+++ b/checks/manpages.pm
@@ -316,7 +316,7 @@ sub run {
# Check our dependencies:
foreach my $depproc (@{ $ginfo->direct_dependencies($proc) }) {
# Find the manpages in our related dependencies
- my $depinfo = $depproc->info();
+ my $depinfo = $depproc->info;
foreach my $file ($depinfo->sorted_index){
my ($fname, $path, undef) = fileparse($file, qr,\..+$,o);
my $lang = '';
diff --git a/checks/obsolete-sites.pm b/checks/obsolete-sites.pm
index 8431424..4316ef7 100644
--- a/checks/obsolete-sites.pm
+++ b/checks/obsolete-sites.pm
@@ -57,11 +57,11 @@ sub run {
sub search_for_obsolete_sites {
my ($dfile, $file) = @_;
- if (defined($dfile) and $dfile->is_regular_file() and $dfile->is_open_ok) {
+ if (defined($dfile) and $dfile->is_regular_file and $dfile->is_open_ok) {
my $dcontents = $dfile->file_contents;
- foreach my $site ($OBSOLETE_SITES->all()) {
+ foreach my $site ($OBSOLETE_SITES->all) {
if ($dcontents
=~ m((\w+://(?:[\w.]*\.)?\Q$site\E[/:][^\s\"<>\$]*))i) {
tag 'obsolete-url-in-packaging', $file, $1;
diff --git a/collection/unpacked b/collection/unpacked
index d26acf5..465d71a 100755
--- a/collection/unpacked
+++ b/collection/unpacked
@@ -138,7 +138,7 @@ sub libdpkg_unpack_dsc {
# Create the object that does everything
my $srcpkg = Dpkg::Source::Package->new(filename => $dsc, options => $opt);
- $srcpkg->check_checksums();
+ $srcpkg->check_checksums;
# Unpack the source package (delegated to Dpkg::Source::Package::*)
$srcpkg->extract($target);
diff --git a/commands/lintian b/commands/lintian
index 6ee76fa..2dbf4cc 100755
--- a/commands/lintian
+++ b/commands/lintian
@@ -715,7 +715,7 @@ sub main {
$pool = setup_work_pool($LAB);
- if ($pool->empty()) {
+ if ($pool->empty) {
v_msg('No packages selected.');
exit $exit_code;
}
@@ -756,7 +756,7 @@ sub main {
}
}
- foreach my $gname (sort $pool->get_group_names()) {
+ foreach my $gname (sort $pool->get_group_names) {
my $success = 1;
my $group = $pool->get_group($gname);
my $total_raw_res = timed_task {
@@ -891,9 +891,9 @@ sub main {
sub auto_clean_package {
my ($lpkg) = @_;
my $proc_id = $lpkg->identifier;
- my $pkg_name = $lpkg->pkg_name();
- my $pkg_type = $lpkg->pkg_type();
- my $base = $lpkg->base_dir();
+ my $pkg_name = $lpkg->pkg_name;
+ my $pkg_type = $lpkg->pkg_type;
+ my $base = $lpkg->base_dir;
my $changed = 0;
if ($lpkg->lab->is_temp) {
debug_msg(1, "Auto removing: $proc_id ...");
@@ -1590,8 +1590,8 @@ sub load_profile_and_configure_tags {
sub load_and_select_collections {
my ($all_checks, $auto_remove_list, $unpack_options_ref) = @_;
# $map is just here to check that all the needed collections are present.
- my $map = Lintian::DepMap->new();
- my $collmap = Lintian::DepMap::Properties->new();
+ my $map = Lintian::DepMap->new;
+ my $collmap = Lintian::DepMap::Properties->new;
my %extra_unpack;
my $load_coll = sub {
my ($cs) = @_;
diff --git a/lib/Lintian/Collect.pm b/lib/Lintian/Collect.pm
index 0147589..b1a4e30 100644
--- a/lib/Lintian/Collect.pm
+++ b/lib/Lintian/Collect.pm
@@ -203,7 +203,7 @@ sub _get_field {
my ($self, $field, $def) = @_;
my $fields;
unless (exists $self->{field}) {
- my $base_dir = $self->base_dir();
+ my $base_dir = $self->base_dir;
my $type = $self->{type};
if ($type eq 'changes' or $type eq 'source'){
my $file = 'changes';
diff --git a/lib/Lintian/Collect/Changes.pm b/lib/Lintian/Collect/Changes.pm
index 6db579c..112dbfb 100644
--- a/lib/Lintian/Collect/Changes.pm
+++ b/lib/Lintian/Collect/Changes.pm
@@ -32,7 +32,7 @@ Lintian::Collect::Changes - Lintian interface to .changes file data collection
my ($name, $type) = ('foobar_1.2_i386.changes', 'changes');
my $collect = Lintian::Collect->new($name, $type);
- my $files = $collect->files();
+ my $files = $collect->files;
foreach my $file (keys %{$files}) {
my $size = $files->{$file}{size};
diff --git a/lib/Lintian/Collect/Source.pm b/lib/Lintian/Collect/Source.pm
index 189b4cb..fc3c29b 100644
--- a/lib/Lintian/Collect/Source.pm
+++ b/lib/Lintian/Collect/Source.pm
@@ -171,7 +171,7 @@ sub native {
$self->{native} = 1;
} else {
my $version = $self->field('version');
- my $base_dir = $self->base_dir();
+ my $base_dir = $self->base_dir;
if (defined $version) {
$version =~ s/^\d+://;
my $name = $self->{name};
diff --git a/lib/Lintian/DepMap.pm b/lib/Lintian/DepMap.pm
index 9dd41bd..7a470a8 100644
--- a/lib/Lintian/DepMap.pm
+++ b/lib/Lintian/DepMap.pm
@@ -32,7 +32,7 @@ Lintian::DepMap - Dependencies map/tree creator
use Lintian::DepMap;
- my $map = Lintian::DepMap->new();
+ my $map = Lintian::DepMap->new;
# know about A:
$map->add('A');
@@ -40,7 +40,7 @@ Lintian::DepMap - Dependencies map/tree creator
$map->add('B', 'A');
# prints 'A':
- print $map->selectable();
+ print $map->selectable;
# indicate we are working on 'A' (optional):
$map->select('A');
@@ -49,7 +49,7 @@ Lintian::DepMap - Dependencies map/tree creator
# we are done with A:
$map->satisfy('A');
# prints 'B':
- print $map->selectable();
+ print $map->selectable;
=head1 DESCRIPTION
@@ -90,9 +90,9 @@ E.g.
$map->add('A');
$map->satisfy('A');
# prints nothing
- print $map->selectable();
- $map->initialise();
- print $map->selectable();
+ print $map->selectable;
+ $map->initialise;
+ print $map->selectable;
=cut
@@ -218,7 +218,7 @@ sub satisfy {
my $self = shift;
my $node = shift;
- if (any {$_ eq $node} $self->missing()) {
+ if (any {$_ eq $node} $self->missing) {
fail( "Attempted to mark node '$node' as satisfied but it is not "
.'reachable, perhaps you forgot to add() it first?');
}
@@ -286,11 +286,11 @@ E.g.
$map->add('A');
# Prints A
- print $map->selectable();
+ print $map->selectable;
# we later notice we don't want A
$map->unlink('A');
# Prints nothing
- print $map->selectable();
+ print $map->selectable;
B<Note>: shall the requested node not exist this method die()s.
@@ -336,8 +336,8 @@ E.g.
$map->add('A');
$map->add('B', 'A');
- while($map->pending()) {
- for my $node ($map->selectable()) {
+ while($map->pending) {
+ for my $node ($map->selectable) {
$map->select($node);
# work work work
$map->satisfy($node);
@@ -398,7 +398,7 @@ E.g.
# Returns true
$map->selected('A');
# Prints A
- print $map->selected();
+ print $map->selected;
=cut
@@ -420,7 +420,7 @@ select()s all the selectable() nodes.
sub selectAll {
my $self = shift;
- for my $node ($self->selectable()) {
+ for my $node ($self->selectable) {
$self->select($node);
}
return;
@@ -459,13 +459,13 @@ Return the number of nodes that can or have already been selected. E.g.
$map->add('B', 'A');
# prints 1:
- print $map->pending();
+ print $map->pending;
$map->select('A');
# prints 1:
- print $map->pending();
+ print $map->pending;
$map->satisfy('A');
# prints 1 ('B' is now available):
- print $map->pending();
+ print $map->pending;
=cut
@@ -481,10 +481,10 @@ Return an array containing the names of nodes that were added. E.g.
$map->add('B', 'A');
# prints 'B':
- print $map->known();
+ print $map->known;
$map->add('A');
# prints 'A' and 'B':
- print $map->known();
+ print $map->known;
=item known(NODE)
@@ -512,14 +512,14 @@ another node depended on it. E.g.
$map->add('B', 'A');
# prints 'A':
- print $map->missing();
+ print $map->missing;
$map->add('A');
# prints nothing:
- print $map->missing();
+ print $map->missing;
# this also works; A depends on 'Z':
$map->add('A', 'Z');
# but now this prints 'Z':
- print $map->missing();
+ print $map->missing;
=cut
@@ -538,7 +538,7 @@ E.g.
$map->add('A', 'B');
$map->add('B', 'A');
# Prints A and B
- print $map->circular();
+ print $map->circular;
B<Note>: since recursive/deep circular dependencies detection is a bit
more resource expensive it is not the default.
@@ -547,7 +547,7 @@ more resource expensive it is not the default.
$map->add('B', 'C');
$map->add('C', 'A');
# No deep/recursive scanning is performed, prints nothing
- print $map->circular();
+ print $map->circular;
# deep scan, prints 'A, B, C'
print $map->circular('deep');
@@ -564,7 +564,7 @@ sub circular {
my @nodes;
my ($prev_satisfied, $prev_selected)
= ($self->{'satisfied_nodes'}, $self->{'selected'});
- while(@nodes = $self->selectable()) {
+ while(@nodes = $self->selectable) {
for my $node (@nodes) {
$self->satisfy($node);
}
@@ -574,7 +574,7 @@ sub circular {
$self->{'satisfied_nodes'} = $prev_satisfied;
$self->{'selected'} = $prev_selected;
- $self->initialise();
+ $self->initialise;
} else {
for my $node (keys %{$self->{'nodes'}}) {
my $node_p = $self->{'nodes'}{$node}{'parents'};
diff --git a/lib/Lintian/DepMap/Properties.pm b/lib/Lintian/DepMap/Properties.pm
index cf7b84f..0636c52 100644
--- a/lib/Lintian/DepMap/Properties.pm
+++ b/lib/Lintian/DepMap/Properties.pm
@@ -27,7 +27,7 @@ Lintian::DepMap::Properties - Dependencies with properties map/tree creator
use Lintian::DepMap::Properties;
- my $map = Lintian::DepMap::Properties->new();
+ my $map = Lintian::DepMap::Properties->new;
=head1 DESCRIPTION
diff --git a/lib/Lintian/Lab/Entry.pm b/lib/Lintian/Lab/Entry.pm
index df2f7e9..e693347 100644
--- a/lib/Lintian/Lab/Entry.pm
+++ b/lib/Lintian/Lab/Entry.pm
@@ -99,7 +99,7 @@ sub new_from_metadata {
$self->{coll} = {};
$self->{base_dir} = $base_dir;
$self->{pkg_path} = $pkg_path; # Could be undef, _init will fix that
- $self->_init();
+ $self->_init;
return $self;
}
@@ -385,7 +385,7 @@ sub update_status_file {
return 0;
}
- $file = $self->base_dir() . '/.lintian-status';
+ $file = $self->base_dir . '/.lintian-status';
open my $sfd, '>', $file or return 0;
print $sfd 'Lab-Entry-Format: ' . LAB_ENTRY_FORMAT . "\n";
# Basic package meta-data - this is redundant, but having it may
diff --git a/lib/Lintian/Path.pm b/lib/Lintian/Path.pm
index ffaa6cb..c5da68c 100644
--- a/lib/Lintian/Path.pm
+++ b/lib/Lintian/Path.pm
@@ -501,8 +501,8 @@ defined entry, for which L</is_dir> returns a truth value.
sub fs_path {
my ($self) = @_;
- my $path = $self->_collect_path();
- $self->_check_access();
+ my $path = $self->_collect_path;
+ $self->_check_access;
return $path if $self->resolve_path->is_dir;
$self->_check_open($path);
return $path;
@@ -523,7 +523,7 @@ sub is_open_ok {
return 1 if ($path_info & OPEN_IS_OK) == OPEN_IS_OK;
return 0 if $path_info & ACCESS_INFO;
eval {
- my $path = $self->_collect_path();
+ my $path = $self->_collect_path;
$self->_check_open($path);
};
return if $@;
@@ -564,7 +564,7 @@ sub _check_access {
sub _check_open {
my ($self, $path) = @_;
- $self->_check_access();
+ $self->_check_access;
# Symlinks can point to a "non-file" object inside the
# package root
if ($self->is_file or ($self->is_symlink and -f $path)) {
@@ -578,7 +578,7 @@ sub _check_open {
sub _do_open {
my ($self, $open_sub) = @_;
- my $path = $self->_collect_path();
+ my $path = $self->_collect_path;
$self->_check_open($path);
return $open_sub->($path);
}
diff --git a/lib/Lintian/Processable.pm b/lib/Lintian/Processable.pm
index cb8ff0a..bf702c6 100644
--- a/lib/Lintian/Processable.pm
+++ b/lib/Lintian/Processable.pm
@@ -185,39 +185,39 @@ sub _make_identifier {
return;
}
-=item $proc->pkg_name()
+=item $proc->pkg_name
Returns the package name.
-=item $proc->pkg_version()
+=item $proc->pkg_version
Returns the version of the package.
-=item $proc->pkg_path()
+=item $proc->pkg_path
Returns the path to the packaged version of actual package. This path
is used in case the data needs to be extracted from the package.
Note: This may return the path to a symlink to the package.
-=item $proc->pkg_type()
+=item $proc->pkg_type
Returns the type of package (e.g. binary, source, udeb ...)
-=item $proc->pkg_arch()
+=item $proc->pkg_arch
Returns the architecture(s) of the package. May return multiple values
from changes processables. For source processables it is "source".
-=item $proc->pkg_src()
+=item $proc->pkg_src
Returns the name of the source package.
-=item $proc->pkg_src_version()
+=item $proc->pkg_src_version
Returns the version of the source package.
-=item $proc->tainted()
+=item $proc->tainted
Returns a truth value if one or more fields in this Processable is
tainted. On a best effort basis tainted fields will be sanitized
diff --git a/lib/Lintian/ProcessableGroup.pm b/lib/Lintian/ProcessableGroup.pm
index c7e0911..260d635 100644
--- a/lib/Lintian/ProcessableGroup.pm
+++ b/lib/Lintian/ProcessableGroup.pm
@@ -35,9 +35,9 @@ Lintian::ProcessableGroup -- A group of objects that Lintian can process
use Lintian::ProcessableGroup;
my $group = Lintian::ProcessableGroup->new('lintian_2.5.0_i386.changes');
- foreach my $proc ($group->get_processables()){
- printf "%s %s (%s)\n", $proc->pkg_name(),
- $proc->pkg_version(), $proc->pkg_type();
+ foreach my $proc ($group->get_processables){
+ printf "%s %s (%s)\n", $proc->pkg_name,
+ $proc->pkg_version, $proc->pkg_type;
}
# etc.
@@ -163,7 +163,7 @@ added.
sub add_processable{
my ($self, $processable) = @_;
- my $pkg_type = $processable->pkg_type();
+ my $pkg_type = $processable->pkg_type;
if ($pkg_type eq 'changes'){
fail 'Cannot add another changes file' if (exists $self->{changes});
@@ -238,7 +238,7 @@ Removes $proc from $group
sub remove_processable {
my ($self, $proc) = @_;
- my $pkg_type = $proc->pkg_type();
+ my $pkg_type = $proc->pkg_type;
if ($pkg_type eq 'source' or $pkg_type eq 'changes'){
delete $self->{$pkg_type};
} elsif (defined $self->{$pkg_type}) {
@@ -249,7 +249,7 @@ sub remove_processable {
return 1;
}
-=item $group->get_source_processable()
+=item $group->get_source_processable
Returns the processable identified as the "source" package (e.g. the dsc).
@@ -262,7 +262,7 @@ sub get_source_processable {
return $self->{source};
}
-=item $group->get_changes_processable()
+=item $group->get_changes_processable
Returns the processable identified as the "changes" processable (e.g.
the changes file).
@@ -276,7 +276,7 @@ sub get_changes_processable {
return $self->{changes};
}
-=item $group->get_binary_processables()
+=item $group->get_binary_processables
Returns all binary (and udeb) processables in $group.
diff --git a/lib/Lintian/ProcessablePool.pm b/lib/Lintian/ProcessablePool.pm
index 66bdd8f..b11bf73 100644
--- a/lib/Lintian/ProcessablePool.pm
+++ b/lib/Lintian/ProcessablePool.pm
@@ -38,11 +38,11 @@ Lintian::ProcessablePool -- Pool of processables
use Lintian::ProcessablePool;
- my $pool = Lintian::ProcessablePool->new();
+ my $pool = Lintian::ProcessablePool->new;
$pool->add_file('foo.changes');
$pool->add_file('bar.dsc');
$pool->add_file('baz.deb');
- foreach my $gname ($pool->get_group_names()){
+ foreach my $gname ($pool->get_group_names){
my $group = $pool->get_group($gname);
process($gname, $group);
}
@@ -131,7 +131,7 @@ sub add_proc {
return 1;
}
-=item $pool->get_group_names()
+=item $pool->get_group_names
Returns the name of all the groups in this pool.
@@ -156,7 +156,7 @@ sub get_group{
return $self->{groups}{$group};
}
-=item $pool->get_groups()
+=item $pool->get_groups
Returns all the groups in the pool.
@@ -173,7 +173,7 @@ sub get_groups{
return ();
}
-=item $pool->empty()
+=item $pool->empty
Returns true if the pool is empty.
@@ -189,7 +189,7 @@ sub empty{
sub _add_changes_file{
my ($self, $pkg_path) = @_;
my $group = Lintian::ProcessableGroup->new($self->{'lab'}, $pkg_path);
- my $cproc = $group->get_changes_processable();
+ my $cproc = $group->get_changes_processable;
my $gid = $self->_get_group_id($cproc);
my $ogroup = $self->{groups}{$gid};
if (defined($ogroup)){
@@ -203,12 +203,12 @@ sub _add_changes_file{
$added = 1;
}
- if ( !defined $ogroup->get_source_processable()
- && defined $group->get_source_processable()){
- $ogroup->add_processable($group->get_source_processable());
+ if ( !defined $ogroup->get_source_processable
+ && defined $group->get_source_processable){
+ $ogroup->add_processable($group->get_source_processable);
$added = 1;
}
- foreach my $bin ($group->get_binary_processables()){
+ foreach my $bin ($group->get_binary_processables){
# New binary package ?
my $was_new = $ogroup->add_processable($bin);
$added ||= $was_new;
diff --git a/lib/Lintian/SlidingWindow.pm b/lib/Lintian/SlidingWindow.pm
index a88f27c..614e466 100644
--- a/lib/Lintian/SlidingWindow.pm
+++ b/lib/Lintian/SlidingWindow.pm
@@ -107,7 +107,7 @@ Lintian::SlidingWindow - Lintian interface to sliding window match
my $sfd = Lintian::SlidingWindow->new('<','someevilfile.c', sub { $_ = lc($_); });
my $window;
- while ($window = $sfd->readwindow()) {
+ while ($window = $sfd->readwindow) {
if (index($window, 'evil') > -1) {
if($window =~
m/software \s++ shall \s++
diff --git a/lib/Lintian/Tag/Override.pm b/lib/Lintian/Tag/Override.pm
index 99f6c02..3f1eb88 100644
--- a/lib/Lintian/Tag/Override.pm
+++ b/lib/Lintian/Tag/Override.pm
@@ -92,7 +92,7 @@ sub new {
};
$self->{'arch'} = 'any' unless $self->{'arch'};
bless $self, $type;
- $self->_init();
+ $self->_init;
return $self;
}
diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm
index 6d294ac..19acad2 100644
--- a/lib/Lintian/Util.pm
+++ b/lib/Lintian/Util.pm
@@ -709,7 +709,7 @@ L</parse_dpkg_control> do. It can also emit:
# control files.
drain_pipe($opts->{pipe_out});
close($opts->{pipe_out});
- $opts->{harness}->finish();
+ $opts->{harness}->finish;
return $data[0];
}
}
diff --git a/lib/Locale/Po4a/Lintian.pm b/lib/Locale/Po4a/Lintian.pm
index 3beaef6..c76806e 100644
--- a/lib/Locale/Po4a/Lintian.pm
+++ b/lib/Locale/Po4a/Lintian.pm
@@ -62,7 +62,7 @@ sub parse {
}
}
$lr = $ref if defined $ref;
- ($line, $ref) = $self->shiftline();
+ ($line, $ref) = $self->shiftline;
}
$self->_trans($lr, $check_name, $tag, \@lines, $comment) if @lines;
return;
diff --git a/t/scripts/Lintian/DepMap/01add-select-satisfy.t b/t/scripts/Lintian/DepMap/01add-select-satisfy.t
index 8527596..abb0f98 100755
--- a/t/scripts/Lintian/DepMap/01add-select-satisfy.t
+++ b/t/scripts/Lintian/DepMap/01add-select-satisfy.t
@@ -8,30 +8,30 @@ BEGIN { use_ok('Lintian::DepMap'); }
my $map;
-ok(eval { $map = Lintian::DepMap->new(); }, 'Create');
+ok(eval { $map = Lintian::DepMap->new; }, 'Create');
-is_deeply([$map->selectable()], [], 'Empty, nothing is selectable');
-is_deeply([$map->selected()], [], 'Empty, nothing has been selected');
-ok($map->pending() == 0, 'Empty, nothing is pending');
-is_deeply([$map->known()], [], 'Empty, nothing is known');
-is_deeply([$map->missing()], [], 'Empty, nothing is missing');
+is_deeply([$map->selectable], [], 'Empty, nothing is selectable');
+is_deeply([$map->selected], [], 'Empty, nothing has been selected');
+ok($map->pending == 0, 'Empty, nothing is pending');
+is_deeply([$map->known], [], 'Empty, nothing is known');
+is_deeply([$map->missing], [], 'Empty, nothing is missing');
ok(eval { $map->add('A'); }, 'Add A');
-is_deeply([$map->selectable()], ['A'], 'A is selectable');
-ok($map->pending() == 1, 'A is pending');
-is_deeply([$map->known()], ['A'], 'A added, it is known');
-is_deeply([$map->missing()], [], 'A added, it is not missing');
+is_deeply([$map->selectable], ['A'], 'A is selectable');
+ok($map->pending == 1, 'A is pending');
+is_deeply([$map->known], ['A'], 'A added, it is known');
+is_deeply([$map->missing], [], 'A added, it is not missing');
ok(eval { $map->select('A'); }, 'Select A');
-is_deeply([$map->selectable()], [], 'A selected, nothing is selectable');
+is_deeply([$map->selectable], [], 'A selected, nothing is selectable');
ok($map->selected('A'), 'A selected, A has been selected');
-ok($map->pending() == 1, 'A selected, A is still pending');
-is_deeply([$map->known()], ['A'], 'A selected, it is known');
-is_deeply([$map->missing()], [], 'A selected, nothing is missing');
+ok($map->pending == 1, 'A selected, A is still pending');
+is_deeply([$map->known], ['A'], 'A selected, it is known');
+is_deeply([$map->missing], [], 'A selected, nothing is missing');
ok(eval { $map->satisfy('A'); }, 'Satisfy A');
-is_deeply([$map->selectable()], [], 'A satisfied, nothing is selectable');
-is_deeply([$map->selected()], [], 'A satisfied, nothing is selected');
-ok($map->pending() == 0, 'A satisfied, nothing is pending');
-is_deeply([$map->known()], ['A'], 'A satisfied, it is known');
-is_deeply([$map->missing()], [], 'A satisfied, nothing is missing');
+is_deeply([$map->selectable], [], 'A satisfied, nothing is selectable');
+is_deeply([$map->selected], [], 'A satisfied, nothing is selected');
+ok($map->pending == 0, 'A satisfied, nothing is pending');
+is_deeply([$map->known], ['A'], 'A satisfied, it is known');
+is_deeply([$map->missing], [], 'A satisfied, nothing is missing');
diff --git a/t/scripts/Lintian/DepMap/03pending.t b/t/scripts/Lintian/DepMap/03pending.t
index 65e7e14..1518b9e 100755
--- a/t/scripts/Lintian/DepMap/03pending.t
+++ b/t/scripts/Lintian/DepMap/03pending.t
@@ -6,19 +6,19 @@ use Test::More tests => 5;
use Lintian::DepMap;
-my $map = Lintian::DepMap->new();
+my $map = Lintian::DepMap->new;
$map->add('A');
-is($map->pending(), 1, 'A added, one pending');
+is($map->pending, 1, 'A added, one pending');
$map->add('B');
-is($map->pending(), 2, 'B added, two pending');
+is($map->pending, 2, 'B added, two pending');
$map->select('A');
-is($map->pending(), 2, 'A selected, two pending');
+is($map->pending, 2, 'A selected, two pending');
$map->satisfy('B');
-is($map->pending(), 1, 'B satisfied, one pending');
+is($map->pending, 1, 'B satisfied, one pending');
$map->satisfy('A');
-is($map->pending(), 0, 'A satisfied, zero pending');
+is($map->pending, 0, 'A satisfied, zero pending');
diff --git a/t/scripts/Lintian/DepMap/04satisfiability.t b/t/scripts/Lintian/DepMap/04satisfiability.t
index e4bc4c1..15dcec4 100755
--- a/t/scripts/Lintian/DepMap/04satisfiability.t
+++ b/t/scripts/Lintian/DepMap/04satisfiability.t
@@ -6,7 +6,7 @@ use Test::More tests => 4;
use Lintian::DepMap;
-my $obj = Lintian::DepMap->new();
+my $obj = Lintian::DepMap->new;
ok($obj->add('A', 'B'), 'Nodes can be added in any order');
diff --git a/t/scripts/Lintian/DepMap/05multi-add.t b/t/scripts/Lintian/DepMap/05multi-add.t
index 3d2c043..21bcc2e 100755
--- a/t/scripts/Lintian/DepMap/05multi-add.t
+++ b/t/scripts/Lintian/DepMap/05multi-add.t
@@ -6,7 +6,7 @@ use Test::More tests => 4;
use Lintian::DepMap;
-my $map = Lintian::DepMap->new();
+my $map = Lintian::DepMap->new;
$map->add('A');
$map->add('B');
@@ -29,7 +29,7 @@ is_deeply(
);
$map->satisfy('B');
-is_deeply([$map->selectable()], ['C'], 'B satisfied, C selectable');
+is_deeply([$map->selectable], ['C'], 'B satisfied, C selectable');
$map->satisfy('C');
-is_deeply([$map->selectable()], ['D'], 'C satisfied, D now selectable');
+is_deeply([$map->selectable], ['D'], 'C satisfied, D now selectable');
diff --git a/t/scripts/Lintian/DepMap/06parents.t b/t/scripts/Lintian/DepMap/06parents.t
index 9efb615..045fe01 100755
--- a/t/scripts/Lintian/DepMap/06parents.t
+++ b/t/scripts/Lintian/DepMap/06parents.t
@@ -6,7 +6,7 @@ use Test::More tests => 2;
use Lintian::DepMap;
-my $map = Lintian::DepMap->new();
+my $map = Lintian::DepMap->new;
$map->add('A');
$map->add('B', 'A');
diff --git a/t/scripts/Lintian/DepMap/08initialise.t b/t/scripts/Lintian/DepMap/08initialise.t
index 8d5b884..3d87eb4 100755
--- a/t/scripts/Lintian/DepMap/08initialise.t
+++ b/t/scripts/Lintian/DepMap/08initialise.t
@@ -6,33 +6,33 @@ use Test::More tests => 7;
use Lintian::DepMap;
-my $obj = Lintian::DepMap->new();
+my $obj = Lintian::DepMap->new;
-ok($obj->initialise(), 'Map can be initialised');
+ok($obj->initialise, 'Map can be initialised');
$obj->add('A');
$obj->select('A');
-$obj->initialise();
+$obj->initialise;
is(join(', ', $obj->selectable),
'A','A is selectable once again after being selected');
$obj->satisfy('A');
-$obj->initialise();
+$obj->initialise;
is(join(', ', $obj->selectable),
'A','A is selectable once again after being satisfied');
$obj->add('B');
$obj->satisfy('B');
-$obj->initialise();
+$obj->initialise;
is(join(', ', sort($obj->selectable)),
'A, B','A and B are selectable once again after being satisfied');
$obj->add('B', 'A');
$obj->satisfy('A');
-$obj->initialise();
+$obj->initialise;
is(join(', ', $obj->parents('B')), 'A','A is parent of B');
$obj->add('Z', 'X');
-$obj->initialise();
-is(join(', ', $obj->missing()), 'X', 'X is unknown');
-is(join(', ', sort($obj->known())), 'A, B, Z', 'X is not known');
+$obj->initialise;
+is(join(', ', $obj->missing), 'X', 'X is unknown');
+is(join(', ', sort($obj->known)), 'A, B, Z', 'X is not known');
diff --git a/t/scripts/Lintian/DepMap/08initialise2.t b/t/scripts/Lintian/DepMap/08initialise2.t
index a3d85ea..2ed3237 100755
--- a/t/scripts/Lintian/DepMap/08initialise2.t
+++ b/t/scripts/Lintian/DepMap/08initialise2.t
@@ -6,14 +6,14 @@ use Test::More tests => 2;
use Lintian::DepMap;
-my $obj = Lintian::DepMap->new();
+my $obj = Lintian::DepMap->new;
-$obj->initialise();
+$obj->initialise;
$obj->add('A');
$obj->add('B', 'A');
$obj->satisfy('A');
-$obj->initialise();
+$obj->initialise;
is(join(', ', $obj->selectable),
'A','Only A is selectable after reinitialising');
diff --git a/t/scripts/Lintian/DepMap/09unlink.t b/t/scripts/Lintian/DepMap/09unlink.t
index 5214382..5e397e6 100755
--- a/t/scripts/Lintian/DepMap/09unlink.t
+++ b/t/scripts/Lintian/DepMap/09unlink.t
@@ -8,34 +8,34 @@ use Lintian::DepMap;
my $map;
-$map = Lintian::DepMap->new();
+$map = Lintian::DepMap->new;
$map->add('A');
ok(eval {$map->unlink('A')}, 'Unlink A');
-is_deeply([$map->selectable()], [], 'A unlinked, not selectable');
-is($map->pending(), 0, 'A unlinked, nothing pending');
+is_deeply([$map->selectable], [], 'A unlinked, not selectable');
+is($map->pending, 0, 'A unlinked, nothing pending');
$map->add('B', 'A');
-is_deeply([$map->selectable()], [], 'A unlinked, B added but not selectable');
-is($map->pending(), 0, 'A unlinked, B added but not pending');
+is_deeply([$map->selectable], [], 'A unlinked, B added but not selectable');
+is($map->pending, 0, 'A unlinked, B added but not pending');
$map->add('A');
-is_deeply([$map->selectable()], ['A'], 'A re-added, selectable');
-is($map->pending(), 1, 'A re-added, pending');
+is_deeply([$map->selectable], ['A'], 'A re-added, selectable');
+is($map->pending, 1, 'A re-added, pending');
$map->satisfy('A');
-is_deeply([$map->selectable()], ['B'], 'A satisfied, B is now selectable');
+is_deeply([$map->selectable], ['B'], 'A satisfied, B is now selectable');
# re-add A for the following tests
$map->add('A');
ok(eval {$map->unlink('B')}, 'Unlink B');
-is_deeply([$map->selectable()], ['A'], 'B unlinked, A selectable');
-is($map->pending(), 1, 'B unlinked, pending');
+is_deeply([$map->selectable], ['A'], 'B unlinked, A selectable');
+is($map->pending, 1, 'B unlinked, pending');
$map->satisfy('A');
-is_deeply([$map->selectable()], [], 'A satisfied, nothing selectable');
-is($map->pending(), 0, 'A satisfied, nothing pending');
+is_deeply([$map->selectable], [], 'A satisfied, nothing selectable');
+is($map->pending, 0, 'A satisfied, nothing pending');
$map->add('A', 'B');
$map->add('B');
diff --git a/t/scripts/Lintian/DepMap/10circular.t b/t/scripts/Lintian/DepMap/10circular.t
index 7ae3088..6453719 100755
--- a/t/scripts/Lintian/DepMap/10circular.t
+++ b/t/scripts/Lintian/DepMap/10circular.t
@@ -6,7 +6,7 @@ use Test::More tests => 5;
use Lintian::DepMap;
-my $map = Lintian::DepMap->new();
+my $map = Lintian::DepMap->new;
$map->add('A', 'B');
$map->add('B', 'A');
@@ -19,7 +19,7 @@ $map->add('C');
is(join(', ', sort($map->circular)),
'A, B', 'A and B cause a circular dependency (2nd)');
-$map = Lintian::DepMap->new();
+$map = Lintian::DepMap->new;
$map->add('A', 'B');
$map->add('B', 'C');
$map->add('C', 'A');
diff --git a/t/scripts/Lintian/DepMap/11prefix.t b/t/scripts/Lintian/DepMap/11prefix.t
index 7b05387..9efcec3 100755
--- a/t/scripts/Lintian/DepMap/11prefix.t
+++ b/t/scripts/Lintian/DepMap/11prefix.t
@@ -6,7 +6,7 @@ use Test::More tests => 2;
use Lintian::DepMap;
-my $map = Lintian::DepMap->new();
+my $map = Lintian::DepMap->new;
$map->add('pA');
$map->add('pB', 'pA');
diff --git a/t/scripts/Lintian/DepMap/12done.t b/t/scripts/Lintian/DepMap/12done.t
index 07467c6..ace4e25 100755
--- a/t/scripts/Lintian/DepMap/12done.t
+++ b/t/scripts/Lintian/DepMap/12done.t
@@ -6,7 +6,7 @@ use Test::More tests => 4;
use Lintian::DepMap;
-my $obj = Lintian::DepMap->new();
+my $obj = Lintian::DepMap->new;
$obj->add('A');
ok(!$obj->done('A'), 'A is not done yet');
diff --git a/t/scripts/Lintian/DepMap/Properties/00construct.t b/t/scripts/Lintian/DepMap/Properties/00construct.t
index 8704b10..27439f5 100755
--- a/t/scripts/Lintian/DepMap/Properties/00construct.t
+++ b/t/scripts/Lintian/DepMap/Properties/00construct.t
@@ -9,7 +9,7 @@ BEGIN { use_ok('Lintian::DepMap::Properties'); }
my $map;
-ok(eval { $map = Lintian::DepMap::Properties->new(); }, 'Create');
+ok(eval { $map = Lintian::DepMap::Properties->new; }, 'Create');
my %prop = (name => 'John Doe', age => 20);
diff --git a/t/scripts/changelog-format.t b/t/scripts/changelog-format.t
index 863e0e3..5940c53 100755
--- a/t/scripts/changelog-format.t
+++ b/t/scripts/changelog-format.t
@@ -31,7 +31,7 @@ my $changelog = Parse::DebianChangelog->init({ infile => 'debian/changelog' })
plan skip_all => 'Only valid for regular Debian releases'
if should_skip($changelog);
-my $changes = $changelog->dpkg()->{'Changes'};
+my $changes = $changelog->dpkg->{'Changes'};
my $line = 0;
my $prev_head = '';
my $release_header = 0;
diff --git a/t/scripts/spellintian.t b/t/scripts/spellintian.t
index ef4325d..c658fc2 100755
--- a/t/scripts/spellintian.t
+++ b/t/scripts/spellintian.t
@@ -36,7 +36,7 @@ sub t {
my $output;
my $cmd
= IPC::Run::start([$cmd_path, @options],'<', \$input,'>', \$output,);
- $cmd->finish();
+ $cmd->finish;
cmp_ok($cmd->result, '==', 0, 'exit code 0');
cmp_ok($output, 'eq', $expected, 'expected output');
return;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: