line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: Test::More note() logging engine for Dancer2 |
2
|
|
|
|
|
|
|
$Dancer2::Logger::Note::VERSION = '0.400000'; |
3
|
|
|
|
|
|
|
use Moo; |
4
|
80
|
|
|
80
|
|
37641
|
use Test::More; |
|
80
|
|
|
|
|
202
|
|
|
80
|
|
|
|
|
476
|
|
5
|
80
|
|
|
80
|
|
26946
|
|
|
80
|
|
|
|
|
112875
|
|
|
80
|
|
|
|
|
1276
|
|
6
|
|
|
|
|
|
|
with 'Dancer2::Core::Role::Logger'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my ( $self, $level, $message ) = @_; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Test::More::note( $self->format_message( $level => $message ) ); |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
1; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=pod |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=encoding UTF-8 |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Dancer2::Logger::Note - Test::More note() logging engine for Dancer2 |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 VERSION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
version 0.400000 |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
This logging engine uses L<Test::More>'s note() to output as TAP comments. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
This is very useful in case you're writing a test and want to have logging |
33
|
|
|
|
|
|
|
messages as part of your TAP. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
"Like C<diag()>, except the message will not be seen when the test is run in a |
36
|
|
|
|
|
|
|
harness. It will only be visible in the verbose TAP stream." -- Test::More. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 METHODS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 log |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Use Test::More's note() to output the log message. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 AUTHOR |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Dancer Core Developers |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
This software is copyright (c) 2022 by Alexis Sukrieh. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
53
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |