Commit | Line | Data |
67d7bb36 |
1 | use strict; |
2 | use warnings; |
3 | use Test::More qw(no_plan); |
4 | |
5 | #original bug report https://rt.cpan.org/Public/Bug/Display.html?id=83267 |
6 | |
7 | #The following code from Module::Metadata exposed the bug |
8 | #BEGIN { |
9 | # if ($INC{'Log/Contextual.pm'}) { |
10 | # Log::Contextual->import('log_info'); |
11 | # } else { |
12 | # *log_info = sub (&) { warn $_[0]->() }; |
13 | # } |
14 | #} |
15 | |
16 | |
17 | #bug report does not include a case where Log::Contextual is |
18 | #brought in via 'use' |
19 | require Log::Contextual; |
20 | |
21 | #try to import a single log function but do not include any tags |
22 | eval { Log::Contextual->import('log_info') }; |
23 | ok(! $@, 'Imported log function correctly'); |