Commit | Line | Data |
---|---|---|
249b9eb6 | 1 | use strict; |
2 | use warnings; | |
3 | use Test::More 'no_plan'; | |
4 | ||
5 | #bug report does not include a case where Log::Contextual is | |
6 | #brought in via 'use' | |
7 | ||
8 | #try to import a single log function but do not include any tags | |
9 | BEGIN { | |
10 | require Log::Contextual; | |
11 | Log::Contextual->import('log_info'); | |
12 | } | |
13 | ||
14 | eval { | |
15 | log_info { "test" }; | |
16 | }; | |
17 | like( | |
18 | $@, | |
19 | qr/^ no logger set! you can't try to log something without a logger!/, | |
20 | 'Got correct error' | |
21 | ); |