Skip to content

Commit

Permalink
PERL-667 Add and pass minimal Perl::Critic release tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xdg committed Sep 28, 2016
1 parent 56a972c commit 648e932
Show file tree
Hide file tree
Showing 80 changed files with 192 additions and 7 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

{{ $NEXT }}

[~ Internal changes ~]

- PERL-667 Add and pass Perl::Critic tests before release

v1.5.0 2016-09-19 15:26:09-07:00 America/Los_Angeles (TRIAL RELEASE)

[*** Deprecations ***]
Expand Down
2 changes: 1 addition & 1 deletion dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ max_target_perl = 5.008001
;also_private = qr/^[A-Z_]+$/

; check Perl::Critic
;[Test::Perl::Critic]
[Test::Perl::Critic]

;[Test::LocalBrew]
;brews = perl-5.10.1
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/BSON.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::BSON;


Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/BSON/Binary.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::BSON::Binary;
# ABSTRACT: MongoDB binary type

Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/BSON/Regexp.pm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use strict;
use warnings;
package MongoDB::BSON::Regexp;
# ABSTRACT: Regular expression type

Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/BSON/_EncodedDoc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::BSON::_EncodedDoc;

# Wrapper for pre-encoded BSON documents, with optional metadata
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/BulkWrite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::BulkWrite;

# ABSTRACT: MongoDB bulk write interface
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/BulkWriteResult.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::BulkWriteResult;

# ABSTRACT: MongoDB bulk write result document
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/BulkWriteView.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::BulkWriteView;

# ABSTRACT: Bulk write operations against a query document
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Code.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Code;


Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Collection.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Collection;


Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/CommandResult.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::CommandResult;

# ABSTRACT: MongoDB generic command result document
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Cursor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Cursor;


Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/DBRef.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::DBRef;

# ABSTRACT: A MongoDB database reference
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Database.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Database;


Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/DeleteResult.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::DeleteResult;

# ABSTRACT: MongoDB deletion result object
Expand Down
4 changes: 3 additions & 1 deletion lib/MongoDB/GridFS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

use strict;
use warnings;
package MongoDB::GridFS;

# ABSTRACT: A file storage abstraction (DEPRECATED)
Expand Down Expand Up @@ -245,7 +247,7 @@ sub find_one {
$criteria ||= {};

my $file = $self->files->find_one($criteria, $fields);
return undef unless $file;
return undef unless $file; ## no critic
return MongoDB::GridFS::File->new({_grid => $self,info => $file});
}

Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/GridFS/File.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::GridFS::File;


Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/GridFSBucket.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

use strict;
use warnings;
package MongoDB::GridFSBucket;

# ABSTRACT: A file storage abstraction
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/GridFSBucket/DownloadStream.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

use strict;
use warnings;
package MongoDB::GridFSBucket::DownloadStream;

# ABSTRACT: File handle abstraction for downloading
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/GridFSBucket/UploadStream.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

use strict;
use warnings;
package MongoDB::GridFSBucket::UploadStream;

# ABSTRACT: File handle abstraction for uploading
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/IndexView.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::IndexView;

# ABSTRACT: Index management for a collection
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/InsertManyResult.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::InsertManyResult;

# ABSTRACT: MongoDB single insert result object
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/InsertOneResult.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::InsertOneResult;

# ABSTRACT: MongoDB single insert result object
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/MongoClient.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::MongoClient;

# ABSTRACT: A connection to a MongoDB server or multi-server deployment
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/OID.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::OID;

# ABSTRACT: A Mongo Object ID
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_Aggregate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_Aggregate;

# Encapsulate aggregate operation; return MongoDB::QueryResult
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_BatchInsert.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_BatchInsert;

# Encapsulate a multi-document insert operation; returns a
Expand Down
4 changes: 3 additions & 1 deletion lib/MongoDB/Op/_BulkWrite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_BulkWrite;

# Encapsulate a multi-document multi-operation write; returns a
Expand Down Expand Up @@ -380,7 +382,7 @@ sub _execute_legacy_batch {
return $_->result;
}
die $_ unless $w_0 && /exceeds maximum size/;
return undef;
return undef; ## no critic: this makes op_result undef
};

my $gle_result =
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_Command.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_Command;

# Encapsulate running a command and returning a MongoDB::CommandResult
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_Count.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_Count;

# Encapsulate code path for count commands
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_CreateIndexes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_CreateIndexes;

# Encapsulate index creation operations; returns a MongoDB::CommandResult
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_Delete.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_Delete;

# Encapsulate a delete operation; returns a MongoDB::DeleteResult
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_Distinct.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_Distinct;

# Encapsulate distinct operation; return MongoDB::QueryResult
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_DropCollection.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_DropCollection;

# Implements a collection drop; returns a MongoDB::CommandResult
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_DropDatabase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_DropDatabase;

# Implements a database drop; returns a MongoDB::CommandResult
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_DropIndexes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_DropIndexes;

# Implements index drops; returns a MongoDB::CommandResult
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_Explain.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_Explain;

# Encapsulate code path for explain commands/queries
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_FSyncUnlock.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_FSyncUnlock;

# Encapsulate collection list operations; returns arrayref of collection
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_FindAndDelete.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_FindAndDelete;

# Encapsulate find_and_delete operation; atomically delete and return doc
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_FindAndUpdate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_FindAndUpdate;

# Encapsulate find_and_update operation; atomically update and return doc
Expand Down
2 changes: 2 additions & 0 deletions lib/MongoDB/Op/_GetMore.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
#

use strict;
use warnings;
package MongoDB::Op::_GetMore;

# Encapsulate a cursor fetch operation; returns raw results object
Expand Down
Loading

0 comments on commit 648e932

Please sign in to comment.