[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.11-110-ga819d99



The following commit has been merged in the master branch:
commit a819d997f6f3e22283d750c674027ef6c79925b0
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Jan 27 12:59:00 2013 +0100

    lib/*: Remove Exporter as "base" class
    
    Lintian's use of "Exporter" is simply to obtain the "import" function.
    Since Perl 5.8.3 (Exporter 5.57), this can be achieved by a simple:
    
      use Exporter qw(import);
    
    In Lintian::Lab and Lintian::Lab::Entry, the export is completely
    removed (only an "internal" constant were exportable).
    
    (Included some unrelated "re-ordering" of use-statements for affected
    modules.)
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/lib/Lintian/Architecture.pm b/lib/Lintian/Architecture.pm
index 6078727..517591a 100644
--- a/lib/Lintian/Architecture.pm
+++ b/lib/Lintian/Architecture.pm
@@ -21,9 +21,10 @@ package Lintian::Architecture;
 use strict;
 use warnings;
 
+use Exporter qw(import);
+
 use Lintian::Data;
 
-use base 'Exporter';
 our (@EXPORT_OK, %EXPORT_TAGS);
 
 @EXPORT_OK = (qw(
diff --git a/lib/Lintian/Check.pm b/lib/Lintian/Check.pm
index 7c49467..9c2e406 100644
--- a/lib/Lintian/Check.pm
+++ b/lib/Lintian/Check.pm
@@ -23,14 +23,14 @@ package Lintian::Check;
 use strict;
 use warnings;
 
-use Exporter ();
+use Exporter qw(import);
 use Email::Valid;
+
 use Lintian::Data;
 use Lintian::Tags qw(tag);
 
 our $KNOWN_BOUNCE_ADDRESSES = Lintian::Data->new('fields/bounce-addresses');
 
-our @ISA    = qw(Exporter);
 our @EXPORT = qw(check_maintainer check_spelling check_spelling_picky
                  $known_shells_regex
 );
diff --git a/lib/Lintian/Command.pm b/lib/Lintian/Command.pm
index a63e043..a39297f 100644
--- a/lib/Lintian/Command.pm
+++ b/lib/Lintian/Command.pm
@@ -25,7 +25,7 @@ BEGIN {
     $ENV{'IPCRUNDEBUG'} = 'none';
 }
 
-use base qw(Exporter);
+use Exporter qw(import);
 our @EXPORT = ();
 our @EXPORT_OK = qw(spawn reap kill);
 
diff --git a/lib/Lintian/Internal/FrontendUtil.pm b/lib/Lintian/Internal/FrontendUtil.pm
index 72bcd66..0ece810 100644
--- a/lib/Lintian/Internal/FrontendUtil.pm
+++ b/lib/Lintian/Internal/FrontendUtil.pm
@@ -20,7 +20,7 @@ package Lintian::Internal::FrontendUtil;
 use strict;
 use warnings;
 
-use base qw(Exporter);
+use Exporter qw(import);
 
 use Dpkg::Vendor;
 
diff --git a/lib/Lintian/Lab.pm b/lib/Lintian/Lab.pm
index eb874b8..5bf2500 100644
--- a/lib/Lintian/Lab.pm
+++ b/lib/Lintian/Lab.pm
@@ -24,13 +24,11 @@ package Lintian::Lab;
 use strict;
 use warnings;
 
-use base qw(Class::Accessor Exporter);
+use base qw(Class::Accessor);
 
 use Carp qw(croak);
 use Cwd();
-
 use File::Temp qw(tempdir); # For temporary labs
-
 use Scalar::Util qw(blessed);
 
 
@@ -57,18 +55,6 @@ my %SUPPORTED_VIEWS = (
     'GROUP' => 1,
 );
 
-our (@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-
-BEGIN {
-    @EXPORT = ();
-    %EXPORT_TAGS = (
-        constants => [qw(LAB_FORMAT)],
-    );
-    @EXPORT_OK = (
-        @{ $EXPORT_TAGS{constants} }
-    );
-};
-
 use Lintian::Collect;
 use Lintian::Lab::Entry;
 use Lintian::Lab::Manifest;
diff --git a/lib/Lintian/Lab/Entry.pm b/lib/Lintian/Lab/Entry.pm
index 01acf69..11a1151 100644
--- a/lib/Lintian/Lab/Entry.pm
+++ b/lib/Lintian/Lab/Entry.pm
@@ -56,16 +56,15 @@ methods from L<Lintian::Lab>.
 
 =cut
 
-use base qw(Lintian::Processable Class::Accessor Exporter);
 
 use strict;
 use warnings;
 
-use Carp qw(croak);
-use File::Spec;
+use base qw(Lintian::Processable Class::Accessor);
 
+use Carp qw(croak);
 use Cwd();
-
+use File::Spec;
 use Scalar::Util qw(refaddr);
 
 use Lintian::Lab;
@@ -76,16 +75,6 @@ use Lintian::Util qw(delete_dir read_dpkg_control get_dsc_info);
 # presents the things "outside" the entry.
 use constant LAB_ENTRY_FORMAT => 1;
 
-our (@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-
-@EXPORT = ();
-%EXPORT_TAGS = (
-    constants => [qw(LAB_FORMAT_ENTRY)],
-);
-@EXPORT_OK = (
-    @{ $EXPORT_TAGS{constants} }
-);
-
 =item new_from_metadata (PKG_TYPE, METADATA, LAB, BASEDIR)
 
 Overrides same contructor in Lintian::Processable.
diff --git a/lib/Lintian/Output.pm b/lib/Lintian/Output.pm
index 571aaaa..e662f6f 100644
--- a/lib/Lintian/Output.pm
+++ b/lib/Lintian/Output.pm
@@ -22,7 +22,9 @@ use strict;
 use warnings;
 
 use v5.8.0; # for PerlIO
-use base qw(Exporter Class::Accessor);
+use base qw(Class::Accessor);
+
+use Exporter qw(import);
 
 # Force export as soon as possible, since some of the modules we load also
 # depend on us and the sequencing can cause things not to be exported
diff --git a/lib/Lintian/Relation.pm b/lib/Lintian/Relation.pm
index f9e2543..4d84a6c 100644
--- a/lib/Lintian/Relation.pm
+++ b/lib/Lintian/Relation.pm
@@ -22,15 +22,14 @@ package Lintian::Relation;
 use strict;
 use warnings;
 
-use Lintian::Relation::Version;
-
 use constant {
     VISIT_PRED_NAME => 0,
     VISIT_PRED_FULL => 1,
     VISIT_OR_CLAUSE_FULL => 3,
     VISIT_STOP_FIRST_MATCH => 4,
 };
-use base 'Exporter';
+
+use Exporter qw(import);
 our (@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
 @EXPORT = ();
 %EXPORT_TAGS = (
@@ -41,6 +40,8 @@ our (@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
     @{ $EXPORT_TAGS{constants} }
 );
 
+use Lintian::Relation::Version;
+
 =head1 NAME
 
 Lintian::Relation - Lintian operations on dependencies and relationships
diff --git a/lib/Lintian/Relation/Version.pm b/lib/Lintian/Relation/Version.pm
index bf0c566..4d82535 100644
--- a/lib/Lintian/Relation/Version.pm
+++ b/lib/Lintian/Relation/Version.pm
@@ -24,8 +24,8 @@ use strict;
 use warnings;
 
 use Carp qw(croak);
+use Exporter qw(import);
 
-use base 'Exporter';
 BEGIN {
     our @EXPORT = qw(versions_equal versions_lte versions_gte versions_lt
                      versions_gt versions_compare versions_comparator);
diff --git a/lib/Lintian/Tag/TextUtil.pm b/lib/Lintian/Tag/TextUtil.pm
index 058e010..2fc6db7 100644
--- a/lib/Lintian/Tag/TextUtil.pm
+++ b/lib/Lintian/Tag/TextUtil.pm
@@ -24,8 +24,7 @@ package Lintian::Tag::TextUtil;
 use strict;
 use warnings;
 
-use Exporter;
-our @ISA    = qw(Exporter);
+use Exporter qw(import);
 our @EXPORT = qw(split_paragraphs wrap_paragraphs dtml_to_html dtml_to_text);
 
 # requires wrap() function
diff --git a/lib/Lintian/Tags.pm b/lib/Lintian/Tags.pm
index 005a689..147139b 100644
--- a/lib/Lintian/Tags.pm
+++ b/lib/Lintian/Tags.pm
@@ -22,12 +22,13 @@ package Lintian::Tags;
 use strict;
 use warnings;
 
+use Exporter qw(import);
+
 use Lintian::Architecture qw(:all);
 use Lintian::Output;
 use Lintian::Tag::Override;
 use Lintian::Util qw(fail $PKGNAME_REGEX);
 
-use base 'Exporter';
 BEGIN {
     our @EXPORT = qw(tag);
 }
diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm
index a42f29b..870799e 100644
--- a/lib/Lintian/Util.pm
+++ b/lib/Lintian/Util.pm
@@ -25,7 +25,7 @@ use warnings;
 
 use Carp qw(croak);
 
-use base 'Exporter';
+use Exporter qw(import);
 
 use constant {
   DCTRL_DEBCONF_TEMPLATE => 1,

-- 
Debian package checker


Reply to: