aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2018-02-14 07:03:34 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2018-02-14 07:08:10 +0100
commit34508527cab3b61fca58aa9e3643a6c1da41c736 (patch)
treee40c42c7f6fc38b476ce65a9f52faf92aa763611
parent896b0ac9531b0b3bc2f08989a84eed6733e4328a (diff)
downloadsbotools-34508527cab3b61fca58aa9e3643a6c1da41c736.tar.xz
SBO::App: separate out new constructor
-rw-r--r--SBO-Lib/MANIFEST2
-rwxr-xr-xSBO-Lib/lib/SBO/App.pm24
-rwxr-xr-xSBO-Lib/lib/SBO/App/Remove.pm10
3 files changed, 27 insertions, 9 deletions
diff --git a/SBO-Lib/MANIFEST b/SBO-Lib/MANIFEST
index ed6efe2..2e48b3f 100644
--- a/SBO-Lib/MANIFEST
+++ b/SBO-Lib/MANIFEST
@@ -4,6 +4,8 @@ MANIFEST
README
t/SBO-Lib.t
t/versions.t
+lib/SBO/App.pm
+lib/SBO/App/Remove.pm
lib/SBO/Lib.pm
lib/SBO/Lib/Build.pm
lib/SBO/Lib/Download.pm
diff --git a/SBO-Lib/lib/SBO/App.pm b/SBO-Lib/lib/SBO/App.pm
new file mode 100755
index 0000000..7033d93
--- /dev/null
+++ b/SBO-Lib/lib/SBO/App.pm
@@ -0,0 +1,24 @@
+package SBO::App::Remove;
+
+# vim: ts=2:et
+#
+# authors: Luke Williams <xocel@iquidus.org>
+# Jacob Pipkin <j@dawnrazor.net>
+# Andreas Guldstrand <andreas.guldstrand@gmail.com>
+# license: WTFPL <http://sam.zoy.org/wtfpl/COPYING>
+
+use 5.16.0;
+use strict;
+use warnings FATAL => 'all';
+use File::Basename;
+
+sub new {
+ my $class = shift;
+
+ my $self = _parse_opts(@_);
+ $self->{fname} = basename( (caller(0))[1] );
+
+ return bless $self, $class;
+}
+
+1;
diff --git a/SBO-Lib/lib/SBO/App/Remove.pm b/SBO-Lib/lib/SBO/App/Remove.pm
index 5dc575c..a660035 100755
--- a/SBO-Lib/lib/SBO/App/Remove.pm
+++ b/SBO-Lib/lib/SBO/App/Remove.pm
@@ -12,16 +12,8 @@ use strict;
use warnings FATAL => 'all';
use SBO::Lib qw/ get_inst_names get_installed_packages get_sbo_location get_build_queue merge_queues get_requires get_readme_contents prompt show_version in /;
use Getopt::Long qw(GetOptionsFromArray :config bundling);
-use File::Basename;
-sub new {
- my $class = shift;
-
- my $self = _parse_opts(@_);
- $self->{fname} = basename( (caller(0))[1] );
-
- return bless $self, $class;
-}
+use parent 'SBO::App';
sub _parse_opts {
my @ARGS = @_;