This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
commit 01abe8afb95f4bafb1f192fb3fe451a95cd2e3f8 Author: Guillem Jover <[email protected]> Date: Sun Feb 15 23:18:31 2015 +0100 perl: Rework use and exporter declarations Place 'use' strict and warnings first, then Exporter 'our' declarations, then Test module imports, then system module imports, then Dpkg module imports, then 'use' parent and overload pragmas, separated by a blank line for each block. Split each exported symbol declaration into its own line to ease modifications. --- dselect/methods/Dselect/Ftp.pm | 17 +++++++++++++---- scripts/Dpkg.pm | 17 +++++++++++++++-- scripts/Dpkg/Arch.pm | 32 ++++++++++++++++++++++---------- scripts/Dpkg/BuildProfiles.pm | 8 ++++++-- scripts/Dpkg/Changelog/Debian.pm | 3 ++- scripts/Dpkg/Changelog/Entry/Debian.pm | 15 ++++++++++----- scripts/Dpkg/Changelog/Parse.pm | 8 +++++--- scripts/Dpkg/Checksums.pm | 10 ++++++---- scripts/Dpkg/Compression.pm | 25 +++++++++++++++---------- scripts/Dpkg/Compression/FileHandle.pm | 6 +++--- scripts/Dpkg/Control.pm | 21 +++++++++++++++------ scripts/Dpkg/Control/Changelog.pm | 1 + scripts/Dpkg/Control/Fields.pm | 3 +-- scripts/Dpkg/Control/FieldsCore.pm | 29 ++++++++++++++++++++--------- scripts/Dpkg/Control/Types.pm | 16 +++++++++++++--- scripts/Dpkg/Deps.pm | 13 +++++++++---- scripts/Dpkg/Dist/Files.pm | 4 ++-- scripts/Dpkg/ErrorHandling.pm | 20 +++++++++++++++----- scripts/Dpkg/Exit.pm | 7 +++++-- scripts/Dpkg/File.pm | 9 ++++++--- scripts/Dpkg/Getopt.pm | 4 +++- scripts/Dpkg/Gettext.pm | 8 +++++++- scripts/Dpkg/IPC.pm | 11 +++++++---- scripts/Dpkg/Package.pm | 8 +++++--- scripts/Dpkg/Path.pm | 16 +++++++++++----- scripts/Dpkg/Shlibs.pm | 10 +++++++--- scripts/Dpkg/Shlibs/Cppfilt.pm | 11 +++++++---- scripts/Dpkg/Shlibs/Objdump.pm | 4 ++-- scripts/Dpkg/Shlibs/Symbol.pm | 3 ++- scripts/Dpkg/Source/Archive.pm | 10 +++++----- scripts/Dpkg/Source/Functions.pm | 10 +++++++--- scripts/Dpkg/Source/Package.pm | 19 ++++++++++--------- scripts/Dpkg/Source/Package/V1.pm | 12 ++++++------ scripts/Dpkg/Source/Package/V2.pm | 20 ++++++++++---------- scripts/Dpkg/Source/Package/V3/Bzr.pm | 4 ++-- scripts/Dpkg/Source/Package/V3/Custom.pm | 4 ++-- scripts/Dpkg/Source/Package/V3/Git.pm | 4 ++-- scripts/Dpkg/Source/Package/V3/Native.pm | 8 ++++---- scripts/Dpkg/Source/Package/V3/Quilt.pm | 8 ++++---- scripts/Dpkg/Source/Patch.pm | 10 +++++----- scripts/Dpkg/Source/Quilt.pm | 12 ++++++------ scripts/Dpkg/Substvars.pm | 6 +++--- scripts/Dpkg/Util.pm | 9 +++++++-- scripts/Dpkg/Vars.pm | 9 ++++++--- scripts/Dpkg/Vendor.pm | 14 ++++++++++---- scripts/Dpkg/Vendor/Debian.pm | 4 ++-- scripts/Dpkg/Version.pm | 26 ++++++++++++++++++-------- scripts/Test/Dpkg.pm | 4 +++- scripts/dpkg-distaddfile.pl | 1 + scripts/dpkg-genchanges.pl | 1 + scripts/dpkg-mergechangelogs.pl | 6 +++--- scripts/dpkg-source.pl | 8 ++++---- scripts/t/Dpkg_Control.t | 1 + scripts/t/Dpkg_Shlibs.t | 1 + 54 files changed, 358 insertions(+), 192 deletions(-) diff --git a/dselect/methods/Dselect/Ftp.pm b/dselect/methods/Dselect/Ftp.pm index 3a47129..a190520 100644 --- a/dselect/methods/Dselect/Ftp.pm +++ b/dselect/methods/Dselect/Ftp.pm @@ -16,16 +16,25 @@ use strict; use warnings; our $VERSION = '0.02'; +our @EXPORT = qw( + %CONFIG + yesno + nb + do_connect + do_mdtm + view_mirrors + add_site + edit_site + edit_config + read_config + store_config +); use Exporter qw(import); - use Carp; use Net::FTP; use Data::Dumper; -our @EXPORT = qw(%CONFIG yesno do_connect do_mdtm add_site edit_site - edit_config read_config store_config view_mirrors nb); - my %CONFIG; sub nb { diff --git a/scripts/Dpkg.pm b/scripts/Dpkg.pm index 4e84dfe..2ed60a0 100644 --- a/scripts/Dpkg.pm +++ b/scripts/Dpkg.pm @@ -30,10 +30,23 @@ use strict; use warnings; our $VERSION = '1.01'; +our @EXPORT_OK = qw( + $PROGNAME + $PROGVERSION + $CONFDIR + $ADMINDIR + $LIBDIR + $DATADIR +); +our @EXPORT = qw( + $version + $progname + $admindir + $dpkglibdir + $pkgdatadir +); use Exporter qw(import); -our @EXPORT_OK = qw($PROGNAME $PROGVERSION $CONFDIR $ADMINDIR $LIBDIR $DATADIR); -our @EXPORT = qw($version $progname $admindir $dpkglibdir $pkgdatadir); =head1 VARIABLES diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm index 9702bd0..c71c7a6 100644 --- a/scripts/Dpkg/Arch.pm +++ b/scripts/Dpkg/Arch.pm @@ -19,19 +19,31 @@ use strict; use warnings; our $VERSION = '0.01'; +our @EXPORT_OK = qw( + get_raw_build_arch + get_raw_host_arch + get_build_arch + get_host_arch + get_gcc_host_gnu_type + get_valid_arches + debarch_eq + debarch_is + debarch_is_wildcard + debarch_is_concerned + debarch_to_cpuattrs + debarch_to_gnutriplet + debarch_to_debtriplet + debarch_to_multiarch + debtriplet_to_debarch + debtriplet_to_gnutriplet + gnutriplet_to_debarch + gnutriplet_to_debtriplet + gnutriplet_to_multiarch +); use Exporter qw(import); -our @EXPORT_OK = qw(get_raw_build_arch get_raw_host_arch - get_build_arch get_host_arch get_gcc_host_gnu_type - get_valid_arches debarch_eq debarch_is debarch_is_wildcard - debarch_is_concerned - debarch_to_cpuattrs - debarch_to_gnutriplet gnutriplet_to_debarch - debtriplet_to_gnutriplet gnutriplet_to_debtriplet - debtriplet_to_debarch debarch_to_debtriplet - gnutriplet_to_multiarch debarch_to_multiarch); - use POSIX qw(:errno_h); + use Dpkg (); use Dpkg::Gettext; use Dpkg::ErrorHandling; diff --git a/scripts/Dpkg/BuildProfiles.pm b/scripts/Dpkg/BuildProfiles.pm index 25dde71..4d929c2 100644 --- a/scripts/Dpkg/BuildProfiles.pm +++ b/scripts/Dpkg/BuildProfiles.pm @@ -19,8 +19,12 @@ use strict; use warnings; our $VERSION = '1.00'; -our @EXPORT_OK = qw(get_build_profiles set_build_profiles parse_build_profiles - evaluate_restriction_formula); +our @EXPORT_OK = qw( + get_build_profiles + set_build_profiles + parse_build_profiles + evaluate_restriction_formula +); use Exporter qw(import); diff --git a/scripts/Dpkg/Changelog/Debian.pm b/scripts/Dpkg/Changelog/Debian.pm index 4058b03..c25c69a 100644 --- a/scripts/Dpkg/Changelog/Debian.pm +++ b/scripts/Dpkg/Changelog/Debian.pm @@ -49,9 +49,10 @@ our $VERSION = '1.00'; use Dpkg::Gettext; use Dpkg::File; use Dpkg::Changelog qw(:util); -use parent qw(Dpkg::Changelog); use Dpkg::Changelog::Entry::Debian qw(match_header match_trailer); +use parent qw(Dpkg::Changelog); + use constant { FIRST_HEADING => g_('first heading'), NEXT_OR_EOF => g_('next heading or eof'), diff --git a/scripts/Dpkg/Changelog/Entry/Debian.pm b/scripts/Dpkg/Changelog/Entry/Debian.pm index 01b0ae4..bae0fbe 100644 --- a/scripts/Dpkg/Changelog/Entry/Debian.pm +++ b/scripts/Dpkg/Changelog/Entry/Debian.pm @@ -20,20 +20,25 @@ use strict; use warnings; our $VERSION = '1.01'; +our @EXPORT_OK = qw( + $regex_header + $regex_trailer + match_header + match_trailer + find_closes +); use Exporter qw(import); -use Dpkg::Changelog::Entry; -use parent qw(Dpkg::Changelog::Entry); -our @EXPORT_OK = qw(match_header match_trailer find_closes - $regex_header $regex_trailer); - use Date::Parse; use Dpkg::Gettext; use Dpkg::Control::Fields; use Dpkg::Control::Changelog; +use Dpkg::Changelog::Entry; use Dpkg::Version; +use parent qw(Dpkg::Changelog::Entry); + =encoding utf8 =head1 NAME diff --git a/scripts/Dpkg/Changelog/Parse.pm b/scripts/Dpkg/Changelog/Parse.pm index e9595b0..f79bb6e 100644 --- a/scripts/Dpkg/Changelog/Parse.pm +++ b/scripts/Dpkg/Changelog/Parse.pm @@ -35,15 +35,17 @@ use strict; use warnings; our $VERSION = '1.00'; +our @EXPORT = qw( + changelog_parse +); + +use Exporter qw(import); use Dpkg (); use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Control::Changelog; -use Exporter qw(import); -our @EXPORT = qw(changelog_parse); - =over 4 =item my $fields = changelog_parse(%opt) diff --git a/scripts/Dpkg/Checksums.pm b/scripts/Dpkg/Checksums.pm index 55b6385..86f555f 100644 --- a/scripts/Dpkg/Checksums.pm +++ b/scripts/Dpkg/Checksums.pm @@ -21,17 +21,19 @@ use strict; use warnings; our $VERSION = '1.02'; +our @EXPORT = qw( + checksums_is_supported + checksums_get_list + checksums_get_property +); +use Exporter qw(import); use Carp; use Digest; use Dpkg::Gettext; use Dpkg::ErrorHandling; -use Exporter qw(import); -our @EXPORT = qw(checksums_get_list checksums_is_supported - checksums_get_property); - =encoding utf8 =head1 NAME diff --git a/scripts/Dpkg/Compression.pm b/scripts/Dpkg/Compression.pm index e4d6d91..702d12d 100644 --- a/scripts/Dpkg/Compression.pm +++ b/scripts/Dpkg/Compression.pm @@ -20,20 +20,25 @@ use strict; use warnings; our $VERSION = '1.02'; +our @EXPORT = qw( + $compression_re_file_ext + compression_is_supported + compression_get_list + compression_get_property + compression_guess_from_filename + compression_get_file_extension_regex + compression_get_default + compression_set_default + compression_get_default_level + compression_set_default_level + compression_is_valid_level +); + +use Exporter qw(import); use Dpkg::ErrorHandling; use Dpkg::Gettext; -use Exporter qw(import); -our @EXPORT = qw($compression_re_file_ext compression_get_list - compression_is_supported compression_get_property - compression_guess_from_filename - compression_get_file_extension_regex - compression_get_default compression_set_default - compression_get_default_level - compression_set_default_level - compression_is_valid_level); - =encoding utf8 =head1 NAME diff --git a/scripts/Dpkg/Compression/FileHandle.pm b/scripts/Dpkg/Compression/FileHandle.pm index 4ccd315..4ddd784 100644 --- a/scripts/Dpkg/Compression/FileHandle.pm +++ b/scripts/Dpkg/Compression/FileHandle.pm @@ -21,14 +21,14 @@ use warnings; our $VERSION = '1.01'; +use POSIX qw(:signal_h :sys_wait_h); +use Carp; + use Dpkg::Compression; use Dpkg::Compression::Process; use Dpkg::Gettext; use Dpkg::ErrorHandling; -use Carp; -use POSIX qw(:signal_h :sys_wait_h); - use parent qw(FileHandle Tie::Handle); # Useful reference to understand some kludges required to diff --git a/scripts/Dpkg/Control.pm b/scripts/Dpkg/Control.pm index 7b602b4..34350f2 100644 --- a/scripts/Dpkg/Control.pm +++ b/scripts/Dpkg/Control.pm @@ -19,6 +19,21 @@ use strict; use warnings; our $VERSION = '1.00'; +our @EXPORT = qw( + CTRL_UNKNOWN + CTRL_INFO_SRC + CTRL_INFO_PKG + CTRL_INDEX_SRC + CTRL_INDEX_PKG + CTRL_PKG_SRC + CTRL_PKG_DEB + CTRL_FILE_CHANGES + CTRL_FILE_VENDOR + CTRL_FILE_STATUS + CTRL_CHANGELOG +); + +use Exporter qw(import); use Dpkg::Gettext; use Dpkg::ErrorHandling; @@ -26,14 +41,8 @@ use Dpkg::Control::Types; use Dpkg::Control::Hash; use Dpkg::Control::Fields; -use Exporter qw(import); - use parent qw(Dpkg::Control::Hash); -our @EXPORT = qw(CTRL_UNKNOWN CTRL_INFO_SRC CTRL_INFO_PKG CTRL_INDEX_SRC - CTRL_INDEX_PKG CTRL_PKG_SRC CTRL_PKG_DEB CTRL_FILE_CHANGES - CTRL_FILE_VENDOR CTRL_FILE_STATUS CTRL_CHANGELOG); - =encoding utf8 =head1 NAME diff --git a/scripts/Dpkg/Control/Changelog.pm b/scripts/Dpkg/Control/Changelog.pm index 850bdc7..379cad0 100644 --- a/scripts/Dpkg/Control/Changelog.pm +++ b/scripts/Dpkg/Control/Changelog.pm @@ -21,6 +21,7 @@ use warnings; our $VERSION = '1.00'; use Dpkg::Control; + use parent qw(Dpkg::Control); =encoding utf8 diff --git a/scripts/Dpkg/Control/Fields.pm b/scripts/Dpkg/Control/Fields.pm index 6f2eee4..d3f9272 100644 --- a/scripts/Dpkg/Control/Fields.pm +++ b/scripts/Dpkg/Control/Fields.pm @@ -19,6 +19,7 @@ use strict; use warnings; our $VERSION = '1.00'; +our @EXPORT = @Dpkg::Control::FieldsCore::EXPORT; use Carp; use Exporter qw(import); @@ -26,8 +27,6 @@ use Exporter qw(import); use Dpkg::Control::FieldsCore; use Dpkg::Vendor qw(run_vendor_hook); -our @EXPORT = @Dpkg::Control::FieldsCore::EXPORT; - # Register vendor specifics fields foreach my $op (run_vendor_hook('register-custom-fields')) { next if not (defined $op and ref $op); # Skip when not implemented by vendor diff --git a/scripts/Dpkg/Control/FieldsCore.pm b/scripts/Dpkg/Control/FieldsCore.pm index bf724be..1d0e564 100644 --- a/scripts/Dpkg/Control/FieldsCore.pm +++ b/scripts/Dpkg/Control/FieldsCore.pm @@ -19,22 +19,33 @@ use strict; use warnings; our $VERSION = '1.00'; +our @EXPORT = qw( + field_capitalize + field_is_official + field_is_allowed_in + field_transfer_single + field_transfer_all + field_list_src_dep + field_list_pkg_dep + field_get_dep_type + field_get_sep_type + field_ordered_list + field_register + field_insert_after + field_insert_before + FIELD_SEP_UNKNOWN + FIELD_SEP_SPACE + FIELD_SEP_COMMA + FIELD_SEP_LINE +); use Exporter qw(import); + use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Control::Types; use Dpkg::Checksums; -our @EXPORT = qw(field_capitalize field_is_official field_is_allowed_in - field_transfer_single field_transfer_all - field_list_src_dep field_list_pkg_dep field_get_dep_type - field_get_sep_type - field_ordered_list field_register - field_insert_after field_insert_before - FIELD_SEP_UNKNOWN FIELD_SEP_SPACE FIELD_SEP_COMMA - FIELD_SEP_LINE); - use constant { ALL_PKG => CTRL_INFO_PKG | CTRL_INDEX_PKG | CTRL_PKG_DEB | CTRL_FILE_STATUS, ALL_SRC => CTRL_INFO_SRC | CTRL_INDEX_SRC | CTRL_PKG_SRC, diff --git a/scripts/Dpkg/Control/Types.pm b/scripts/Dpkg/Control/Types.pm index bdcdd23..09e12d1 100644 --- a/scripts/Dpkg/Control/Types.pm +++ b/scripts/Dpkg/Control/Types.pm @@ -17,11 +17,21 @@ use strict; use warnings; our $VERSION = '0.01'; +our @EXPORT = qw( + CTRL_UNKNOWN + CTRL_INFO_SRC + CTRL_INFO_PKG + CTRL_INDEX_SRC + CTRL_INDEX_PKG + CTRL_PKG_SRC + CTRL_PKG_DEB + CTRL_FILE_CHANGES + CTRL_FILE_VENDOR + CTRL_FILE_STATUS + CTRL_CHANGELOG +); use Exporter qw(import); -our @EXPORT = qw(CTRL_UNKNOWN CTRL_INFO_SRC CTRL_INFO_PKG CTRL_INDEX_SRC - CTRL_INDEX_PKG CTRL_PKG_SRC CTRL_PKG_DEB CTRL_FILE_CHANGES - CTRL_FILE_VENDOR CTRL_FILE_STATUS CTRL_CHANGELOG); =encoding utf8 diff --git a/scripts/Dpkg/Deps.pm b/scripts/Dpkg/Deps.pm index 06ddb0c..947cf13 100644 --- a/scripts/Dpkg/Deps.pm +++ b/scripts/Dpkg/Deps.pm @@ -50,6 +50,15 @@ use strict; use warnings; our $VERSION = '1.05'; +our @EXPORT = qw( + deps_concat + deps_parse + deps_eval_implication + deps_iterate + deps_compare +); + +use Exporter qw(import); use Dpkg::Version; use Dpkg::Arch qw(get_host_arch get_build_arch); @@ -57,10 +66,6 @@ use Dpkg::BuildProfiles qw(get_build_profiles); use Dpkg::ErrorHandling; use Dpkg::Gettext; -use Exporter qw(import); -our @EXPORT = qw(deps_concat deps_parse deps_eval_implication - deps_iterate deps_compare); - =item deps_eval_implication($rel_p, $v_p, $rel_q, $v_q) ($rel_p, $v_p) and ($rel_q, $v_q) express two dependencies as (relation, diff --git a/scripts/Dpkg/Dist/Files.pm b/scripts/Dpkg/Dist/Files.pm index 6d2d838..c28c4eb 100644 --- a/scripts/Dpkg/Dist/Files.pm +++ b/scripts/Dpkg/Dist/Files.pm @@ -20,11 +20,11 @@ use warnings; our $VERSION = '0.01'; -use parent qw(Dpkg::Interface::Storable); - use Dpkg::Gettext; use Dpkg::ErrorHandling; +use parent qw(Dpkg::Interface::Storable); + sub new { my ($this, %opts) = @_; my $class = ref($this) || $this; diff --git a/scripts/Dpkg/ErrorHandling.pm b/scripts/Dpkg/ErrorHandling.pm index a97054b..ce01d5e 100644 --- a/scripts/Dpkg/ErrorHandling.pm +++ b/scripts/Dpkg/ErrorHandling.pm @@ -17,15 +17,25 @@ use strict; use warnings; our $VERSION = '0.02'; +our @EXPORT_OK = qw( + report +); +our @EXPORT = qw( + report_options + info + warning + error + errormsg + syserr + subprocerr + usageerr +); + +use Exporter qw(import); use Dpkg (); use Dpkg::Gettext; -use Exporter qw(import); -our @EXPORT = qw(report_options info warning error errormsg - syserr subprocerr usageerr); -our @EXPORT_OK = qw(report); - my $quiet_warnings = 0; my $info_fh = \*STDOUT; diff --git a/scripts/Dpkg/Exit.pm b/scripts/Dpkg/Exit.pm index 2c6b068..d4f901b 100644 --- a/scripts/Dpkg/Exit.pm +++ b/scripts/Dpkg/Exit.pm @@ -20,11 +20,14 @@ use strict; use warnings; our $VERSION = '1.01'; +our @EXPORT_OK = qw( + push_exit_handler + pop_exit_handler + run_exit_handlers +); use Exporter qw(import); -our @EXPORT_OK = qw(push_exit_handler pop_exit_handler run_exit_handlers); - # XXX: Backwards compatibility, stop exporting on VERSION 2.00. ## no critic (Variables::ProhibitPackageVars) our @handlers = (); diff --git a/scripts/Dpkg/File.pm b/scripts/Dpkg/File.pm index 4eadca9..c6ae326 100644 --- a/scripts/Dpkg/File.pm +++ b/scripts/Dpkg/File.pm @@ -20,14 +20,17 @@ use strict; use warnings; our $VERSION = '0.01'; +our @EXPORT = qw( + file_lock + file_slurp +); +use Exporter qw(import); use Fcntl qw(:flock); + use Dpkg::Gettext; use Dpkg::ErrorHandling; -use Exporter qw(import); -our @EXPORT = qw(file_lock file_slurp); - sub file_lock($$) { my ($fh, $filename) = @_; diff --git a/scripts/Dpkg/Getopt.pm b/scripts/Dpkg/Getopt.pm index 0c337de..4d677f3 100644 --- a/scripts/Dpkg/Getopt.pm +++ b/scripts/Dpkg/Getopt.pm @@ -19,7 +19,9 @@ use strict; use warnings; our $VERSION = '0.01'; -our @EXPORT = qw(normalize_options); +our @EXPORT = qw( + normalize_options +); use Exporter qw(import); diff --git a/scripts/Dpkg/Gettext.pm b/scripts/Dpkg/Gettext.pm index c5bf331..9f9a81d 100644 --- a/scripts/Dpkg/Gettext.pm +++ b/scripts/Dpkg/Gettext.pm @@ -27,7 +27,13 @@ use strict; use warnings; our $VERSION = '1.01'; -our @EXPORT = qw(g_ P_ textdomain ngettext _g); +our @EXPORT = qw( + textdomain + ngettext + g_ + P_ + _g +); use Exporter qw(import); diff --git a/scripts/Dpkg/IPC.pm b/scripts/Dpkg/IPC.pm index 1470832..818fa7c 100644 --- a/scripts/Dpkg/IPC.pm +++ b/scripts/Dpkg/IPC.pm @@ -21,13 +21,16 @@ use strict; use warnings; our $VERSION = '1.01'; - -use Dpkg::ErrorHandling; -use Dpkg::Gettext; +our @EXPORT = qw( + spawn + wait_child +); use Carp; use Exporter qw(import); -our @EXPORT = qw(spawn wait_child); + +use Dpkg::ErrorHandling; +use Dpkg::Gettext; =encoding utf8 diff --git a/scripts/Dpkg/Package.pm b/scripts/Dpkg/Package.pm index a276f66..e49c01b 100644 --- a/scripts/Dpkg/Package.pm +++ b/scripts/Dpkg/Package.pm @@ -20,11 +20,13 @@ use strict; use warnings; our $VERSION = '0.01'; - -use Dpkg::Gettext; +our @EXPORT = qw( + pkg_name_is_illegal +); use Exporter qw(import); -our @EXPORT = qw(pkg_name_is_illegal); + +use Dpkg::Gettext; sub pkg_name_is_illegal($) { my $name = shift // ''; diff --git a/scripts/Dpkg/Path.pm b/scripts/Dpkg/Path.pm index d6dda57..d97fdec 100644 --- a/scripts/Dpkg/Path.pm +++ b/scripts/Dpkg/Path.pm @@ -20,6 +20,17 @@ use strict; use warnings; our $VERSION = '1.04'; +our @EXPORT_OK = qw( + canonpath + resolve_symlink + check_files_are_the_same + find_command + find_build_file + get_control_path + get_pkg_root_dir + guess_pkg_root_dir + relative_to_pkg_root +); use Exporter qw(import); use File::Spec; @@ -28,11 +39,6 @@ use Cwd qw(realpath); use Dpkg::Arch qw(get_host_arch debarch_to_debtriplet); use Dpkg::IPC; -our @EXPORT_OK = qw(get_pkg_root_dir relative_to_pkg_root - guess_pkg_root_dir check_files_are_the_same - resolve_symlink canonpath find_command - get_control_path find_build_file); - =encoding utf8 =head1 NAME diff --git a/scripts/Dpkg/Shlibs.pm b/scripts/Dpkg/Shlibs.pm index 7de8b2e..3d4d10d 100644 --- a/scripts/Dpkg/Shlibs.pm +++ b/scripts/Dpkg/Shlibs.pm @@ -19,11 +19,15 @@ use strict; use warnings; our $VERSION = '0.02'; +our @EXPORT_OK = qw( + blank_library_paths + setup_library_paths + get_library_paths + add_library_dir + find_library +); use Exporter qw(import); -our @EXPORT_OK = qw(blank_library_paths add_library_dir get_library_paths - find_library setup_library_paths); - use File::Spec; use Dpkg::Gettext; diff --git a/scripts/Dpkg/Shlibs/Cppfilt.pm b/scripts/Dpkg/Shlibs/Cppfilt.pm index e2fe2a7..988836c 100644 --- a/scripts/Dpkg/Shlibs/Cppfilt.pm +++ b/scripts/Dpkg/Shlibs/Cppfilt.pm @@ -19,15 +19,18 @@ use strict; use warnings; our $VERSION = '0.01'; +our @EXPORT = qw( + cppfilt_demangle_cpp +); +our @EXPORT_OK = qw( + cppfilt_demangle +); use Exporter qw(import); +use IO::Handle; use Dpkg::ErrorHandling; use Dpkg::IPC; -use IO::Handle; - -our @EXPORT = qw(cppfilt_demangle_cpp); -our @EXPORT_OK = qw(cppfilt_demangle); # A hash of 'objects' referring to preforked c++filt processes for the distinct # demangling types. diff --git a/scripts/Dpkg/Shlibs/Objdump.pm b/scripts/Dpkg/Shlibs/Objdump.pm index b69a1ff..4be66a7 100644 --- a/scripts/Dpkg/Shlibs/Objdump.pm +++ b/scripts/Dpkg/Shlibs/Objdump.pm @@ -18,14 +18,14 @@ package Dpkg::Shlibs::Objdump; use strict; use warnings; +our $VERSION = '0.01'; + use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Path qw(find_command); use Dpkg::Arch qw(debarch_to_gnutriplet get_build_arch get_host_arch); use Dpkg::IPC; -our $VERSION = '0.01'; - # Decide which objdump to call our $OBJDUMP = 'objdump'; if (get_build_arch() ne get_host_arch()) { diff --git a/scripts/Dpkg/Shlibs/Symbol.pm b/scripts/Dpkg/Shlibs/Symbol.pm index 0c89657..56bf177 100644 --- a/scripts/Dpkg/Shlibs/Symbol.pm +++ b/scripts/Dpkg/Shlibs/Symbol.pm @@ -21,12 +21,13 @@ use warnings; our $VERSION = '0.01'; +use Storable (); + use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Util qw(:list); use Dpkg::Arch qw(debarch_is_concerned debarch_to_cpuattrs); use Dpkg::Version; -use Storable (); use Dpkg::Shlibs::Cppfilt; # Supported alias types in the order of matching preference diff --git a/scripts/Dpkg/Source/Archive.pm b/scripts/Dpkg/Source/Archive.pm index 1728f23..2af113a 100644 --- a/scripts/Dpkg/Source/Archive.pm +++ b/scripts/Dpkg/Source/Archive.pm @@ -20,17 +20,17 @@ use warnings; our $VERSION = '0.01'; -use Dpkg::Source::Functions qw(erasedir fixperms); -use Dpkg::Gettext; -use Dpkg::IPC; -use Dpkg::ErrorHandling; - use Carp; use File::Temp qw(tempdir); use File::Basename qw(basename); use File::Spec; use Cwd; +use Dpkg::Gettext; +use Dpkg::ErrorHandling; +use Dpkg::IPC; +use Dpkg::Source::Functions qw(erasedir fixperms); + use parent qw(Dpkg::Compression::FileHandle); sub create { diff --git a/scripts/Dpkg/Source/Functions.pm b/scripts/Dpkg/Source/Functions.pm index 70a1364..9d40e16 100644 --- a/scripts/Dpkg/Source/Functions.pm +++ b/scripts/Dpkg/Source/Functions.pm @@ -17,16 +17,20 @@ use strict; use warnings; our $VERSION = '0.01'; +our @EXPORT_OK = qw( + erasedir + fixperms + fs_time + is_binary +); use Exporter qw(import); -our @EXPORT_OK = qw(erasedir fixperms fs_time is_binary); +use POSIX qw(:errno_h); use Dpkg::ErrorHandling; use Dpkg::Gettext; use Dpkg::IPC; -use POSIX qw(:errno_h); - sub erasedir { my $dir = shift; if (not lstat($dir)) { diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm index 699497a..2e3440c 100644 --- a/scripts/Dpkg/Source/Package.pm +++ b/scripts/Dpkg/Source/Package.pm @@ -36,6 +36,16 @@ use strict; use warnings; our $VERSION = '1.01'; +our @EXPORT_OK = qw( + get_default_diff_ignore_regex + set_default_diff_ignore_regex + get_default_tar_ignore_pattern +); + +use Exporter qw(import); +use POSIX qw(:errno_h :sys_wait_h); +use Carp; +use File::Basename; use Dpkg::Gettext; use Dpkg::ErrorHandling; @@ -48,15 +58,6 @@ use Dpkg::Path qw(check_files_are_the_same find_command); use Dpkg::IPC; use Dpkg::Vendor qw(run_vendor_hook); -use Carp; -use POSIX qw(:errno_h :sys_wait_h); -use File::Basename; - -use Exporter qw(import); -our @EXPORT_OK = qw(get_default_diff_ignore_regex - set_default_diff_ignore_regex - get_default_tar_ignore_pattern); - my $diff_ignore_default_regex = ' # Ignore general backup files (?:^|/).*~$| diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm index d595acb..73cf821 100644 --- a/scripts/Dpkg/Source/Package/V1.pm +++ b/scripts/Dpkg/Source/Package/V1.pm @@ -20,7 +20,11 @@ use warnings; our $VERSION = '0.01'; -use parent qw(Dpkg::Source::Package); +use POSIX qw(:errno_h); +use Cwd; +use File::Basename; +use File::Temp qw(tempfile); +use File::Spec; use Dpkg (); use Dpkg::Gettext; @@ -32,11 +36,7 @@ use Dpkg::Exit qw(push_exit_handler pop_exit_handler); use Dpkg::Source::Functions qw(erasedir); use Dpkg::Source::Package::V3::Native; -use POSIX qw(:errno_h); -use Cwd; -use File::Basename; -use File::Temp qw(tempfile); -use File::Spec; +use parent qw(Dpkg::Source::Package); our $CURRENT_MINOR_VERSION = '0'; diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm index 0066060..822041a 100644 --- a/scripts/Dpkg/Source/Package/V2.pm +++ b/scripts/Dpkg/Source/Package/V2.pm @@ -21,7 +21,15 @@ use warnings; our $VERSION = '0.01'; -use parent qw(Dpkg::Source::Package); +use POSIX qw(:errno_h); +use List::Util qw(first); +use Cwd; +use File::Basename; +use File::Temp qw(tempfile tempdir); +use File::Path qw(make_path); +use File::Spec; +use File::Find; +use File::Copy; use Dpkg::Gettext; use Dpkg::ErrorHandling; @@ -36,15 +44,7 @@ use Dpkg::Vendor qw(run_vendor_hook); use Dpkg::Control; use Dpkg::Changelog::Parse; -use List::Util qw(first); -use POSIX qw(:errno_h); -use Cwd; -use File::Basename; -use File::Temp qw(tempfile tempdir); -use File::Path qw(make_path); -use File::Spec; -use File::Find; -use File::Copy; +use parent qw(Dpkg::Source::Package); our $CURRENT_MINOR_VERSION = '0'; diff --git a/scripts/Dpkg/Source/Package/V3/Bzr.pm b/scripts/Dpkg/Source/Package/V3/Bzr.pm index 9abe3c4..afcf730 100644 --- a/scripts/Dpkg/Source/Package/V3/Bzr.pm +++ b/scripts/Dpkg/Source/Package/V3/Bzr.pm @@ -26,8 +26,6 @@ use warnings; our $VERSION = '0.01'; -use parent qw(Dpkg::Source::Package); - use Cwd; use File::Basename; use File::Find; @@ -40,6 +38,8 @@ use Dpkg::Source::Archive; use Dpkg::Exit qw(push_exit_handler pop_exit_handler); use Dpkg::Source::Functions qw(erasedir); +use parent qw(Dpkg::Source::Package); + our $CURRENT_MINOR_VERSION = '0'; sub import { diff --git a/scripts/Dpkg/Source/Package/V3/Custom.pm b/scripts/Dpkg/Source/Package/V3/Custom.pm index 8a36d6d..08d1a79 100644 --- a/scripts/Dpkg/Source/Package/V3/Custom.pm +++ b/scripts/Dpkg/Source/Package/V3/Custom.pm @@ -20,11 +20,11 @@ use warnings; our $VERSION = '0.01'; -use parent qw(Dpkg::Source::Package); - use Dpkg::Gettext; use Dpkg::ErrorHandling; +use parent qw(Dpkg::Source::Package); + our $CURRENT_MINOR_VERSION = '0'; sub parse_cmdline_option { diff --git a/scripts/Dpkg/Source/Package/V3/Git.pm b/scripts/Dpkg/Source/Package/V3/Git.pm index d73676e..e0882c7 100644 --- a/scripts/Dpkg/Source/Package/V3/Git.pm +++ b/scripts/Dpkg/Source/Package/V3/Git.pm @@ -24,8 +24,6 @@ use warnings; our $VERSION = '0.02'; -use parent qw(Dpkg::Source::Package); - use Cwd qw(abs_path getcwd); use File::Basename; use File::Temp qw(tempdir); @@ -35,6 +33,8 @@ use Dpkg::ErrorHandling; use Dpkg::Exit qw(push_exit_handler pop_exit_handler); use Dpkg::Source::Functions qw(erasedir); +use parent qw(Dpkg::Source::Package); + our $CURRENT_MINOR_VERSION = '0'; # Remove variables from the environment that might cause git to do diff --git a/scripts/Dpkg/Source/Package/V3/Native.pm b/scripts/Dpkg/Source/Package/V3/Native.pm index 1915968..2b0fb22 100644 --- a/scripts/Dpkg/Source/Package/V3/Native.pm +++ b/scripts/Dpkg/Source/Package/V3/Native.pm @@ -20,7 +20,9 @@ use warnings; our $VERSION = '0.01'; -use parent qw(Dpkg::Source::Package); +use Cwd; +use File::Basename; +use File::Temp qw(tempfile); use Dpkg::Gettext; use Dpkg::ErrorHandling; @@ -30,9 +32,7 @@ use Dpkg::Version; use Dpkg::Source::Archive; use Dpkg::Source::Functions qw(erasedir); -use Cwd; -use File::Basename; -use File::Temp qw(tempfile); +use parent qw(Dpkg::Source::Package); our $CURRENT_MINOR_VERSION = '0'; diff --git a/scripts/Dpkg/Source/Package/V3/Quilt.pm b/scripts/Dpkg/Source/Package/V3/Quilt.pm index 4ac74d7..b2a69e9 100644 --- a/scripts/Dpkg/Source/Package/V3/Quilt.pm +++ b/scripts/Dpkg/Source/Package/V3/Quilt.pm @@ -20,8 +20,8 @@ use warnings; our $VERSION = '0.01'; -# Based on wig&pen implementation -use parent qw(Dpkg::Source::Package::V2); +use File::Spec; +use File::Copy; use Dpkg::Gettext; use Dpkg::ErrorHandling; @@ -32,8 +32,8 @@ use Dpkg::Source::Functions qw(erasedir fs_time); use Dpkg::Source::Quilt; use Dpkg::Exit; -use File::Spec; -use File::Copy; +# Based on wig&pen implementation +use parent qw(Dpkg::Source::Package::V2); our $CURRENT_MINOR_VERSION = '0'; diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm index 6297186..0904757 100644 --- a/scripts/Dpkg/Source/Patch.pm +++ b/scripts/Dpkg/Source/Patch.pm @@ -20,11 +20,6 @@ use warnings; our $VERSION = '0.01'; -use Dpkg::Gettext; -use Dpkg::IPC; -use Dpkg::ErrorHandling; -use Dpkg::Source::Functions qw(fs_time); - use POSIX qw(:errno_h :sys_wait_h); use File::Find; use File::Basename; @@ -34,6 +29,11 @@ use File::Compare; use Fcntl ':mode'; use Time::HiRes qw(stat); +use Dpkg::Gettext; +use Dpkg::ErrorHandling; +use Dpkg::IPC; +use Dpkg::Source::Functions qw(fs_time); + use parent qw(Dpkg::Compression::FileHandle); sub create { diff --git a/scripts/Dpkg/Source/Quilt.pm b/scripts/Dpkg/Source/Quilt.pm index 3a98c71..354d4e7 100644 --- a/scripts/Dpkg/Source/Quilt.pm +++ b/scripts/Dpkg/Source/Quilt.pm @@ -20,6 +20,12 @@ use warnings; our $VERSION = '0.02'; +use File::Spec; +use File::Copy; +use File::Find; +use File::Path qw(make_path); +use File::Basename; + use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Util qw(:list); @@ -27,12 +33,6 @@ use Dpkg::Source::Patch; use Dpkg::Source::Functions qw(erasedir fs_time); use Dpkg::Vendor qw(get_current_vendor); -use File::Spec; -use File::Copy; -use File::Find; -use File::Path qw(make_path); -use File::Basename; - sub new { my ($this, $dir, %opts) = @_; my $class = ref($this) || $this; diff --git a/scripts/Dpkg/Substvars.pm b/scripts/Dpkg/Substvars.pm index 3ac1a51..65c0d3c 100644 --- a/scripts/Dpkg/Substvars.pm +++ b/scripts/Dpkg/Substvars.pm @@ -21,14 +21,14 @@ use warnings; our $VERSION = '1.03'; +use POSIX qw(:errno_h); +use Carp; + use Dpkg (); use Dpkg::Arch qw(get_host_arch); use Dpkg::ErrorHandling; use Dpkg::Gettext; -use Carp; -use POSIX qw(:errno_h); - use parent qw(Dpkg::Interface::Storable); my $maxsubsts = 50; diff --git a/scripts/Dpkg/Util.pm b/scripts/Dpkg/Util.pm index 9d60855..5ac9192 100644 --- a/scripts/Dpkg/Util.pm +++ b/scripts/Dpkg/Util.pm @@ -19,10 +19,15 @@ use strict; use warnings; our $VERSION = '0.01'; +our @EXPORT_OK = qw( + any + none +); +our %EXPORT_TAGS = ( + list => [ qw(any none) ], +); use Exporter qw(import); -our @EXPORT_OK = qw(any none); -our %EXPORT_TAGS = (list => [ qw(any none) ]); # XXX: Ideally we would use List::MoreUtils, but that's not a core module, # so to avoid the additional dependency we'll make do with the following diff --git a/scripts/Dpkg/Vars.pm b/scripts/Dpkg/Vars.pm index 6c1d51b..2253e39 100644 --- a/scripts/Dpkg/Vars.pm +++ b/scripts/Dpkg/Vars.pm @@ -20,14 +20,17 @@ use strict; use warnings; our $VERSION = '0.03'; +our @EXPORT = qw( + get_source_package + set_source_package +); + +use Exporter qw(import); use Dpkg::ErrorHandling; use Dpkg::Gettext; use Dpkg::Package; -use Exporter qw(import); -our @EXPORT = qw(get_source_package set_source_package); - my $sourcepackage; sub get_source_package { diff --git a/scripts/Dpkg/Vendor.pm b/scripts/Dpkg/Vendor.pm index d619afe..3a1ef68 100644 --- a/scripts/Dpkg/Vendor.pm +++ b/scripts/Dpkg/Vendor.pm @@ -19,6 +19,16 @@ use strict; use warnings; our $VERSION = '1.01'; +our @EXPORT_OK = qw( + get_current_vendor + get_vendor_info + get_vendor_file + get_vendor_dir + get_vendor_object + run_vendor_hook +); + +use Exporter qw(import); use Dpkg (); use Dpkg::ErrorHandling; @@ -26,10 +36,6 @@ use Dpkg::Gettext; use Dpkg::BuildEnv; use Dpkg::Control::HashCore; -use Exporter qw(import); -our @EXPORT_OK = qw(get_vendor_info get_current_vendor get_vendor_file - get_vendor_dir get_vendor_object run_vendor_hook); - my $origins = "$Dpkg::CONFDIR/origins"; $origins = $ENV{DPKG_ORIGINS_DIR} if $ENV{DPKG_ORIGINS_DIR}; diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm index 2918f03..7bf45da 100644 --- a/scripts/Dpkg/Vendor/Debian.pm +++ b/scripts/Dpkg/Vendor/Debian.pm @@ -24,14 +24,14 @@ use warnings; our $VERSION = '0.01'; -use parent qw(Dpkg::Vendor::Default); - use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Control::Types; use Dpkg::BuildOptions; use Dpkg::Arch qw(get_host_arch debarch_to_debtriplet); +use parent qw(Dpkg::Vendor::Default); + =encoding utf8 =head1 NAME diff --git a/scripts/Dpkg/Version.pm b/scripts/Dpkg/Version.pm index 544c939..f6616ad 100644 --- a/scripts/Dpkg/Version.pm +++ b/scripts/Dpkg/Version.pm @@ -22,16 +22,26 @@ use strict; use warnings; our $VERSION = '1.01'; +our @EXPORT = qw( + version_compare + version_compare_relation + version_normalize_relation + version_compare_string + version_compare_part + version_split_digits + version_check + REL_LT + REL_LE + REL_EQ + REL_GE + REL_GT +); -use Dpkg::ErrorHandling; -use Dpkg::Gettext; - -use Carp; use Exporter qw(import); -our @EXPORT = qw(version_compare version_compare_relation - version_normalize_relation version_compare_string - version_compare_part version_split_digits version_check - REL_LT REL_LE REL_EQ REL_GE REL_GT); +use Carp; + +use Dpkg::Gettext; +use Dpkg::ErrorHandling; use constant { REL_LT => '<<', diff --git a/scripts/Test/Dpkg.pm b/scripts/Test/Dpkg.pm index 53efec5..38e3352 100644 --- a/scripts/Test/Dpkg.pm +++ b/scripts/Test/Dpkg.pm @@ -19,7 +19,9 @@ use strict; use warnings; our $VERSION = '0.00'; -our @EXPORT_OK = qw(all_perl_files); +our @EXPORT_OK = qw( + all_perl_files +); use Exporter qw(import); use File::Find; diff --git a/scripts/dpkg-distaddfile.pl b/scripts/dpkg-distaddfile.pl index a0694e0..2269a7c 100755 --- a/scripts/dpkg-distaddfile.pl +++ b/scripts/dpkg-distaddfile.pl @@ -22,6 +22,7 @@ use strict; use warnings; use POSIX qw(:errno_h :fcntl_h); + use Dpkg (); use Dpkg::Gettext; use Dpkg::ErrorHandling; diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 2887961..3df42e7 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -25,6 +25,7 @@ use warnings; use Carp; use Encode; use POSIX qw(:errno_h :locale_h); + use Dpkg (); use Dpkg::Gettext; use Dpkg::Util qw(:list); diff --git a/scripts/dpkg-mergechangelogs.pl b/scripts/dpkg-mergechangelogs.pl index 4db7066..eacab5f 100755 --- a/scripts/dpkg-mergechangelogs.pl +++ b/scripts/dpkg-mergechangelogs.pl @@ -19,15 +19,15 @@ use warnings; use strict; +use Scalar::Util qw(blessed); +use Getopt::Long qw(:config posix_default bundling no_ignorecase); + use Dpkg (); use Dpkg::Changelog::Debian; use Dpkg::ErrorHandling; use Dpkg::Gettext; use Dpkg::Version; -use Getopt::Long qw(:config posix_default bundling no_ignorecase); -use Scalar::Util qw(blessed); - textdomain('dpkg-dev'); sub merge_entries($$$); diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 48e8ebe..dbb5100 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -28,6 +28,10 @@ use strict; use warnings; +use Cwd; +use File::Basename; +use File::Spec; + use Dpkg (); use Dpkg::Gettext; use Dpkg::ErrorHandling; @@ -47,10 +51,6 @@ use Dpkg::Source::Package qw(get_default_diff_ignore_regex get_default_tar_ignore_pattern); use Dpkg::Vendor qw(run_vendor_hook); -use Cwd; -use File::Basename; -use File::Spec; - textdomain('dpkg-dev'); my $controlfile; diff --git a/scripts/t/Dpkg_Control.t b/scripts/t/Dpkg_Control.t index 76324da..a64e311 100644 --- a/scripts/t/Dpkg_Control.t +++ b/scripts/t/Dpkg_Control.t @@ -17,6 +17,7 @@ use strict; use warnings; use Test::More tests => 23; + use IO::String; BEGIN { diff --git a/scripts/t/Dpkg_Shlibs.t b/scripts/t/Dpkg_Shlibs.t index ede18f7..3f8afb7 100644 --- a/scripts/t/Dpkg_Shlibs.t +++ b/scripts/t/Dpkg_Shlibs.t @@ -17,6 +17,7 @@ use strict; use warnings; use Test::More tests => 122; + use Cwd; use IO::String; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/dpkg/dpkg.git -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

