aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-01-19 11:40:41 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-01-19 11:40:41 +0200
commitfdea256ea75e0ca072915d7522564052a9f683f0 (patch)
tree3067c9747649b21d85b5bb74e583b6777f17d37c
parentbfd076f64698d8985723547726cd6adb9b30eb67 (diff)
downloadfile-backup-fdea256ea75e0ca072915d7522564052a9f683f0.tar.gz
file-backup-fdea256ea75e0ca072915d7522564052a9f683f0.tar.bz2
Don't export specific backup interfaces by default.
-rw-r--r--lib/File/Backup.pm14
-rw-r--r--t/00simple.t2
-rw-r--r--t/01numbered.t2
-rw-r--r--t/02auto.t2
4 files changed, 11 insertions, 9 deletions
diff --git a/lib/File/Backup.pm b/lib/File/Backup.pm
index 2550bdf..7e1eb5f 100644
--- a/lib/File/Backup.pm
+++ b/lib/File/Backup.pm
@@ -18,6 +18,5 @@ our @EXPORT = qw(BACKUP_NONE
BACKUP_AUTO
- backup
- backup_simple
- backup_numbered
- backup_auto);
+ backup);
+
+our @EXPORT_OK = qw(backup_simple backup_numbered backup_auto);
@@ -205,4 +204,4 @@ called with B<BACKUP_NONE>). On error, it calls B<croak()>.
-The following functions are provided for explicitly using a specific backup
-naming scheme:
+The following functions are available for using a specific backup naming
+scheme. These functions must be exported explicitly.
@@ -210,2 +209,3 @@ naming scheme:
+ use File::Backup qw(backup_simple);
$backup_name = backup_simple($orig_name);
@@ -216,2 +216,3 @@ Creates simple backup.
+ use File::Backup qw(backup_numbered);
$backup_name = backup_numbered($orig_name);
@@ -222,2 +223,3 @@ Creates numbered backup.
+ use File::Backup qw(backup_auto);
$backup_name = backup_auto($orig_name);
diff --git a/t/00simple.t b/t/00simple.t
index d3444de..e6d3630 100644
--- a/t/00simple.t
+++ b/t/00simple.t
@@ -4,3 +4,3 @@ use strict;
use TestBackup;
-use File::Backup;
+use File::Backup qw(backup_simple);
diff --git a/t/01numbered.t b/t/01numbered.t
index a464684..26a89b6 100644
--- a/t/01numbered.t
+++ b/t/01numbered.t
@@ -4,3 +4,3 @@ use strict;
use TestBackup;
-use File::Backup;
+use File::Backup qw(backup_numbered);
diff --git a/t/02auto.t b/t/02auto.t
index 354e136..03f842a 100644
--- a/t/02auto.t
+++ b/t/02auto.t
@@ -4,3 +4,3 @@ use strict;
use TestBackup;
-use File::Backup;
+use File::Backup qw(backup_numbered backup_auto);

Return to:

Send suggestions and report system problems to the System administrator.