]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
lib: Harmonize Exporter package usage
authorMatthias Paulmier <matthias.paulmier@etu.u-bordeaux.fr>
Fri, 22 Jun 2018 13:42:17 +0000 (15:42 +0200)
committerMatthias Paulmier <matthias.paulmier@etu.u-bordeaux.fr>
Fri, 22 Jun 2018 13:42:17 +0000 (15:42 +0200)
Now the modules don't inherit Exporter anymore.  We just get the import method
from it since it is the only method that interests us.

26 files changed:
lib/Automake/ChannelDefs.pm
lib/Automake/Channels.pm
lib/Automake/CondStack.pm
lib/Automake/Condition.pm
lib/Automake/ConfVars.pm
lib/Automake/Config.in
lib/Automake/Configure_ac.pm
lib/Automake/Errors.pm
lib/Automake/File.pm
lib/Automake/FileUtils.pm
lib/Automake/General.pm
lib/Automake/Getopt.pm
lib/Automake/Global.pm
lib/Automake/LangHandling.pm
lib/Automake/Location.pm
lib/Automake/Options.pm
lib/Automake/Requires.pm
lib/Automake/Rule.pm
lib/Automake/RuleDef.pm
lib/Automake/SilentRules.pm
lib/Automake/Utils.pm
lib/Automake/VarAppend.pm
lib/Automake/VarDef.pm
lib/Automake/Variable.pm
lib/Automake/Wrap.pm
lib/Automake/XFile.pm

index e4f7f4a20b8ae1d6318284693bf6ea2a81db6cb6..c757f17a988c099405b4476a5e94330898d07cc6 100644 (file)
@@ -57,11 +57,10 @@ shorthand function to output on specific channels.
 
 use 5.006;
 use strict;
-use Exporter;
+use Exporter 'import';
 
-use vars qw (@ISA @EXPORT);
+use vars qw (@EXPORT);
 
-@ISA = qw (Exporter);
 @EXPORT = qw (&prog_error &error &fatal &verb
              &switch_warning &parse_WARNINGS &parse_warnings);
 
index 9d17fe5c7104890b8d6db5f990b91e5663c6b091..c07a8f424109c220184978638db2d20787230653 100644 (file)
@@ -70,12 +70,11 @@ use 5.006;
 use strict;
 use Carp;
 
-use Exporter;
+use Exporter 'import';
 use File::Basename;
 
-use vars qw (@ISA @EXPORT %channels $me);
+use vars qw (@EXPORT %channels $me);
 
-@ISA = qw (Exporter);
 @EXPORT = qw ($exit_code $warnings_are_errors
              &reset_local_duplicates &reset_global_duplicates
              &register_channel &msg &exists_channel &channel_type
index 3617381915322ff961c7c1d6ddeced91eacc49b5..1040f474df2e88a3a75f2bb57b67c073d73a5eec 100644 (file)
@@ -22,11 +22,10 @@ use Automake::ChannelDefs;
 use Automake::Condition qw (TRUE FALSE);
 use Automake::Channels;
 use Automake::Global;
-use Exporter;
+use Exporter 'import';
 
-use vars qw (@ISA @EXPORT);
+use vars qw (@EXPORT);
 
-@ISA = qw (Exporter);
 @EXPORT = qw (@cond_stack &cond_stack_if &cond_stack_else &cond_stack_endif);
 
 
index c028c24feb6e4d6149b28bf3ec7889425d7ab8ac..ab88790e4a342bc7476312d94073b1f24e649520 100644 (file)
@@ -19,9 +19,10 @@ use 5.006;
 use strict;
 use Carp;
 
-require Exporter;
-use vars '@ISA', '@EXPORT_OK';
-@ISA = qw/Exporter/;
+use Exporter 'import';
+
+use vars qw (@EXPORT_OK);
+
 @EXPORT_OK = qw/TRUE FALSE reduce_and reduce_or/;
 
 =head1 NAME
index 006147e24b4ce43251c48c3c081efa71673cc16d..4a27184ddd9cf6f2d23beb17a8e8ec1e12d99dde 100644 (file)
@@ -28,11 +28,10 @@ use Automake::Location;
 use Automake::Utils;
 use Automake::VarDef;
 use Automake::Variable;
-use Exporter;
+use Exporter 'import';
 
-use vars qw (@ISA @EXPORT);
+use vars qw (@EXPORT);
 
-@ISA = qw (Exporter);
 @EXPORT = qw (%configure_vars %ignored_configure_vars $output_vars
     &define_standard_variables);
 
index 777fe3722761353d93e178a40671be6ab621cdcb..b006c8a759a1220f660877ed136c2991b51b2449 100644 (file)
@@ -20,9 +20,8 @@ package Automake::Config;
 use strict;
 use 5.006;
 
-require Exporter;
+use Exporter 'import';
 
-our @ISA = qw (Exporter);
 our @EXPORT = qw ($APIVERSION $PACKAGE $PACKAGE_BUGREPORT $VERSION
                   $RELEASE_YEAR $libdir $perl_threads);
 
index 18bfa5e031db186c955448fb642a8077f0d9fa1f..97bc0811726cb443acd50f1766e9df96f6d7c1e8 100644 (file)
@@ -25,11 +25,10 @@ use strict;
 
 use Automake::Channels;
 use Automake::ChannelDefs;
-use Exporter;
+use Exporter 'import';
 
-use vars qw (@ISA @EXPORT);
+use vars qw (@EXPORT);
 
-@ISA = qw (Exporter);
 @EXPORT = qw (&find_configure_ac &require_configure_ac);
 
 =head1 NAME
index 96ddae21c61c5016e434d0b30f10dac9a89b02ca..4bce87bf102aff45508f0c76948567837baa5559 100644 (file)
@@ -20,11 +20,9 @@ use 5.006;
 
 use Automake::Channels;
 use Automake::Global;
-use Exporter;
+use Exporter 'import';
 
-use vars '@ISA', '@EXPORT';
-
-@ISA = qw (Exporter);
+use vars qw (@EXPORT);
 
 @EXPORT = qw (err_am err_ac);
 
index 89cc4776eea6faef34a97ba1489031781ef342f2..a9ba70b21bb475893f55b66827bcdccb41253fb4 100644 (file)
@@ -30,11 +30,10 @@ use Automake::RuleDef;
 use Automake::Utils;
 use Automake::VarDef;
 use Automake::Variable;
-use Exporter;
+use Exporter 'import';
 
-use vars qw (@ISA @EXPORT);
+use vars qw (@EXPORT);
 
-@ISA = qw (Exporter);
 @EXPORT = qw (file_contents_internal file_contents);
 
 # ($COMMENT, $VARIABLES, $RULES)
index 43b66966a2ebe44b138c8d19439d8b7196e6249b..a6839ff554aff2ec375c9199672ba4f21eb37867 100644 (file)
@@ -39,13 +39,12 @@ use strict;
 
 use Automake::Channels;
 use Automake::ChannelDefs;
-use Exporter;
+use Exporter 'import';
 use File::stat;
 use IO::File;
 
-use vars qw (@ISA @EXPORT);
+use vars qw (@EXPORT);
 
-@ISA = qw (Exporter);
 @EXPORT = qw (&contents
              &find_file &mtime
              &update_file &up_to_date_p
index f9ec8c67f8fba742b755033fdd936c05f048df5b..3a3eda25518d0295cc2a8c3bcf70da983731774a 100644 (file)
@@ -18,12 +18,11 @@ package Automake::General;
 use 5.006;
 use strict;
 
-use Exporter;
+use Exporter 'import';
 use File::Basename;
 
-use vars qw (@ISA @EXPORT);
+use vars qw (@EXPORT);
 
-@ISA = qw (Exporter);
 @EXPORT = qw (&uniq &none $me);
 
 # Variable we share with the main package.  Be sure to have a single
index c6614f2cce4b60747ef88d3e20f826d7e97c6bda..b75981bda7c000d3d229275b08629869d6f9754c 100644 (file)
@@ -36,12 +36,12 @@ use warnings FATAL => 'all';
 use Carp qw/croak confess/;
 
 use Automake::ChannelDefs qw/fatal/;
-use Exporter ();
+use Exporter 'import';
 use Getopt::Long ();
 
-use vars qw (@ISA @EXPORT);
-@ISA = qw (Exporter);
-@EXPORT= qw/getopt/;
+use vars qw (@EXPORT);
+
+@EXPORT= qw (getopt);
 
 =item C<parse_options (%option)>
 
index 25a70360808cac314513cf97a0f8c9765f393f6b..f382aa35a7622b3befee126647c7a771e55c18b2 100644 (file)
@@ -18,11 +18,9 @@ package Automake::Global;
 use 5.006;
 use strict;
 
-use Exporter;
+use Exporter 'import';
 
-use vars qw (@ISA @EXPORT);
-
-@ISA = qw (Exporter);
+use vars qw (@EXPORT);
 
 @EXPORT = qw ($IGNORE_PATTERN $WHITE_PATTERN $COMMENT_PATTERN $RULE_PATTERN
     $ASSIGNMENT_PATTERN $GNITS_VERSION_PATTERN $IF_PATTERN $ELSE_PATTERN
index bfbbb003cd9d694d448ffe0b5c9c7a266ee90eb1..8d1a8bad732ff9e41dfd6e12828b38bf77b2ed6e 100644 (file)
@@ -28,12 +28,10 @@ use Automake::Utils;
 use Automake::Variable;
 use Automake::VarDef;
 use Automake::Wrap qw (makefile_wrap);
-use Exporter;
+use Exporter 'import';
 use File::Basename;
 
-use vars '@ISA', '@EXPORT';
-
-@ISA = qw (Exporter);
+use vars qw (@EXPORT);
 
 @EXPORT = qw (check_user_variables lang_sub_obj lang_header_rewrite
              lang_vala_rewrite lang_yacc_rewrite lang_yaccxx_rewrite
index 3d368ca9e59436072ee7d30c89b58f34bc3ee29b..93274a5348c5915533f6c82b0138f16f2ecee428 100644 (file)
@@ -17,11 +17,9 @@ package Automake::Location;
 
 use 5.006;
 
-use Exporter;
+use Exporter 'import';
 
-use vars qw (@ISA @EXPORT);
-
-@ISA = qw (Exporter);
+use vars qw (@EXPORT);
 
 @EXPORT = qw (INTERNAL);
 
index ce123d6293dc94d29d7a4b5daa6ccde43b0a9c98..21090295982edd13d90623b28c4f690a9c7484a0 100644 (file)
@@ -22,11 +22,10 @@ use Automake::ChannelDefs;
 use Automake::Channels;
 use Automake::Config;
 use Automake::Version;
-use Exporter;
+use Exporter 'import';
 
-use vars qw (@ISA @EXPORT);
+use vars qw (@EXPORT);
 
-@ISA = qw (Exporter);
 @EXPORT = qw (option global_option
               set_option set_global_option
               unset_option unset_global_option
index 8c88f2885e4e0697be9d6745e5589792385c588e..75c840d9a9d89bbfc3f35c6c1f7e094a900108fb 100644 (file)
@@ -28,11 +28,9 @@ use Automake::Utils;
 use Automake::Variable;
 use File::Basename;
 
-use Exporter;
+use Exporter 'import';
 
-use vars '@ISA', '@EXPORT';
-
-@ISA = qw (Exporter);
+use vars qw (@EXPORT);
 
 @EXPORT = qw (require_file require_file_with_macro
     require_libsource_with_macro require_queued_file_check_or_copy
index 7245bf2f1abce3279d0b49aef73608f4e90a9d62..411a415ce86f569837e3fdfd43199e90b00424ab 100644 (file)
@@ -26,16 +26,16 @@ use Automake::DisjConditions;
 use Automake::Item;
 use Automake::Options;
 use Automake::RuleDef;
-require Exporter;
-
-use vars '@ISA', '@EXPORT';
-@ISA = qw/Automake::Item Exporter/;
-@EXPORT = qw (reset register_suffix_rule next_in_suffix_chain
-             suffixes rules $KNOWN_EXTENSIONS_PATTERN
-             depend %dependencies %actions register_action
-             accept_extensions
-             reject_rule msg_rule msg_cond_rule err_rule err_cond_rule
-             rule rrule ruledef rruledef);
+use Exporter 'import';
+
+use vars qw (@ISA @EXPORT);
+
+@ISA = qw (Automake::Item);
+
+@EXPORT = qw (reset register_suffix_rule next_in_suffix_chain suffixes rules
+    $KNOWN_EXTENSIONS_PATTERN depend %dependencies %actions register_action
+    accept_extensions reject_rule msg_rule msg_cond_rule err_rule
+    err_cond_rule rule rrule ruledef rruledef);
 
 =head1 NAME
 
index 928db96919ca5785a656fc1b853531ce3ed073e2..ba3874a170cd49dfdffaebbc69391c486c265d54 100644 (file)
@@ -21,11 +21,11 @@ use Carp;
 
 use Automake::ChannelDefs;
 use Automake::ItemDef;
-require Exporter;
+use Exporter 'import';
 
-use vars '@ISA', '@EXPORT';
+use vars qw (@ISA @EXPORT);
 
-@ISA = qw/Automake::ItemDef Exporter/;
+@ISA = qw (Automake::ItemDef);
 @EXPORT = qw (&RULE_AUTOMAKE &RULE_USER);
 
 =head1 NAME
index ee4e945098063655bdb84e56a2ec8057089a73a3..c57ddb59928c828e2de1f9c30a24d188774608a0 100644 (file)
@@ -17,15 +17,12 @@ package Automake::SilentRules;
 
 use Automake::Utils;
 use Automake::Variable;
-use Exporter;
+use Exporter 'import';
 
-use vars '@ISA', '@EXPORT';
-
-@ISA = qw (Exporter);
+use vars qw (@EXPORT);
 
 @EXPORT = qw (verbose_flag verbose_nodep_flag silent_flag
-             define_verbose_texinfo define_verbose_libtool
-             handle_silent);
+    define_verbose_texinfo define_verbose_libtool handle_silent);
 
 # Silent rules handling functions.
 
index 61ff25563800bb09bc8afe2f0371314fe7b4df29..08e91e5f564533a040c527e52bc8baaceaf44729 100644 (file)
@@ -25,12 +25,10 @@ use Automake::XFile;
 use Automake::ChannelDefs;
 use Automake::Variable 'var';
 use Automake::Rule;
-use Exporter;
+use Exporter 'import';
 use File::Basename;
 
-use vars qw (@ISA @EXPORT);
-
-@ISA = qw (Exporter);
+use vars qw (@EXPORT);
 
 @EXPORT = qw ($config_aux_dir $am_config_aux_dir
     $config_aux_dir_set_in_configure_ac $seen_maint_mode $relative_dir
index 6c7b6e6810b7f745891afff8e11ce448a56f468b..80044af5bad86375a8bb177df31cefdd34256c75 100644 (file)
@@ -22,11 +22,11 @@ use Automake::Channels;
 use Automake::Condition qw (TRUE FALSE);
 use Automake::Item;
 use Automake::VarDef;
-use Exporter;
+use Exporter 'import';
 
-use vars '@ISA', '@EXPORT';
+use vars qw (@ISA @EXPORT);
 
-@ISA = qw (Automake::Item Exporter);
+@ISA = qw (Automake::Item);
 
 @EXPORT = qw (append_var_cur_cond first_assign_var am_check_definitions);
 
index d978b3189d2328e9f5b46db92abe36655e691042..dea31502900f26b8fc327148300f94dad6f24aca 100644 (file)
@@ -21,13 +21,13 @@ use Carp;
 
 use Automake::ChannelDefs;
 use Automake::ItemDef;
-require Exporter;
+use Exporter 'import';
 
-use vars '@ISA', '@EXPORT';
+use vars qw (@ISA @EXPORT);
 
-@ISA = qw/Automake::ItemDef Exporter/;
-@EXPORT = qw (&VAR_AUTOMAKE &VAR_CONFIGURE &VAR_MAKEFILE
-             &VAR_ASIS &VAR_PRETTY &VAR_SILENT &VAR_SORTED);
+@ISA = qw (Automake::ItemDef);
+@EXPORT = qw (&VAR_AUTOMAKE &VAR_CONFIGURE &VAR_MAKEFILE &VAR_ASIS &VAR_PRETTY
+    &VAR_SILENT &VAR_SORTED);
 
 =head1 NAME
 
index 7dc485dde95241ac0665dc8ef10e672a068e266b..a37091fdda45189431cda1aa0ed4bd6be58078c9 100644 (file)
@@ -33,11 +33,11 @@ use Automake::Location;
 use Automake::VarAppend;
 use Automake::VarDef;
 use Automake::Wrap 'makefile_wrap';
-require Exporter;
+use Exporter 'import';
 
 use vars '@ISA', '@EXPORT', '@EXPORT_OK';
 
-@ISA = qw/Automake::Item Exporter/;
+@ISA = qw (Automake::Item);
 @EXPORT = qw (err_var msg_var msg_cond_var reject_var
              var rvar vardef rvardef
              variables
index 34570ada2dd36b65662704f13e4033c2228f8147..62a76774470306228081d1bf960e729a37010f7e 100644 (file)
@@ -18,11 +18,10 @@ package Automake::Wrap;
 use 5.006;
 use strict;
 
-require Exporter;
+use Exporter 'import';
 
-use vars '@ISA', '@EXPORT_OK';
+use vars qw (@EXPORT_OK);
 
-@ISA = qw/Exporter/;
 @EXPORT_OK = qw/wrap makefile_wrap/;
 
 =head1 NAME
index 259235f5f8c63725d6d1e8f8598f096a470ac978..bf40a812dfeda369e0221d09bc44f92956dd4ef9 100644 (file)
@@ -78,13 +78,13 @@ use Automake::ChannelDefs;
 use Automake::Channels qw(msg);
 use Automake::FileUtils;
 require DynaLoader;
-require Exporter;
+use Exporter 'import';
 use File::Basename;
 use IO::File;
 
 use vars qw($VERSION @EXPORT @EXPORT_OK $AUTOLOAD @ISA);
 
-@ISA = qw(IO::File Exporter DynaLoader);
+@ISA = qw(IO::File DynaLoader);
 
 $VERSION = "1.2";