summaryrefslogtreecommitdiffstats
path: root/lib/App
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-02-27 14:50:47 +0100
committerFlorian Pritz <bluewind@xinu.at>2017-02-27 14:50:47 +0100
commit6875a02e7475b8288c0044795c1b77adaf213ba9 (patch)
treef51b1ad324fb29c3cd9e62bf6e06ce7961e16243 /lib/App
parent4a3fc6e06f83a34c9ac219e31abbc6bae6cb8318 (diff)
downloadApp-BorgRestore-6875a02e7475b8288c0044795c1b77adaf213ba9.tar.gz
App-BorgRestore-6875a02e7475b8288c0044795c1b77adaf213ba9.tar.xz
Move debug() to main package
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App')
-rw-r--r--lib/App/BorgRestore.pm26
1 files changed, 21 insertions, 5 deletions
diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm
index 6e92c1c..746dffc 100644
--- a/lib/App/BorgRestore.pm
+++ b/lib/App/BorgRestore.pm
@@ -5,11 +5,7 @@ use warnings;
our $VERSION = "2.0.0";
-
-
-1;
-__END__
-
+=pod
=encoding utf-8
=head1 NAME
@@ -49,3 +45,23 @@ Florian Pritz E<lt>bluewind@xinu.atE<gt>
=cut
+sub new {
+ my $class = shift;
+ my $opts = shift;
+
+ my $self = {};
+ bless $self, $class;
+
+ $self->{opts} = $opts;
+
+ return $self;
+}
+
+sub debug {
+ my $self = shift;
+ say STDERR @_ if $self->{opts}->{debug};
+}
+
+
+1;
+__END__