Changeset 575


Ignore:
Timestamp:
Feb 15, 2011, 6:57:25 PM (10 years ago)
Author:
zerodeux
Message:

Added a way to set config parameters right from the constructor: this will be VERY useful for tests - see #21

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bearmail/lib/BearMail/Config.pm

    r573 r575  
    3636=head1 METHODS
    3737
    38 =head2 new
     38=head2 new (params...)
    3939
    4040The constructor C<new> creates and returns an empty C<BearMail::Config> object.
    41 You have to call its C<load> method next.
     41You must call its C<load> method next or explictly define a few parameters with
     42an hashref:
     43
     44    my $conf = BearMail::Config->new(
     45        backend => 'file',
     46        'template_path' => '/tmp'
     47    );
    4248
    4349=head2 load $filename
     
    4854If C<load> succeeds, you can use the C<param> method to access the parameter
    4955values.
     56
     57C<load> only creates or updates value for the parsed keys: it might be called
     58several times to overlay values already set via the constructor or via previous
     59calls from C<load>.
    5060
    5161=head2 param $key
Note: See TracChangeset for help on using the changeset viewer.