6 use BaseLogger qw{:log with_logger set_logger};
7 use Test::More qw(no_plan);
9 my @levels = qw(lol wut zomg);
13 main->can("log_$_")->(sub { 'fiSMBoC' });
14 is($DumbLogger2::var, "[$_] fiSMBoC\n", "$_ works");
17 main->can("log_$_")->(sub { 'fiSMBoC: ' . $_[1] }, qw{foo bar baz});
18 is($DumbLogger2::var, "[$_] fiSMBoC: bar\n", "log_$_ works with input");
20 eq_array(\@vars, [qw{foo bar baz}]),
21 "log_$_ passes data through correctly"
24 my $val = main->can("logS_$_")->(sub { 'fiSMBoC: ' . $_[0] }, 'foo');
25 is($DumbLogger2::var, "[$_] fiSMBoC: foo\n", "logS_$_ works with input");
26 is($val, 'foo', "logS_$_ passes data through correctly");
30 ok(!eval { Log::Contextual->import; 1 }, 'Blank Log::Contextual import dies');