summaryrefslogtreecommitdiffstats
path: root/lib/App/BorgRestore
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App/BorgRestore')
-rw-r--r--lib/App/BorgRestore/Borg.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/App/BorgRestore/Borg.pm b/lib/App/BorgRestore/Borg.pm
index 426f809..ebedb7d 100644
--- a/lib/App/BorgRestore/Borg.pm
+++ b/lib/App/BorgRestore/Borg.pm
@@ -5,7 +5,17 @@ use strict;
use IPC::Run qw(run start);
+sub new {
+ my $class = shift;
+
+ my $self = {};
+ bless $self, $class;
+
+ return $self;
+}
+
sub borg_list {
+ my $self = shift;
my @archives;
run [qw(borg list)], '>', \my $output or die "borg list returned $?";
@@ -20,6 +30,7 @@ sub borg_list {
}
sub restore {
+ my $self = shift;
my $components_to_strip = shift;
my $archive_name = shift;
my $path = shift;
@@ -28,6 +39,7 @@ sub restore {
}
sub list_archive {
+ my $self = shift;
my $archive = shift;
my $fh = shift;