Peter Sergeant > Infobot-0.91_05 > Infobot::Config

Download:
Infobot-0.91_05.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

Infobot::Config - Read in a YAML config file

SYNOPSIS ^

  use Infobot::Config;
  
  my $object = Infobot::Config->new();
  $object->stash( config_file => '/tmp/whatever' );
  $object->init;
  
  print $object->stash( config )->{config values};

METHODS ^

init

Searches the stash for a value called config_file, and tries to load a YAML file found there, placing if in stash( 'config' ). Will cause a fatal error if it fails at any point.