
package MJD::Print;
use Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(load_conf $CONFIG);

$CONFIG = "/home/mjd/src/perl/lps/printd.conf";

sub load_conf {
  local (*CONF, $_);
  my $file = shift;
  open CONF, $file or die "Couldn't read config file $file: $!; aborting";
  my %C;
  while (<CONF>) {
    s/#.*//;
    next unless /\S/;
    chomp;
    my ($attr, $val) = split  /\s+/, $_, 2;
    $C{$attr} = $val;
  }

  %C;
}

1;

