48 |
} |
} |
49 |
|
|
50 |
sub config { |
sub config { |
51 |
my $self = shift; |
my ( $self, $key ) = @_; |
52 |
my $key = shift || ref($self); |
$key ||= ref($self); |
53 |
warn "## config $key" if $self->debug; |
warn "## config $key" if $self->debug; |
54 |
$self->load_config unless defined %config; |
$self->load_config unless defined %config; |
55 |
confess "$key doesn't exist in config" unless defined $config{ $key }; |
#confess "$key doesn't exist in config" unless defined $config{ $key }; |
56 |
|
return unless defined $config{ $key }; |
57 |
return $config{ $key }; |
return $config{ $key }; |
58 |
} |
} |
59 |
|
|