The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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.