From 601c29e0e9364b9b4500e24f37118ed3cf7f6630 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Sun, 6 Dec 2015 04:14:07 +0100 Subject: Change from @EXPORT to @EXPORT_OK --- SBO-Lib/lib/SBO/Lib.pm | 10 +++++++--- sbocheck | 2 +- sboclean | 2 +- sboconfig | 2 +- sbofind | 2 +- sboinstall | 2 +- sboremove | 2 +- sbosnap | 2 +- sboupgrade | 2 +- t/test.t | 2 +- 10 files changed, 16 insertions(+), 12 deletions(-) diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index 083f532..fcd0d39 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -17,9 +17,9 @@ use warnings FATAL => 'all'; package SBO::Lib; our $VERSION = '1.9'; -require Exporter; -our @ISA = qw(Exporter); -our @EXPORT = qw( +use Exporter 'import'; + +our @EXPORT_OK = qw( script_error open_fh open_read @@ -60,6 +60,10 @@ our @EXPORT = qw( %config ); +our %EXPORT_TAGS = ( + all => \@EXPORT_OK, +); + use constant { _ERR_USAGE => 1, # usage errors _ERR_SCRIPT => 2, # errors with the scripts themselves diff --git a/sbocheck b/sbocheck index 95b20d5..98b20b0 100755 --- a/sbocheck +++ b/sbocheck @@ -12,7 +12,7 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; -use SBO::Lib; +use SBO::Lib qw/ update_tree get_available_updates script_error open_fh /; use Getopt::Long; use File::Basename; use List::Util 'max'; diff --git a/sboclean b/sboclean index d60c79a..c8491e4 100755 --- a/sboclean +++ b/sboclean @@ -12,7 +12,7 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; -use SBO::Lib; +use SBO::Lib qw/ usage_error script_error /; use File::Basename; use Getopt::Long qw(:config bundling); use File::Path qw(remove_tree); diff --git a/sboconfig b/sboconfig index 90e30b6..2278e39 100755 --- a/sboconfig +++ b/sboconfig @@ -12,7 +12,7 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; -use SBO::Lib; +use SBO::Lib qw/ usage_error script_error $tempdir open_fh %config $conf_dir $conf_file /; use File::Basename; use Getopt::Long; use File::Copy; diff --git a/sbofind b/sbofind index fa6e198..6c929bb 100755 --- a/sbofind +++ b/sbofind @@ -13,7 +13,7 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; -use SBO::Lib; +use SBO::Lib qw/ slackbuilds_or_fetch script_error open_read get_build_queue %config /; use File::Basename; use Getopt::Long qw(:config bundling); diff --git a/sboinstall b/sboinstall index 27680cb..ae69c63 100755 --- a/sboinstall +++ b/sboinstall @@ -12,7 +12,7 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; -use SBO::Lib; +use SBO::Lib qw/ usage_error slackbuilds_or_fetch get_build_queue merge_queues get_sbo_locations get_installed_packages get_inst_names get_installed_cpans get_sbo_location user_prompt process_sbos print_failures %config get_arch /; use Getopt::Long qw(:config bundling); use File::Basename; diff --git a/sboremove b/sboremove index 2a73eeb..d61531d 100755 --- a/sboremove +++ b/sboremove @@ -12,7 +12,7 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; -use SBO::Lib; +use SBO::Lib qw/ get_inst_names get_installed_packages get_sbo_location get_build_queue merge_queues get_requires get_readme_contents get_sbo_location /; use Getopt::Long qw(:config bundling); use File::Basename; diff --git a/sbosnap b/sbosnap index 3fecb02..5df047d 100755 --- a/sbosnap +++ b/sbosnap @@ -12,7 +12,7 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; -use SBO::Lib; +use SBO::Lib qw/ fetch_tree update_tree %config /; use File::Basename; use Getopt::Long; diff --git a/sboupgrade b/sboupgrade index 28bc66d..0d61ef4 100755 --- a/sboupgrade +++ b/sboupgrade @@ -12,7 +12,7 @@ use 5.16.0; use strict; use warnings FATAL => 'all'; -use SBO::Lib; +use SBO::Lib qw/ get_available_updates usage_error slackbuilds_or_fetch uniq get_sbo_location get_inst_names get_installed_packages get_build_queue get_sbo_locations merge_queues user_prompt process_sbos print_failures %config /; use Getopt::Long qw(:config bundling); use File::Basename; use File::Copy; diff --git a/t/test.t b/t/test.t index f2031e7..58d3237 100755 --- a/t/test.t +++ b/t/test.t @@ -8,7 +8,7 @@ use Test::More; use File::Copy; use Text::Diff; use lib "."; -use SBO::Lib; +use SBO::Lib qw/ :all /; chomp(my $pwd = `pwd`); my $sbo_home = "$pwd/sbo"; -- cgit v1.2.3