LibreCat / Catmandu-Store-MongoDB

A searchable store backed by MongoDB
https://metacpan.org/pod/Catmandu::Store::MongoDB
4 stars 2 forks source link

deprecation warnings lead to failed installation #9

Closed nicolasfranck closed 7 years ago

nicolasfranck commented 7 years ago

I'm using perl 5.20 on a Fedora 21 system. Mongo version is 2.08.

I'm trying to install Catmandu::Store::DB version 0.0403 using cpanm, but I'm getting all kinds of "deprecation warnings":

cpanm (App::cpanminus) 1.7031 on perl 5.020001 built for x86_64-linux
Work directory is /home/njfranck/.cpanm/work/1481530748.7749
You have make /usr/bin/make
You have LWP 6.13
You have /usr/bin/tar: tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Catmandu::Store::MongoDB on cpanmetadb ...
--> Working on Catmandu::Store::MongoDB
Fetching http://www.cpan.org/authors/id/N/NI/NICS/Catmandu-Store-MongoDB-0.0403.tar.gz
-> OK
Unpacking Catmandu-Store-MongoDB-0.0403.tar.gz
Entering Catmandu-Store-MongoDB-0.0403
Checking configure dependencies from META.json
Checking if you have Module::Build 0.28 ... Yes (0.4210)
Configuring Catmandu-Store-MongoDB-0.0403
Running Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Catmandu-Store-MongoDB' version '0.0403'
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Module::Build 0.28 ... Yes (0.4210)
Checking if you have Test::Pod 0 ... Yes (1.51)
Checking if you have Moo 1.006000 ... Yes (2.002005)
Checking if you have Test::More 1.001003 ... Yes (1.001014)
Checking if you have Software::License 0.103010 ... Yes (0.103010)
Checking if you have Test::Exception 0.32 ... Yes (0.35)
Checking if you have Catmandu 0.9205 ... Yes (1.00)
Checking if you have JSON::MaybeXS 1.003005 ... Yes (1.003008)
Checking if you have namespace::clean 0.24 ... Yes (0.25)
Checking if you have Test::Warn 0 ... Yes (0.30)
Checking if you have MongoDB v1.0.0 ... Yes (v1.6.0)
Building and testing Catmandu-Store-MongoDB-0.0403
Building Catmandu-Store-MongoDB
t/00-load.t ............. ok
#
# *** DEPRECATION WARNING ***
#
# The 'save' method will be removed in a future major release.
# Use 'replace_one' with upsert instead.
#    MongoDB::Collection::save called at /home/njfranck/.cpanm/work/1481530748.7749/Catmandu-Store-MongoDB-0.0403/blib/lib/Catmandu/Store/MongoDB/Bag.pm line 139
#    Catmandu::Store::MongoDB::Bag::add called at /home/njfranck/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Catmandu/Addable.pm line 22
#    Catmandu::Addable::__ANON__ called at (eval 230) line 1
#    Catmandu::Store::MongoDB::Bag::__ANON__ called at (eval 240) line 6
#    Catmandu::Store::MongoDB::Bag::add called at t/01-store.t line 21
#
# *** DEPRECATION WARNING ***
#
# The 'update' method will be removed in a future major release.
# Use $_, $_ or 'replace_one' instead.
#    MongoDB::Collection::update called at /home/njfranck/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/MongoDB/Collection.pm line 1726
#    MongoDB::Collection::save called at /home/njfranck/.cpanm/work/1481530748.7749/Catmandu-Store-MongoDB-0.0403/blib/lib/Catmandu/Store/MongoDB/Bag.pm line 139
#    Catmandu::Store::MongoDB::Bag::add called at /home/njfranck/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Catmandu/Addable.pm line 22
#    Catmandu::Addable::__ANON__ called at (eval 230) line 1
#    Catmandu::Store::MongoDB::Bag::__ANON__ called at (eval 240) line 6
#    Catmandu::Store::MongoDB::Bag::add called at t/01-store.t line 21
#
# *** DEPRECATION WARNING ***
#
# The 'count' method will be removed in a future major release.
# Use the 'count' method from MongoDB::Collection instead.
#    MongoDB::Cursor::count called at /home/njfranck/.cpanm/work/1481530748.7749/Catmandu-Store-MongoDB-0.0403/blib/lib/Catmandu/Store/MongoDB/Bag.pm line 179
#    Catmandu::Store::MongoDB::Bag::search called at /home/njfranck/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Catmandu/Searchable.pm line 44
#    Catmandu::Searchable::__ANON__ called at (eval 248) line 1
#    Catmandu::Store::MongoDB::Bag::__ANON__ called at (eval 250) line 2
#    Catmandu::Store::MongoDB::Bag::search called at t/01-store.t line 37
#
# *** DEPRECATION WARNING ***
#
# The 'remove' method will be removed in a future major release.
# Use $_ or 'delete_one' instead.
#    MongoDB::Collection::remove called at /home/njfranck/.cpanm/work/1481530748.7749/Catmandu-Store-MongoDB-0.0403/blib/lib/Catmandu/Store/MongoDB/Bag.pm line 144
#    Catmandu::Store::MongoDB::Bag::delete called at (eval 242) line 6
#    Catmandu::Store::MongoDB::Bag::delete called at t/01-store.t line 39
#
# *** DEPRECATION WARNING ***
#
# The 'remove' method will be removed in a future major release.
# Use $_ or 'delete_one' instead.
#    MongoDB::Collection::remove called at /home/njfranck/.cpanm/work/1481530748.7749/Catmandu-Store-MongoDB-0.0403/blib/lib/Catmandu/Store/MongoDB/Bag.pm line 149
#    Catmandu::Store::MongoDB::Bag::delete_all called at /home/njfranck/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Catmandu/Bag.pm line 54
#    Catmandu::Bag::__ANON__ called at (eval 244) line 1
#    Catmandu::Store::MongoDB::Bag::__ANON__ called at (eval 246) line 2
#    Catmandu::Store::MongoDB::Bag::delete_all called at t/01-store.t line 43
t/01-store.t ............ ok

#   Failed test 'expecting to throw a MongoDB::SelectionError'
#   at t/02-connect.t line 24.
# expecting: MongoDB::SelectionError
# found: normal exit
# Looks like you failed 1 test of 5.
t/02-connect.t .......... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests 
t/03-deprecated.t ....... ok
t/release-pod-syntax.t .. skipped: these tests are for release candidate testing

Test Summary Report
-------------------
t/02-connect.t        (Wstat: 256 Tests: 5 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
Files=5, Tests=19,  3 wallclock secs ( 0.02 usr  0.00 sys +  2.57 cusr  0.12 csys =  2.71 CPU)
Result: FAIL
Failed 1/5 test programs. 1/19 subtests failed.
-> FAIL Installing Catmandu::Store::MongoDB failed. See /home/njfranck/.cpanm/work/1481530748.7749/build.log for details. Retry with --force to force install it.
nicolasfranck commented 7 years ago

When I reset the perl module MongoDB to version 1.2.3, it worked:

cpanm MongoDB@1.2.3 cpanm Catmandu::Store::MongoDB

nics commented 7 years ago

fixed in 0.06