package ISPMan::Config;

use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $Config);

require Exporter;

@ISA = qw(Exporter AutoLoader);
@EXPORT = qw();
$VERSION = '0.01';


sub new {

   my $proto = shift;
   my $class = ref($proto) || $proto;   
   
   
   my $confDir=shift || "/usr/pkg/etc/ispman/conf";
   unless ($Config){

      die "\n\nERROR: $confDir does not exists. \nDid you create the configuration directory?\n\n" unless (-e $confDir);
      die "\n\nERROR: $confDir is not a directory\n\n" unless (-d $confDir);
      die "\n\nERROR: Configuration file $confDir/ispman.conf not found\n\n" unless -e "$confDir/ispman.conf";
      do "$confDir/ispman.conf";
   }
   

   $Config=$ISPMan::Config;
   my $self=$Config;
   return bless $self, $class;

}
1;
__END__

