Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit 7dc4888

Browse files
committed
minor: silence release test warnings
1 parent f810ce2 commit 7dc4888

File tree

3 files changed

+32
-37
lines changed

3 files changed

+32
-37
lines changed

dist.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ stopword = Deprecations
6868
stopword = FAILOVER
6969
stopword = GSSAPI
7070
stopword = GridFS
71+
stopword = keepalive
7172
stopword = LDAP
7273
stopword = MaxKey
7374
stopword = MiB
@@ -83,6 +84,7 @@ stopword = ReplicaSetNoPrimary
8384
stopword = ReplicaSetWithPrimary
8485
stopword = SASL
8586
stopword = Sharded
87+
stopword = TCP
8688
stopword = TLS
8789
stopword = Tailable
8890
stopword = UnknownTransactionCommitResult

lib/MongoDB/Role/_PrivateConstructor.pm

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,19 @@ use Moo::Role;
3030
# public one, which checks required/isa assertions. When disabled,
3131
# the private constructor blesses args directly to the class for speed.
3232
BEGIN {
33+
my $NO_ASSERT_CONSTRUCTOR = <<'HERE';
34+
my %done;
35+
sub _new {
36+
my $class = shift;
37+
undefer_sub($class->can(q{new})) and $done{$class}++
38+
unless $done{$class};
39+
return bless {@_}, $class
40+
}
41+
HERE
42+
3343
WITH_ASSERTS
3444
? eval 'sub _new { my $class = shift; $class->new(@_) }' ## no critic
35-
: eval '
36-
my %done;
37-
sub _new {
38-
my $class = shift;
39-
undefer_sub($class->can(q{new})) and $done{$class}++
40-
unless $done{$class};
41-
return bless {@_}, $class
42-
}'; ## no critic
45+
: eval $NO_ASSERT_CONSTRUCTOR; ## no critic
4346
}
4447

4548
1;

lib/MongoDB/_Protocol.pm

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,7 @@ use constant {
123123
P_SECTION_SEQUENCE_SIZE_LENGTH => length( pack P_SECTION_SEQUENCE_SIZE, 0 ),
124124
};
125125

126-
=method prepare_sections( $cmd )
127-
128-
Takes a command, returns sections ready for joining
129-
130-
=cut
126+
# Takes a command, returns sections ready for joining
131127

132128
sub prepare_sections {
133129
my ( $codec, $cmd ) = @_;
@@ -178,17 +174,15 @@ sub prepare_sections {
178174
}
179175
}
180176

181-
=method encode_section
182-
183-
MongoDB::_Protocol::encode_section( $codec, {
184-
type => 0, # 0 or 1
185-
identifier => undef, # optional in type 0
186-
documents => [ $cmd ] # must be an array of documents
187-
});
188-
189-
Takes a section hashref and encodes it for joining
190-
191-
=cut
177+
# encode_section
178+
#
179+
# MongoDB::_Protocol::encode_section( $codec, {
180+
# type => 0, # 0 or 1
181+
# identifier => undef, # optional in type 0
182+
# documents => [ $cmd ] # must be an array of documents
183+
# });
184+
#
185+
# Takes a section hashref and encodes it for joining
192186

193187
sub encode_section {
194188
my ( $codec, $section ) = @_;
@@ -216,13 +210,11 @@ sub encode_section {
216210
return $pl;
217211
}
218212

219-
=method decode_section
220-
221-
MongoDB::_Protocol::decode_section( $section )
222-
223-
Takes an encoded section and decodes it, exactly the opposite of encode_section.
224-
225-
=cut
213+
# decode_section
214+
#
215+
# MongoDB::_Protocol::decode_section( $section )
216+
#
217+
# Takes an encoded section and decodes it, exactly the opposite of encode_section.
226218

227219
sub decode_section {
228220
my ( $doc ) = @_;
@@ -265,12 +257,10 @@ sub decode_section {
265257
return $section;
266258
}
267259

268-
=method split_sections( $msg )
269-
270-
Splits sections based on their payload length header. Returns an array of
271-
sections in packed form
272-
273-
=cut
260+
# method split_sections( $msg )
261+
#
262+
# Splits sections based on their payload length header. Returns an array of
263+
# sections in packed form
274264

275265
sub split_sections {
276266
my $msg = shift;

0 commit comments

Comments
 (0)