| 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 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 59 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | ▶ | use version; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | 59 | our $VERSION = 'v2.2.2'; | |
| 24 | |||
| 25 | 59 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | |||
| 27 | 59 | ▶ | use MongoDB::_Types qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 28 | Stringish | ||
| 29 | 59 | ); | |
| 30 | |||
| 31 | 59 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 32 | |||
| 33 | 59 | has coll_name => ( | |
| 34 | is => 'ro', | ||
| 35 | required => 1, | ||
| 36 | isa => Stringish, | ||
| 37 | ); | ||
| 38 | |||
| 39 | 59 | has full_name => ( | |
| 40 | is => 'ro', | ||
| 41 | required => 1, | ||
| 42 | isa => Stringish, | ||
| 43 | ); | ||
| 44 | |||
| 45 | 59 | with $_ for qw( | |
| 46 | MongoDB::Role::_DatabaseOp | ||
| 47 | ); | ||
| 48 | |||
| 49 | 59 | 1; | |