Skip to content
Browse files

Test framework: export the Configurator for clients

  • Loading branch information...
1 parent 54970f9 commit 0eb1157b762efb19cbe0e3a70b2c5887867968d0 @dolmen committed Oct 23, 2010
Showing with 12 additions and 2 deletions.
  1. +12 −2 t/lib/Log/Dispatch/Config/Test.pm
View
14 t/lib/Log/Dispatch/Config/Test.pm
@@ -20,13 +20,16 @@ package t::lib::Log::Dispatch::Config::Test;
use Log::Dispatch::Config;
use t::lib::Log::Dispatch::Configurator::Static;
+my $_configurator;
+
+
sub import
{
my $exporter = shift;
my $tests = shift;
die "ARRAY expected" unless ref($tests) eq 'ARRAY';
warn "No tests" if $#{$tests} == -1;
- Log::Dispatch::Config->configure(t::lib::Log::Dispatch::Configurator::Static->new(
+ $_configurator = t::lib::Log::Dispatch::Configurator::Static->new(
format => undef,
dispatchers => {
test => {
@@ -37,7 +40,14 @@ sub import
],
},
},
- ));
+ );
+ Log::Dispatch::Config->configure($_configurator);
+}
+
+sub configurator
+{
+ #my $self = shift;
+ return $_configurator;
}
1;

0 comments on commit 0eb1157

Please sign in to comment.
Something went wrong with that request. Please try again.