@@ -338,7 +338,7 @@ features
338
338
339
339
my $config = $config_processor->load( qw( dirs.yml db.json metrics/* ) );
340
340
341
- my $another_config = $config_processor->load(
341
+ $config = $config_processor->load(
342
342
qw( dirs.yml db.json redis.yml mongodb.json metrics/* ),
343
343
344
344
{ myapp => {
@@ -370,8 +370,10 @@ F<.yaml>, F<.jsn>, F<.json>.
370
370
dirs => [ qw( /etc/myapp /home/username/etc/myapp ) ],
371
371
);
372
372
373
- my $another_config_processor = Config::Processor->new(
374
- dirs => [ qw( /etc/myapp /home/username/myapp/etc ) ],
373
+ $config_processor = Config::Processor->new();
374
+
375
+ $config_processor = Config::Processor->new(
376
+ dirs => [ qw( /etc/myapp /home/username/etc/myapp ) ],
375
377
interpolate_variables => 0,
376
378
process_directives => 0,
377
379
);
@@ -380,7 +382,8 @@ F<.yaml>, F<.jsn>, F<.json>.
380
382
381
383
=item dirs => \@dirs
382
384
383
- List of directories, in which configuration processor will search files.
385
+ List of directories, in which configuration processor will search files. If
386
+ parameter not specified, current directory will be used.
384
387
385
388
=item interpolate_variables => $boolean
386
389
@@ -403,6 +406,8 @@ Configuration section can be a relative filename, a filename with wildcard
403
406
characters or a hash reference. Filenames with wildcard characters is processed
404
407
by C<CORE::glob > function and supports the same syntax.
405
408
409
+ my $config = $config_processor->load( qw( myapp.yml extras/* ), \%hard_config );
410
+
406
411
=head2 interpolate_variables( [ $boolean ] )
407
412
408
413
Enables or disables variable interpolation in configurations files.
0 commit comments