File Coverage

blib/lib/MongoDB/BSON/Binary.pm
Criterion Covered Total %
statement 18 20 90.0
branch n/a
condition n/a
subroutine 6 7 85.7
pod 0 1 0.0
total 24 28 85.7


line stmt bran cond sub pod time code
1             # Copyright 2012 - 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 1     1   2289 use strict;
  1         2  
  1         30  
16 1     1   6 use warnings;
  1         2  
  1         37  
17             package MongoDB::BSON::Binary;
18              
19             # ABSTRACT: (DEPRECATED) MongoDB binary type
20              
21 1     1   6 use version;
  1         2  
  1         6  
22             our $VERSION = 'v2.2.1';
23              
24 1     1   126 use Moo;
  1         2  
  1         6  
25             extends 'BSON::Bytes';
26              
27 1     1   362 use namespace::clean -except => 'meta';
  1         4  
  1         6  
28              
29             # Kept for backwards compatibilty
30             use constant {
31 1         219 SUBTYPE_GENERIC => 0,
32             SUBTYPE_FUNCTION => 1,
33             SUBTYPE_GENERIC_DEPRECATED => 2,
34             SUBTYPE_UUID_DEPRECATED => 3,
35             SUBTYPE_UUID => 4,
36             SUBTYPE_MD5 => 5,
37             SUBTYPE_USER_DEFINED => 128
38 1     1   309 };
  1         3  
39              
40             with $_ for qw(
41             MongoDB::Role::_DeprecationWarner
42             );
43              
44             sub BUILD {
45 0     0 0   my $self = shift;
46 0           $self->_warn_deprecated_class(__PACKAGE__, ["BSON::Bytes"], 0);
47             };
48              
49             1;
50              
51             __END__