=head1 VERSION
-Version 0.01
+Version 0.02
=cut
-our $VERSION = '0.01';
+our $VERSION = '0.02';
=head1 SYNOPSIS
=head2 iterate_inputs
$config->iterate_inputs( sub {
- my $input = shift;
+ my ($input, $database, $database_config_hash) = @_;
# ... do something with input config hash
} );
foreach my $input (@inputs) {
$log->debug("iterating over input ", dump($input));
- $code_ref->($input);
+ $code_ref->($input, $database, $db_config);
}
}
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 12;
+use Test::More tests => 24;
use Test::Exception;
use blib;
cmp_ok(@inputs, '==', 2, "got 2 webpac inputs");
$config->iterate_inputs(sub {
- my $input = shift;
- diag "input = ",dump($input);
+ my ($input,$database,$db_config) = @_;
+ isa_ok($input, 'HASH', 'input');
+ ok($database, 'database');
+ isa_ok($db_config, 'HASH', 'database config');
});