| 1 | package Message::MongoDB::Test; | ||||||||||
| 2 | 2 | $Message::MongoDB::Test::VERSION = '1.142810'; | |||||||||
| 3 | 2 | ▶ | use strict;use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use MongoDB; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use Test::More; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | =head2 test_db_name | ||||||||||
| 8 | =cut | ||||||||||
| 9 | 2 | ▶ | sub test_db_name { | ||||||||
|
Subroutine
test_db_name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 10 | 2 | return "perl_test_$$"; | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | =head2 test_collection_name | ||||||||||
| 14 | =cut | ||||||||||
| 15 | 1 | ▶ | sub test_collection_name { | ||||||||
|
Subroutine
test_collection_name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 16 | 1 | return "perl_test_collection_$$"; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | |||||||||||
| 20 | 1 | ▶ | END { | ||||||||
|
Subroutine
END: called CC=2 SCAR=7.2
| |||||||||||
| 21 | 1 | ▶ | if($main::mongo->{connection}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 1 | $main::mongo->{connection}->get_database(test_db_name())->drop; | |||||||||
| 23 | } | ||||||||||
| 24 | }; | ||||||||||
| 25 | 2 | 1; | |||||||||