summaryrefslogtreecommitdiff
path: root/scripts/Dpkg
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r--scripts/Dpkg/Arch.pm16
-rw-r--r--scripts/Dpkg/BuildEnv.pm4
-rw-r--r--scripts/Dpkg/BuildFlags.pm23
-rw-r--r--scripts/Dpkg/BuildOptions.pm2
-rw-r--r--scripts/Dpkg/Changelog.pm8
-rw-r--r--scripts/Dpkg/Changelog/Entry.pm8
-rw-r--r--scripts/Dpkg/Changelog/Entry/Debian.pm26
-rw-r--r--scripts/Dpkg/Checksums.pm7
-rw-r--r--scripts/Dpkg/Compression.pm6
-rw-r--r--scripts/Dpkg/Compression/FileHandle.pm6
-rw-r--r--scripts/Dpkg/Compression/Process.pm4
-rw-r--r--scripts/Dpkg/Conf.pm2
-rw-r--r--scripts/Dpkg/Control.pm2
-rw-r--r--scripts/Dpkg/Control/FieldsCore.pm2
-rw-r--r--scripts/Dpkg/Control/HashCore.pm2
-rw-r--r--scripts/Dpkg/Deps.pm8
-rw-r--r--scripts/Dpkg/Dist/Files.pm2
-rw-r--r--scripts/Dpkg/File.pm2
-rw-r--r--scripts/Dpkg/Index.pm4
-rw-r--r--scripts/Dpkg/Interface/Storable.pm2
-rw-r--r--scripts/Dpkg/Shlibs.pm2
-rw-r--r--scripts/Dpkg/Shlibs/Objdump.pm10
-rw-r--r--scripts/Dpkg/Shlibs/Symbol.pm2
-rw-r--r--scripts/Dpkg/Shlibs/SymbolFile.pm8
-rw-r--r--scripts/Dpkg/Source/Archive.pm3
-rw-r--r--scripts/Dpkg/Source/Functions.pm8
-rw-r--r--scripts/Dpkg/Source/Package.pm12
-rw-r--r--scripts/Dpkg/Source/Package/V1.pm3
-rw-r--r--scripts/Dpkg/Source/Package/V2.pm12
-rw-r--r--scripts/Dpkg/Source/Package/V3/Quilt.pm4
-rw-r--r--scripts/Dpkg/Source/Patch.pm4
-rw-r--r--scripts/Dpkg/Source/Quilt.pm24
-rw-r--r--scripts/Dpkg/Substvars.pm2
-rw-r--r--scripts/Dpkg/Vendor/Default.pm2
-rw-r--r--scripts/Dpkg/Vendor/Ubuntu.pm2
-rw-r--r--scripts/Dpkg/Version.pm4
36 files changed, 124 insertions, 114 deletions
diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
index 10eeeb21d..9702bd09f 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
@@ -235,7 +235,7 @@ sub debtriplet_to_gnutriplet(@)
sub gnutriplet_to_debtriplet($)
{
- my ($gnu) = @_;
+ my $gnu = shift;
return unless defined($gnu);
my ($gnu_cpu, $gnu_os) = split(/-/, $gnu, 2);
return unless defined($gnu_cpu) && defined($gnu_os);
@@ -265,7 +265,7 @@ sub gnutriplet_to_debtriplet($)
sub gnutriplet_to_multiarch($)
{
- my ($gnu) = @_;
+ my $gnu = shift;
my ($cpu, $cdr) = split(/-/, $gnu, 2);
if ($cpu =~ /^i[4567]86$/) {
@@ -277,7 +277,7 @@ sub gnutriplet_to_multiarch($)
sub debarch_to_multiarch($)
{
- my ($arch) = @_;
+ my $arch = shift;
return gnutriplet_to_multiarch(debarch_to_gnutriplet($arch));
}
@@ -319,21 +319,21 @@ sub debarch_to_debtriplet($)
sub debarch_to_gnutriplet($)
{
- my ($arch) = @_;
+ my $arch = shift;
return debtriplet_to_gnutriplet(debarch_to_debtriplet($arch));
}
sub gnutriplet_to_debarch($)
{
- my ($gnu) = @_;
+ my $gnu = shift;
return debtriplet_to_debarch(gnutriplet_to_debtriplet($gnu));
}
sub debwildcard_to_debtriplet($)
{
- my ($arch) = @_;
+ my $arch = shift;
my @tuple = split /-/, $arch, 3;
if (any { $_ eq 'any' } @tuple) {
@@ -351,7 +351,7 @@ sub debwildcard_to_debtriplet($)
sub debarch_to_cpuattrs($)
{
- my ($arch) = @_;
+ my $arch = shift;
my ($abi, $os, $cpu) = debarch_to_debtriplet($arch);
if (defined($cpu)) {
@@ -399,7 +399,7 @@ sub debarch_is($$)
sub debarch_is_wildcard($)
{
- my ($arch) = @_;
+ my $arch = shift;
return 0 if $arch eq 'all';
diff --git a/scripts/Dpkg/BuildEnv.pm b/scripts/Dpkg/BuildEnv.pm
index 6d41419f1..0de7844de 100644
--- a/scripts/Dpkg/BuildEnv.pm
+++ b/scripts/Dpkg/BuildEnv.pm
@@ -60,7 +60,7 @@ accessed.
=cut
sub get {
- my ($varname) = @_;
+ my $varname = shift;
$env_accessed{$varname} = 1;
return $ENV{$varname};
}
@@ -73,7 +73,7 @@ Record it as being accessed.
=cut
sub has {
- my ($varname) = @_;
+ my $varname = shift;
$env_accessed{$varname} = 1;
return exists $ENV{$varname};
}
diff --git a/scripts/Dpkg/BuildFlags.pm b/scripts/Dpkg/BuildFlags.pm
index ea031b4d3..999a5901a 100644
--- a/scripts/Dpkg/BuildFlags.pm
+++ b/scripts/Dpkg/BuildFlags.pm
@@ -67,7 +67,8 @@ Reset the flags stored to the default set provided by the vendor.
=cut
sub load_vendor_defaults {
- my ($self) = @_;
+ my $self = shift;
+
$self->{options} = {};
$self->{source} = {};
$self->{features} = {};
@@ -118,7 +119,8 @@ Update flags from the system configuration.
=cut
sub load_system_config {
- my ($self) = @_;
+ my $self = shift;
+
$self->update_from_conffile("$Dpkg::CONFDIR/buildflags.conf", 'system');
}
@@ -129,7 +131,8 @@ Update flags from the user configuration.
=cut
sub load_user_config {
- my ($self) = @_;
+ my $self = shift;
+
my $confdir = $ENV{XDG_CONFIG_HOME};
$confdir ||= $ENV{HOME} . '/.config' if length $ENV{HOME};
if (length $confdir) {
@@ -145,7 +148,8 @@ dpkg-buildflags(1) for details.
=cut
sub load_environment_config {
- my ($self) = @_;
+ my $self = shift;
+
foreach my $flag (keys %{$self->{flags}}) {
my $envvar = 'DEB_' . $flag . '_SET';
if (Dpkg::BuildEnv::has($envvar)) {
@@ -174,7 +178,8 @@ dpkg-buildflags(1) for details.
=cut
sub load_maintainer_config {
- my ($self) = @_;
+ my $self = shift;
+
foreach my $flag (keys %{$self->{flags}}) {
my $envvar = 'DEB_' . $flag . '_MAINT_SET';
if (Dpkg::BuildEnv::has($envvar)) {
@@ -205,7 +210,8 @@ default build flags defined by the vendor.
=cut
sub load_config {
- my ($self) = @_;
+ my $self = shift;
+
$self->load_system_config();
$self->load_user_config();
$self->load_environment_config();
@@ -360,7 +366,8 @@ true for).
=cut
sub get_feature_areas {
- my ($self) = @_;
+ my $self = shift;
+
return keys %{$self->{features}};
}
@@ -429,7 +436,7 @@ Returns the list of flags stored in the object.
=cut
sub list {
- my ($self) = @_;
+ my $self = shift;
my @list = sort keys %{$self->{flags}};
return @list;
}
diff --git a/scripts/Dpkg/BuildOptions.pm b/scripts/Dpkg/BuildOptions.pm
index c252215a8..3c9aefcad 100644
--- a/scripts/Dpkg/BuildOptions.pm
+++ b/scripts/Dpkg/BuildOptions.pm
@@ -70,7 +70,7 @@ Reset the object to not have any option (it's empty).
=cut
sub reset {
- my ($self) = @_;
+ my $self = shift;
$self->{options} = {};
$self->{source} = {};
}
diff --git a/scripts/Dpkg/Changelog.pm b/scripts/Dpkg/Changelog.pm
index 94ac679c2..7893185fd 100644
--- a/scripts/Dpkg/Changelog.pm
+++ b/scripts/Dpkg/Changelog.pm
@@ -103,7 +103,7 @@ previous L<parse> runs.
=cut
sub reset_parse_errors {
- my ($self) = @_;
+ my $self = shift;
$self->{parse_errors} = [];
}
@@ -159,7 +159,7 @@ the original line
=cut
sub get_parse_errors {
- my ($self) = @_;
+ my $self = shift;
if (wantarray) {
return @{$self->{parse_errors}};
@@ -194,7 +194,7 @@ sub set_unparsed_tail {
}
sub get_unparsed_tail {
- my ($self) = @_;
+ my $self = shift;
return $self->{unparsed_tail};
}
@@ -411,7 +411,7 @@ entries selected by the range set at creation (or with set_options).
=cut
sub abort_early {
- my ($self) = @_;
+ my $self = shift;
my $data = $self->{data} or return;
my $r = $self->{range} or return;
diff --git a/scripts/Dpkg/Changelog/Entry.pm b/scripts/Dpkg/Changelog/Entry.pm
index a4d5770cd..9c1c40464 100644
--- a/scripts/Dpkg/Changelog/Entry.pm
+++ b/scripts/Dpkg/Changelog/Entry.pm
@@ -55,7 +55,7 @@ until one has been successfully parsed or built from scratch.
=cut
sub new {
- my ($this) = @_;
+ my $this = shift;
my $class = ref($this) || $this;
my $self = {
@@ -176,7 +176,7 @@ parts.
=cut
sub is_empty {
- my ($self) = @_;
+ my $self = shift;
return !(defined($self->{header}) || defined($self->{trailer}) ||
scalar(@{$self->{changes}}));
}
@@ -189,7 +189,7 @@ empty line to separate each part.
=cut
sub normalize {
- my ($self) = @_;
+ my $self = shift;
if (defined($self->{header})) {
$self->{header} =~ s/\s+$//g;
$self->{blank_after_header} = [''];
@@ -289,7 +289,7 @@ in the output format of C<dpkg-parsechangelog>.
=cut
sub get_dpkg_changes {
- my ($self) = @_;
+ my $self = shift;
my $header = $self->get_part('header') // '';
$header =~ s/\s+$//;
return "\n$header\n\n" . join("\n", @{$self->get_part('changes')});
diff --git a/scripts/Dpkg/Changelog/Entry/Debian.pm b/scripts/Dpkg/Changelog/Entry/Debian.pm
index 6cbe7cb3d..01b0ae472 100644
--- a/scripts/Dpkg/Changelog/Entry/Debian.pm
+++ b/scripts/Dpkg/Changelog/Entry/Debian.pm
@@ -78,7 +78,7 @@ following line necessarily starts a new item).
=cut
sub get_change_items {
- my ($self) = @_;
+ my $self = shift;
my (@items, @blanks, $item);
foreach my $line (@{$self->get_part('changes')}) {
if ($line =~ /^\s*\*/) {
@@ -115,7 +115,7 @@ have been found.
=cut
sub check_header {
- my ($self) = @_;
+ my $self = shift;
my @errors;
if (defined($self->{header}) and $self->{header} =~ $regex_header) {
my ($version, $options) = ($2, $4);
@@ -153,7 +153,7 @@ sub check_header {
}
sub check_trailer {
- my ($self) = @_;
+ my $self = shift;
my @errors;
if (defined($self->{trailer}) and $self->{trailer} =~ $regex_trailer) {
if ($3 ne ' ') {
@@ -176,13 +176,13 @@ empty line to separate each part.
=cut
sub normalize {
- my ($self) = @_;
+ my $self = shift;
$self->SUPER::normalize();
#XXX: recreate header/trailer
}
sub get_source {
- my ($self) = @_;
+ my $self = shift;
if (defined($self->{header}) and $self->{header} =~ $regex_header) {
return $1;
}
@@ -190,7 +190,7 @@ sub get_source {
}
sub get_version {
- my ($self) = @_;
+ my $self = shift;
if (defined($self->{header}) and $self->{header} =~ $regex_header) {
return Dpkg::Version->new($2);
}
@@ -198,7 +198,7 @@ sub get_version {
}
sub get_distributions {
- my ($self) = @_;
+ my $self = shift;
if (defined($self->{header}) and $self->{header} =~ $regex_header) {
my $value = $3;
$value =~ s/^\s+//;
@@ -210,7 +210,7 @@ sub get_distributions {
}
sub get_optional_fields {
- my ($self) = @_;
+ my $self = shift;
my $f = Dpkg::Control::Changelog->new();
if (defined($self->{header}) and $self->{header} =~ $regex_header) {
my $options = $4;
@@ -229,7 +229,7 @@ sub get_optional_fields {
}
sub get_urgency {
- my ($self) = @_;
+ my $self = shift;
my $f = $self->get_optional_fields();
if (exists $f->{Urgency}) {
$f->{Urgency} =~ s/\s.*$//;
@@ -239,7 +239,7 @@ sub get_urgency {
}
sub get_maintainer {
- my ($self) = @_;
+ my $self = shift;
if (defined($self->{trailer}) and $self->{trailer} =~ $regex_trailer) {
return "$1 <$2>";
}
@@ -247,7 +247,7 @@ sub get_maintainer {
}
sub get_timestamp {
- my ($self) = @_;
+ my $self = shift;
if (defined($self->{trailer}) and $self->{trailer} =~ $regex_trailer) {
return $4;
}
@@ -267,7 +267,7 @@ Checks if the line matches a valid changelog header line.
=cut
sub match_header {
- my ($line) = @_;
+ my $line = shift;
return $line =~ /$regex_header/;
}
@@ -279,7 +279,7 @@ Checks if the line matches a valid changelog trailing line.
=cut
sub match_trailer {
- my ($line) = @_;
+ my $line = shift;
return $line =~ /$regex_trailer/;
}
diff --git a/scripts/Dpkg/Checksums.pm b/scripts/Dpkg/Checksums.pm
index 23e27064a..72fadbab1 100644
--- a/scripts/Dpkg/Checksums.pm
+++ b/scripts/Dpkg/Checksums.pm
@@ -83,7 +83,7 @@ supported. The checksum algorithm is case-insensitive.
=cut
sub checksums_is_supported($) {
- my ($alg) = @_;
+ my $alg = shift;
return exists $CHECKSUMS->{lc($alg)};
}
@@ -137,7 +137,8 @@ as if it was newly created.
=cut
sub reset {
- my ($self) = @_;
+ my $self = shift;
+
$self->{files} = [];
$self->{checksums} = {};
$self->{size} = {};
@@ -272,7 +273,7 @@ Return the list of files whose checksums are stored in the object.
=cut
sub get_files {
- my ($self) = @_;
+ my $self = shift;
return @{$self->{files}};
}
diff --git a/scripts/Dpkg/Compression.pm b/scripts/Dpkg/Compression.pm
index 6ebcfa5c4..e4d6d9123 100644
--- a/scripts/Dpkg/Compression.pm
+++ b/scripts/Dpkg/Compression.pm
@@ -175,7 +175,7 @@ sub compression_get_default {
}
sub compression_set_default {
- my ($method) = @_;
+ my $method = shift;
error(g_('%s is not a supported compression'), $method)
unless compression_is_supported($method);
$default_compression = $method;
@@ -204,7 +204,7 @@ sub compression_get_default_level {
}
sub compression_set_default_level {
- my ($level) = @_;
+ my $level = shift;
error(g_('%s is not a compression level'), $level)
if defined($level) and not compression_is_valid_level($level);
$default_compression_level = $level;
@@ -218,7 +218,7 @@ Returns a boolean indicating whether $level is a valid compression level
=cut
sub compression_is_valid_level {
- my ($level) = @_;
+ my $level = shift;
return $level =~ /^([1-9]|fast|best)$/;
}
diff --git a/scripts/Dpkg/Compression/FileHandle.pm b/scripts/Dpkg/Compression/FileHandle.pm
index d24d55b98..4ccd31584 100644
--- a/scripts/Dpkg/Compression/FileHandle.pm
+++ b/scripts/Dpkg/Compression/FileHandle.pm
@@ -363,7 +363,7 @@ method.
=cut
sub use_compression {
- my ($self) = @_;
+ my $self = shift;
my $comp = *$self->{compression};
if ($comp eq 'none') {
return 0;
@@ -382,7 +382,7 @@ along in a derived object.
=cut
sub get_filehandle {
- my ($self) = @_;
+ my $self = shift;
return *$self->{file} if exists *$self->{file};
}
@@ -426,7 +426,7 @@ sub open_for_read {
}
sub cleanup {
- my ($self) = @_;
+ my $self = shift;
my $cmdline = *$self->{compressor}{cmdline} // '';
*$self->{compressor}->wait_end_process(nocheck => *$self->{allow_sigpipe});
if (*$self->{allow_sigpipe}) {
diff --git a/scripts/Dpkg/Compression/Process.pm b/scripts/Dpkg/Compression/Process.pm
index 0927e817b..8851e3607 100644
--- a/scripts/Dpkg/Compression/Process.pm
+++ b/scripts/Dpkg/Compression/Process.pm
@@ -104,7 +104,7 @@ and its standard output.
=cut
sub get_compress_cmdline {
- my ($self) = @_;
+ my $self = shift;
my @prog = (@{compression_get_property($self->{compression}, 'comp_prog')});
my $level = '-' . $self->{compression_level};
$level = '--' . $self->{compression_level}
@@ -114,7 +114,7 @@ sub get_compress_cmdline {
}
sub get_uncompress_cmdline {
- my ($self) = @_;
+ my $self = shift;
return (@{compression_get_property($self->{compression}, 'decomp_prog')});
}
diff --git a/scripts/Dpkg/Conf.pm b/scripts/Dpkg/Conf.pm
index f3b5e4b0d..274665cfa 100644
--- a/scripts/Dpkg/Conf.pm
+++ b/scripts/Dpkg/Conf.pm
@@ -78,7 +78,7 @@ Returns the list of options that can be parsed like @ARGV.
=cut
sub get_options {
- my ($self) = @_;
+ my $self = shift;
return @{$self->{options}};
}
diff --git a/scripts/Dpkg/Control.pm b/scripts/Dpkg/Control.pm
index a9cb5fbd8..7b602b4c6 100644
--- a/scripts/Dpkg/Control.pm
+++ b/scripts/Dpkg/Control.pm
@@ -185,7 +185,7 @@ set during new().
=cut
sub get_type {
- my ($self) = @_;
+ my $self = shift;
return $$self->{type};
}
diff --git a/scripts/Dpkg/Control/FieldsCore.pm b/scripts/Dpkg/Control/FieldsCore.pm
index 6c0d9e2e5..bf724be08 100644
--- a/scripts/Dpkg/Control/FieldsCore.pm
+++ b/scripts/Dpkg/Control/FieldsCore.pm
@@ -540,7 +540,7 @@ The list might be empty for types where the order does not matter much.
=cut
sub field_ordered_list($) {
- my ($type) = @_;
+ my $type = shift;
return @{$FIELD_ORDER{$type}} if exists $FIELD_ORDER{$type};
return ();
}
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm
index d06c18f3b..05aaa55a8 100644
--- a/scripts/Dpkg/Control/HashCore.pm
+++ b/scripts/Dpkg/Control/HashCore.pm
@@ -133,7 +133,7 @@ sub new {
# that everything gets garbage-collected.
sub DESTROY {
- my ($self) = @_;
+ my $self = shift;
delete $$self->{fields};
}
diff --git a/scripts/Dpkg/Deps.pm b/scripts/Dpkg/Deps.pm
index 7c411920c..06ddb0cfd 100644
--- a/scripts/Dpkg/Deps.pm
+++ b/scripts/Dpkg/Deps.pm
@@ -564,7 +564,7 @@ sub new {
}
sub reset {
- my ($self) = @_;
+ my $self = shift;
$self->{package} = undef;
$self->{relation} = undef;
$self->{version} = undef;
@@ -826,7 +826,7 @@ sub reduce_arch {
}
sub has_arch_restriction {
- my ($self) = @_;
+ my $self = shift;
if (defined $self->{arches}) {
return $self->{package};
} else {
@@ -940,7 +940,7 @@ sub new {
}
sub reset {
- my ($self) = @_;
+ my $self = shift;
$self->{list} = [];
}
@@ -981,7 +981,7 @@ sub reduce_arch {
}
sub has_arch_restriction {
- my ($self) = @_;
+ my $self = shift;
my @res;
foreach my $dep (@{$self->{list}}) {
push @res, $dep->has_arch_restriction();
diff --git a/scripts/Dpkg/Dist/Files.pm b/scripts/Dpkg/Dist/Files.pm
index b9f229be1..6d2d83832 100644
--- a/scripts/Dpkg/Dist/Files.pm
+++ b/scripts/Dpkg/Dist/Files.pm
@@ -84,7 +84,7 @@ sub parse {
}
sub get_files {
- my ($self) = @_;
+ my $self = shift;
return map { $self->{files}->{$_} } @{$self->{order}};
}
diff --git a/scripts/Dpkg/File.pm b/scripts/Dpkg/File.pm
index b28db26b1..4eadca99b 100644
--- a/scripts/Dpkg/File.pm
+++ b/scripts/Dpkg/File.pm
@@ -50,7 +50,7 @@ sub file_lock($$) {
}
sub file_slurp {
- my ($fh) = @_;
+ my $fh = shift;
local $/;
my $data = <$fh>;
diff --git a/scripts/Dpkg/Index.pm b/scripts/Dpkg/Index.pm
index 4db19a6b3..13551b59e 100644
--- a/scripts/Dpkg/Index.pm
+++ b/scripts/Dpkg/Index.pm
@@ -127,7 +127,7 @@ set during new().
=cut
sub get_type {
- my ($self) = @_;
+ my $self = shift;
return $self->{type};
}
@@ -187,7 +187,7 @@ object.
=cut
sub new_item {
- my ($self) = @_;
+ my $self = shift;
return Dpkg::Control->new(type => $self->{type});
}
diff --git a/scripts/Dpkg/Interface/Storable.pm b/scripts/Dpkg/Interface/Storable.pm
index d934d7e59..0c73312fa 100644
--- a/scripts/Dpkg/Interface/Storable.pm
+++ b/scripts/Dpkg/Interface/Storable.pm
@@ -129,7 +129,7 @@ Return a string representation of the object.
=cut
sub _stringify {
- my ($self) = @_;
+ my $self = shift;
unless ($self->can('output')) {
croak ref($self) . ' cannot be stringified, it lacks the output method';
}
diff --git a/scripts/Dpkg/Shlibs.pm b/scripts/Dpkg/Shlibs.pm
index 4c0b9d0ce..b0bffb464 100644
--- a/scripts/Dpkg/Shlibs.pm
+++ b/scripts/Dpkg/Shlibs.pm
@@ -108,7 +108,7 @@ sub parse_ldso_conf {
}
sub add_library_dir {
- my ($dir) = @_;
+ my $dir = shift;
unshift @librarypaths, $dir;
}
diff --git a/scripts/Dpkg/Shlibs/Objdump.pm b/scripts/Dpkg/Shlibs/Objdump.pm
index 3965358bf..b69a1ff9b 100644
--- a/scripts/Dpkg/Shlibs/Objdump.pm
+++ b/scripts/Dpkg/Shlibs/Objdump.pm
@@ -121,7 +121,7 @@ sub has_object {
}
sub is_elf {
- my ($file) = @_;
+ my $file = shift;
open(my $file_fh, '<', $file) or syserr(g_('cannot read %s'), $file);
my ($header, $result) = ('', 0);
if (read($file_fh, $header, 4) == 4) {
@@ -152,7 +152,7 @@ sub new {
}
sub reset {
- my ($self) = @_;
+ my $self = shift;
$self->{file} = '';
$self->{id} = '';
@@ -346,7 +346,7 @@ sub parse_dynamic_symbol {
}
sub apply_relocations {
- my ($self) = @_;
+ my $self = shift;
foreach my $sym (values %{$self->{dynsyms}}) {
# We want to mark as undefined symbols those which are currently
# defined but that depend on a copy relocation
@@ -388,13 +388,13 @@ sub get_symbol {
}
sub get_exported_dynamic_symbols {
- my ($self) = @_;
+ my $self = shift;
return grep { $_->{defined} && $_->{dynamic} && !$_->{local} }
values %{$self->{dynsyms}};
}
sub get_undefined_dynamic_symbols {
- my ($self) = @_;
+ my $self = shift;
return grep { (!$_->{defined}) && $_->{dynamic} }
values %{$self->{dynsyms}};
}
diff --git a/scripts/Dpkg/Shlibs/Symbol.pm b/scripts/Dpkg/Shlibs/Symbol.pm
index 6ccaca2c0..0c8965763 100644
--- a/scripts/Dpkg/Shlibs/Symbol.pm
+++ b/scripts/Dpkg/Shlibs/Symbol.pm
@@ -396,7 +396,7 @@ sub convert_to_alias {
}
sub get_tagspec {
- my ($self) = @_;
+ my $self = shift;
if ($self->has_tags()) {
my @tags;
for my $tagname (@{$self->{tagorder}}) {
diff --git a/scripts/Dpkg/Shlibs/SymbolFile.pm b/scripts/Dpkg/Shlibs/SymbolFile.pm
index 931f6bc27..fd491087e 100644
--- a/scripts/Dpkg/Shlibs/SymbolFile.pm
+++ b/scripts/Dpkg/Shlibs/SymbolFile.pm
@@ -101,12 +101,12 @@ sub new {
}
sub get_arch {
- my ($self) = @_;
+ my $self = shift;
return $self->{arch};
}
sub clear {
- my ($self) = @_;
+ my $self = shift;
$self->{objects} = {};
}
@@ -120,7 +120,7 @@ sub clear_except {
}
sub get_sonames {
- my ($self) = @_;
+ my $self = shift;
return keys %{$self->{objects}};
}
@@ -457,7 +457,7 @@ sub merge_symbols {
}
sub is_empty {
- my ($self) = @_;
+ my $self = shift;
return scalar(keys %{$self->{objects}}) ? 0 : 1;
}
diff --git a/scripts/Dpkg/Source/Archive.pm b/scripts/Dpkg/Source/Archive.pm
index 643f73e91..1728f2329 100644
--- a/scripts/Dpkg/Source/Archive.pm
+++ b/scripts/Dpkg/Source/Archive.pm
@@ -87,7 +87,8 @@ sub add_directory {
}
sub finish {
- my ($self) = @_;
+ my $self = shift;
+
close(*$self->{tar_input}) or syserr(g_('close on tar input'));
wait_child(*$self->{pid}, cmdline => 'tar -cf -');
delete *$self->{pid};
diff --git a/scripts/Dpkg/Source/Functions.pm b/scripts/Dpkg/Source/Functions.pm
index 5dbabbd1e..70a1364ab 100644
--- a/scripts/Dpkg/Source/Functions.pm
+++ b/scripts/Dpkg/Source/Functions.pm
@@ -28,7 +28,7 @@ use Dpkg::IPC;
use POSIX qw(:errno_h);
sub erasedir {
- my ($dir) = @_;
+ my $dir = shift;
if (not lstat($dir)) {
return if $! == ENOENT;
syserr(g_('cannot stat directory %s (before removal)'), $dir);
@@ -43,7 +43,7 @@ sub erasedir {
}
sub fixperms {
- my ($dir) = @_;
+ my $dir = shift;
my ($mode, $modes_set);
# Unfortunately tar insists on applying our umask _to the original
# permissions_ rather than mostly-ignoring the original
@@ -72,7 +72,7 @@ sub fixperms {
# used to set file timestamps. This avoids confusion when an
# NFS server and NFS client disagree about what time it is.
sub fs_time($) {
- my ($file) = @_;
+ my $file = shift;
my $is_temp = 0;
if (not -e $file) {
open(my $temp_fh, '>', $file) or syserr(g_('cannot write %s'));
@@ -89,7 +89,7 @@ sub fs_time($) {
}
sub is_binary($) {
- my ($file) = @_;
+ my $file = shift;
# TODO: might want to reimplement what diff does, aka checking if the
# file contains \0 in the first 4Kb of data
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index 36e62ddba..750cba8a3 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -140,7 +140,7 @@ Set a regex as the new default diff ignore regex.
=cut
sub set_default_diff_ignore_regex {
- my ($regex) = @_;
+ my $regex = shift;
$diff_ignore_default_regex = $regex;
}
@@ -209,7 +209,7 @@ sub new {
}
sub init_options {
- my ($self) = @_;
+ my $self = shift;
# Use full ignore list by default
# note: this function is not called by V1 packages
$self->{options}{diff_ignore_regex} ||= $diff_ignore_default_regex;
@@ -298,7 +298,7 @@ Returns the filename of the DSC file.
=cut
sub get_filename {
- my ($self) = @_;
+ my $self = shift;
return $self->{basedir} . $self->{filename};
}
@@ -310,7 +310,7 @@ usually do not have any path information.
=cut
sub get_files {
- my ($self) = @_;
+ my $self = shift;
return $self->{checksums}->get_files();
}
@@ -323,7 +323,7 @@ discovered, it immediately errors out.
=cut
sub check_checksums {
- my ($self) = @_;
+ my $self = shift;
my $checksums = $self->{checksums};
# add_from_file verify the checksums if they are already existing
foreach my $file ($checksums->get_files()) {
@@ -386,7 +386,7 @@ then any problem will result in a fatal error.
=cut
sub check_signature {
- my ($self) = @_;
+ my $self = shift;
my $dsc = $self->get_filename();
my @exec;
diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm
index b9d0db612..d595acb74 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -41,7 +41,8 @@ use File::Spec;
our $CURRENT_MINOR_VERSION = '0';
sub init_options {
- my ($self) = @_;
+ my $self = shift;
+
# Don't call $self->SUPER::init_options() on purpose, V1.0 has no
# ignore by default
if ($self->{options}{diff_ignore_regex}) {
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index e985b0de8..df1bbbd93 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -50,7 +50,7 @@ use File::Copy;
our $CURRENT_MINOR_VERSION = '0';
sub init_options {
- my ($self) = @_;
+ my $self = shift;
$self->SUPER::init_options();
$self->{options}{include_removal} //= 0;
$self->{options}{include_timestamp} //= 0;
@@ -270,7 +270,7 @@ sub unapply_patches {
}
sub upstream_tarball_template {
- my ($self) = @_;
+ my $self = shift;
my $ext = '{' . join(',',
sort map {
compression_get_property($_, 'file_ext')
@@ -723,7 +723,7 @@ sub new_binary_found {
}
sub load_allowed_binaries {
- my ($self) = @_;
+ my $self = shift;
my $incbin_file = $self->{include_binaries_path};
if (-f $incbin_file) {
open(my $incbin_fh, '<', $incbin_file)
@@ -744,7 +744,7 @@ sub binary_is_allowed {
}
sub update_debian_source_include_binaries {
- my ($self) = @_;
+ my $self = shift;
my @unknown_binaries = $self->get_unknown_binaries();
return unless scalar(@unknown_binaries);
@@ -762,12 +762,12 @@ sub update_debian_source_include_binaries {
}
sub get_unknown_binaries {
- my ($self) = @_;
+ my $self = shift;
return grep { not $self->binary_is_allowed($_) } $self->get_seen_binaries();
}
sub get_seen_binaries {
- my ($self) = @_;
+ my $self = shift;
my @seen = sort keys %{$self->{seen_binaries}};
return @seen;
}
diff --git a/scripts/Dpkg/Source/Package/V3/Quilt.pm b/scripts/Dpkg/Source/Package/V3/Quilt.pm
index b43d734d0..83ea3b3cf 100644
--- a/scripts/Dpkg/Source/Package/V3/Quilt.pm
+++ b/scripts/Dpkg/Source/Package/V3/Quilt.pm
@@ -39,7 +39,7 @@ use File::Copy;
our $CURRENT_MINOR_VERSION = '0';
sub init_options {
- my ($self) = @_;
+ my $self = shift;
$self->{options}{single_debian_patch} //= 0;
$self->{options}{allow_version_of_quilt_db} //= [];
@@ -84,7 +84,7 @@ sub can_build {
}
sub get_autopatch_name {
- my ($self) = @_;
+ my $self = shift;
if ($self->{options}{single_debian_patch}) {
return 'debian-changes';
} else {
diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm
index ed2acce9b..b5001c092 100644
--- a/scripts/Dpkg/Source/Patch.pm
+++ b/scripts/Dpkg/Source/Patch.pm
@@ -298,13 +298,13 @@ sub add_diff_directory {
}
sub finish {
- my ($self) = @_;
+ my $self = shift;
close($self) or syserr(g_('cannot close %s'), $self->get_filename());
return not *$self->{errors};
}
sub register_error {
- my ($self) = @_;
+ my $self = shift;
*$self->{errors}++;
}
sub _fail_with_msg {
diff --git a/scripts/Dpkg/Source/Quilt.pm b/scripts/Dpkg/Source/Quilt.pm
index 005ec5902..3a98c71c9 100644
--- a/scripts/Dpkg/Source/Quilt.pm
+++ b/scripts/Dpkg/Source/Quilt.pm
@@ -49,7 +49,7 @@ sub new {
}
sub setup_db {
- my ($self) = @_;
+ my $self = shift;
my $db_dir = $self->get_db_file();
if (not -d $db_dir) {
mkdir $db_dir or syserr(g_('cannot mkdir %s'), $db_dir);
@@ -80,14 +80,14 @@ sub setup_db {
}
sub load_db {
- my ($self) = @_;
+ my $self = shift;
my $pc_applied = $self->get_db_file('applied-patches');
$self->{applied_patches} = [ $self->read_patch_list($pc_applied) ];
}
sub save_db {
- my ($self) = @_;
+ my $self = shift;
$self->setup_db();
my $pc_applied = $self->get_db_file('applied-patches');
@@ -102,17 +102,17 @@ sub load_series {
}
sub series {
- my ($self) = @_;
+ my $self = shift;
return @{$self->{series}};
}
sub applied {
- my ($self) = @_;
+ my $self = shift;
return @{$self->{applied_patches}};
}
sub top {
- my ($self) = @_;
+ my $self = shift;
my $count = scalar @{$self->{applied_patches}};
return $self->{applied_patches}[$count - 1] if $count;
return;
@@ -155,7 +155,7 @@ sub unregister {
}
sub next {
- my ($self) = @_;
+ my $self = shift;
my $count_applied = scalar @{$self->{applied_patches}};
my $count_series = scalar @{$self->{series}};
return $self->{series}[$count_applied] if ($count_series > $count_applied);
@@ -226,7 +226,7 @@ sub pop {
}
sub get_db_version {
- my ($self) = @_;
+ my $self = shift;
my $pc_ver = $self->get_db_file('.version');
if (-f $pc_ver) {
open(my $ver_fh, '<', $pc_ver) or syserr(g_('cannot read %s'), $pc_ver);
@@ -239,7 +239,7 @@ sub get_db_version {
}
sub find_problems {
- my ($self) = @_;
+ my $self = shift;
my $patch_dir = $self->get_patch_file();
if (-e $patch_dir and not -d _) {
return sprintf(g_('%s should be a directory or non-existing'), $patch_dir);
@@ -252,7 +252,7 @@ sub find_problems {
}
sub get_series_file {
- my ($self) = @_;
+ my $self = shift;
my $vendor = lc(get_current_vendor() || 'debian');
# Series files are stored alongside patches
my $default_series = $self->get_patch_file('series');
@@ -267,7 +267,7 @@ sub get_db_file {
}
sub get_db_dir {
- my ($self) = @_;
+ my $self = shift;
return $self->get_db_file();
}
@@ -277,7 +277,7 @@ sub get_patch_file {
}
sub get_patch_dir {
- my ($self) = @_;
+ my $self = shift;
return $self->get_patch_file();
}
diff --git a/scripts/Dpkg/Substvars.pm b/scripts/Dpkg/Substvars.pm
index ffd54c3ae..3ac1a517d 100644
--- a/scripts/Dpkg/Substvars.pm
+++ b/scripts/Dpkg/Substvars.pm
@@ -251,7 +251,7 @@ This will never be warned about when unused.
=cut
sub set_arch_substvars {
- my ($self) = @_;
+ my $self = shift;
my $attr = SUBSTVAR_ATTR_USED | SUBSTVAR_ATTR_AUTO;
diff --git a/scripts/Dpkg/Vendor/Default.pm b/scripts/Dpkg/Vendor/Default.pm
index 9cb082ab4..5c8a06fd5 100644
--- a/scripts/Dpkg/Vendor/Default.pm
+++ b/scripts/Dpkg/Vendor/Default.pm
@@ -56,7 +56,7 @@ if they don't need any specific initialization at object creation time.
=cut
sub new {
- my ($this) = @_;
+ my $this = shift;
my $class = ref($this) || $this;
my $self = {};
bless $self, $class;
diff --git a/scripts/Dpkg/Vendor/Ubuntu.pm b/scripts/Dpkg/Vendor/Ubuntu.pm
index fffdab280..c6dff77ac 100644
--- a/scripts/Dpkg/Vendor/Ubuntu.pm
+++ b/scripts/Dpkg/Vendor/Ubuntu.pm
@@ -166,7 +166,7 @@ numbers in an array reference.
=cut
sub find_launchpad_closes {
- my ($changes) = @_;
+ my $changes = shift;
my %closes;
while ($changes &&
diff --git a/scripts/Dpkg/Version.pm b/scripts/Dpkg/Version.pm
index 956b4e840..544c939ff 100644
--- a/scripts/Dpkg/Version.pm
+++ b/scripts/Dpkg/Version.pm
@@ -121,7 +121,7 @@ Returns true if the version is valid, false otherwise.
=cut
sub is_valid {
- my ($self) = @_;
+ my $self = shift;
return scalar version_check($self);
}
@@ -313,7 +313,7 @@ of the character is used to sort between characters.
=cut
sub _version_order {
- my ($x) = @_;
+ my $x = shift;
if ($x eq '~') {
return -1;