line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Message::MongoDB::Test; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1052
|
use strict;use warnings; |
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
4
|
use MongoDB; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
5
|
1
|
|
|
1
|
|
4
|
use Test::More; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head2 test_db_name |
8
|
|
|
|
|
|
|
=cut |
9
|
|
|
|
|
|
|
sub test_db_name { |
10
|
1
|
|
|
1
|
1
|
7
|
return "perl_test_$$"; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head2 test_collection_name |
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
sub test_collection_name { |
16
|
1
|
|
|
1
|
1
|
7
|
return "perl_test_collection_$$"; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
END { |
21
|
1
|
50
|
|
1
|
|
2510
|
if($main::mongo->{connection}) { |
22
|
0
|
|
|
|
|
0
|
$main::mongo->{connection}->get_database(test_db_name())->drop; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
1; |