sbotools2

Maintenance fork of the original sbotools version 2
git clone git://git.server.ky/slackcoder/sbotools2
Log | Files | Refs | README

App.pm (572B)


      1 package SBO::App;
      2 
      3 # vim: ts=2:et
      4 #
      5 # authors: Luke Williams <xocel@iquidus.org>
      6 #          Jacob Pipkin <j@dawnrazor.net>
      7 #          Andreas Guldstrand <andreas.guldstrand@gmail.com>
      8 # maintainer: Slack Coder <slackcoder@server.ky>
      9 
     10 use 5.16.0;
     11 use strict;
     12 use warnings FATAL => 'all';
     13 use File::Basename;
     14 
     15 our $VERSION = '2.9.0';
     16 
     17 sub new {
     18   my $class = shift;
     19 
     20   my ($self, $res) = $class->_parse_opts(@_);
     21   $self->{fname} = basename( (caller(0))[1] );
     22 
     23   my $obj = bless $self, $class;
     24 
     25   if (! $res ) {
     26     $obj->show_usage();
     27     exit 1;
     28   }
     29 
     30   return $obj;
     31 }
     32 
     33 1;