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   88137 use strict;
  59         157  
  59         2165  
16 59     59   332 use warnings;
  59         132  
  59         2361  
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   482 use version;
  59         141  
  59         463  
23             our $VERSION = 'v2.2.1';
24              
25 59     59   6379 use Moo::Role;
  59         141  
  59         499  
26              
27 59         450 use MongoDB::_Types qw(
28             Stringish
29 59     59   21816 );
  59         194  
30              
31 59     59   32007 use namespace::clean;
  59         7455  
  59         492  
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;