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 58     58   86167 use strict;
  58         148  
  58         1969  
16 58     58   353 use warnings;
  58         133  
  58         2330  
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 58     58   332 use version;
  58         156  
  58         446  
23             our $VERSION = 'v2.2.0';
24              
25 58     58   4919 use Moo::Role;
  58         141  
  58         414  
26              
27 58         447 use MongoDB::_Types qw(
28             Stringish
29 58     58   21279 );
  58         165  
30              
31 58     58   31607 use namespace::clean;
  58         7331  
  58         517  
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;