make it more clear that "with_logger" will not override package_logger
[p5sagit/Log-Contextual.git] / t / rt83267-begin.t
CommitLineData
249b9eb6 1use Test::More qw(no_plan);
2
3BEGIN {
4 eval {
5 package NotMain;
6
7 use strict;
8 use warnings;
9 use Test::More;
10 use Log::Contextual::SimpleLogger;
11
12 use Log::Contextual qw(:log),
13 -default_logger =>
14 Log::Contextual::SimpleLogger->new({levels => [qw( )]});
15
16 eval {
17 log_info { "Yep" }
18 };
19 is($@, '', 'Invoked log function in package other than main');
20 };
21
22 is($@, '', 'non-main package subtest did not die');
23}