File Coverage

blib/lib/MongoDB/Role/_CollectionOp.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1             # Copyright 2016 - present MongoDB, Inc.
2             #
3             # Licensed under the Apache License, Version 2.0 (the "License");
4             # you may not use this file except in compliance with the License.
5             # You may obtain a copy of the License at
6             #
7             # http://www.apache.org/licenses/LICENSE-2.0
8             #
9             # Unless required by applicable law or agreed to in writing, software
10             # distributed under the License is distributed on an "AS IS" BASIS,
11             # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12             # See the License for the specific language governing permissions and
13             # limitations under the License.
14              
15 59     59   76676 use strict;
  59         134  
  59         1826  
16 59     59   290 use warnings;
  59         113  
  59         2112  
17             package MongoDB::Role::_CollectionOp;
18              
19             # MongoDB role for things that operate on collections and need
20             # collection name (and possibly full-name for legacy operation)
21              
22 59     59   273 use version;
  59         134  
  59         412  
23             our $VERSION = 'v2.2.2';
24              
25 59     59   4636 use Moo::Role;
  59         687  
  59         391  
26              
27 59         396 use MongoDB::_Types qw(
28             Stringish
29 59     59   18909 );
  59         126  
30              
31 59     59   29089 use namespace::clean;
  59         6875  
  59         464  
32              
33             has coll_name => (
34             is => 'ro',
35             required => 1,
36             isa => Stringish,
37             );
38              
39             has full_name => (
40             is => 'ro',
41             required => 1,
42             isa => Stringish,
43             );
44              
45             with $_ for qw(
46             MongoDB::Role::_DatabaseOp
47             );
48              
49             1;