diff options
Diffstat (limited to 'SBO-Lib/lib/SBO/App.pm')
-rw-r--r-- | SBO-Lib/lib/SBO/App.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/SBO-Lib/lib/SBO/App.pm b/SBO-Lib/lib/SBO/App.pm index d8de5c6..d06c2f2 100644 --- a/SBO-Lib/lib/SBO/App.pm +++ b/SBO-Lib/lib/SBO/App.pm @@ -17,10 +17,17 @@ our $VERSION = '2.8.0'; sub new { my $class = shift; - my $self = $class->_parse_opts(@_); + my ($self, $res) = $class->_parse_opts(@_); $self->{fname} = basename( (caller(0))[1] ); - return bless $self, $class; + my $obj = bless $self, $class; + + if (! $res ) { + $obj->show_usage(); + exit 1; + } + + return $obj; } 1; |