aboutsummaryrefslogtreecommitdiff
path: root/lib
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 /lib
parentbfd076f64698d8985723547726cd6adb9b30eb67 (diff)
downloadfile-backup-fdea256ea75e0ca072915d7522564052a9f683f0.tar.gz
file-backup-fdea256ea75e0ca072915d7522564052a9f683f0.tar.bz2
Don't export specific backup interfaces by default.
Diffstat (limited to 'lib')
-rw-r--r--lib/File/Backup.pm14
1 files changed, 8 insertions, 6 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
@@ -16,10 +16,9 @@ our @EXPORT = qw(BACKUP_NONE
BACKUP_SIMPLE
BACKUP_NUMBERED
BACKUP_AUTO
- backup
- backup_simple
- backup_numbered
- backup_auto);
+ backup);
+
+our @EXPORT_OK = qw(backup_simple backup_numbered backup_auto);
use constant {
BACKUP_NONE => 0, # No backups at all (none,off)
@@ -203,23 +202,26 @@ above, B<BACKUP_AUTO> is assumed.
The function returns the name of the backup file it created (C<undef> if
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.
=head2 backup_simple
+ use File::Backup qw(backup_simple);
$backup_name = backup_simple($orig_name);
Creates simple backup.
=head2 backup_numbered
+ use File::Backup qw(backup_numbered);
$backup_name = backup_numbered($orig_name);
Creates numbered backup.
=head2 backup_auto
+ use File::Backup qw(backup_auto);
$backup_name = backup_auto($orig_name);
Creates numbered backup if any numbered backup version already exists for

Return to:

Send suggestions and report system problems to the System administrator.