Hello community, here is the log from the commit of package perl-Mojo-Redis for openSUSE:Factory checked in at 2020-10-13 15:47:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mojo-Redis (Old) and /work/SRC/openSUSE:Factory/.perl-Mojo-Redis.new.3486 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojo-Redis" Tue Oct 13 15:47:09 2020 rev:4 rq:841494 version:3.25 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mojo-Redis/perl-Mojo-Redis.changes 2019-06-14 20:42:21.774396667 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Mojo-Redis.new.3486/perl-Mojo-Redis.changes 2020-10-13 15:47:48.397505673 +0200 @@ -1,0 +2,11 @@ +Sun Oct 4 03:19:11 UTC 2020 - Tina Müller <timueller+p...@suse.de> + +- updated to 3.25 + see /usr/share/doc/packages/perl-Mojo-Redis/Changes + + 3.25 2020-10-02T10:21:30+0900 + - Fix handling undef() in _process_...() methods #56 + - Fix some leaks in Mojo::Redis::PubSub + - Add Mojo::Redis::PubSub->notify_p() + +------------------------------------------------------------------- Old: ---- Mojo-Redis-3.24.tar.gz New: ---- Mojo-Redis-3.25.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojo-Redis.spec ++++++ --- /var/tmp/diff_new_pack.vXavO0/_old 2020-10-13 15:47:49.169506006 +0200 +++ /var/tmp/diff_new_pack.vXavO0/_new 2020-10-13 15:47:49.169506006 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Mojo-Redis # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,13 +17,13 @@ Name: perl-Mojo-Redis -Version: 3.24 +Version: 3.25 Release: 0 %define cpan_name Mojo-Redis Summary: Redis driver based on Mojo::IOLoop License: Artistic-2.0 Group: Development/Libraries/Perl -Url: https://metacpan.org/release/%{cpan_name} +URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/J/JH/JHTHORSEN/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch ++++++ Mojo-Redis-3.24.tar.gz -> Mojo-Redis-3.25.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/.github/workflows/ci-ubuntu.yml new/Mojo-Redis-3.25/.github/workflows/ci-ubuntu.yml --- old/Mojo-Redis-3.24/.github/workflows/ci-ubuntu.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/Mojo-Redis-3.25/.github/workflows/ci-ubuntu.yml 2020-08-11 01:59:06.000000000 +0200 @@ -0,0 +1,37 @@ +name: ci-ubuntu +on: [push, pull_request] +jobs: + perl: + runs-on: ubuntu-latest + services: + redis: + image: redis + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + strategy: + matrix: + perl-version: + - '5.16' + - '5.24' + - '5.30' + container: + image: perl:${{matrix.perl-version}} + steps: + - uses: actions/checkout@v2 + - name: perl -V + run: perl -V + - name: Fix ExtUtils::MakeMaker (for Perl 5.16 and 5.18) + run: cpanm -n App::cpanminus ExtUtils::MakeMaker + - name: Install dependencies + run: | + cpanm -n --installdeps . + cpanm -n Test::Pod Test::Pod::Coverage + - name: Run tests + run: prove -l t/*.t + env: + HARNESS_OPTIONS: j3 + TEST_ONLINE: redis://redis + TEST_POD: 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/.vstags new/Mojo-Redis-3.25/.vstags --- old/Mojo-Redis-3.24/.vstags 2019-04-09 04:16:28.000000000 +0200 +++ new/Mojo-Redis-3.25/.vstags 2019-08-08 23:20:36.000000000 +0200 @@ -12,19 +12,19 @@ DESTROY lib/Mojo/Redis/Database.pm 209;" s Mojo::Redis lib/Mojo/Redis.pm 1;" p Mojo::Redis::Cache lib/Mojo/Redis/Cache.pm 1;" p -Mojo::Redis::Cache::OFFLINE lib/Mojo/Redis/Cache.pm 10;" c -Mojo::Redis::Cache::_compute_p lib/Mojo/Redis/Cache.pm 48;" s -Mojo::Redis::Cache::_maybe_compute_p lib/Mojo/Redis/Cache.pm 64;" s -Mojo::Redis::Cache::_offline_connection lib/Mojo/Redis/Cache.pm 87;" s -Mojo::Redis::Cache::compute_p lib/Mojo/Redis/Cache.pm 24;" s -Mojo::Redis::Cache::memoize_p lib/Mojo/Redis/Cache.pm 39;" s +Mojo::Redis::Cache::OFFLINE lib/Mojo/Redis/Cache.pm 9;" c +Mojo::Redis::Cache::_compute_p lib/Mojo/Redis/Cache.pm 45;" s +Mojo::Redis::Cache::_maybe_compute_p lib/Mojo/Redis/Cache.pm 61;" s +Mojo::Redis::Cache::_offline_connection lib/Mojo/Redis/Cache.pm 84;" s +Mojo::Redis::Cache::compute_p lib/Mojo/Redis/Cache.pm 21;" s +Mojo::Redis::Cache::memoize_p lib/Mojo/Redis/Cache.pm 36;" s Mojo::Redis::Connection lib/Mojo/Redis/Connection.pm 1;" p Mojo::Redis::Connection::CONNECT_TIMEOUT lib/Mojo/Redis/Connection.pm 9;" c Mojo::Redis::Connection::DEBUG lib/Mojo/Redis/Connection.pm 8;" c Mojo::Redis::Connection::DESTROY lib/Mojo/Redis/Connection.pm 17;" s -Mojo::Redis::Connection::Offline lib/Mojo/Redis/Cache.pm 89;" p -Mojo::Redis::Connection::Offline::_time lib/Mojo/Redis/Cache.pm 114;" s -Mojo::Redis::Connection::Offline::write_p lib/Mojo/Redis/Cache.pm 93;" s +Mojo::Redis::Connection::Offline lib/Mojo/Redis/Cache.pm 86;" p +Mojo::Redis::Connection::Offline::_time lib/Mojo/Redis/Cache.pm 111;" s +Mojo::Redis::Connection::Offline::write_p lib/Mojo/Redis/Cache.pm 90;" s Mojo::Redis::Connection::SENTINELS_CONNECT_TIMEOUT lib/Mojo/Redis/Connection.pm 10;" c Mojo::Redis::Connection::_connect lib/Mojo/Redis/Connection.pm 55;" s Mojo::Redis::Connection::_connect_args lib/Mojo/Redis/Connection.pm 94;" s @@ -35,8 +35,8 @@ Mojo::Redis::Connection::_on_close_cb lib/Mojo/Redis/Connection.pm 151;" s Mojo::Redis::Connection::_on_read_cb lib/Mojo/Redis/Connection.pm 166;" s Mojo::Redis::Connection::_parse_message_cb lib/Mojo/Redis/Connection.pm 178;" s -Mojo::Redis::Connection::_reject_queue lib/Mojo/Redis/Connection.pm 222;" s -Mojo::Redis::Connection::_write lib/Mojo/Redis/Connection.pm 230;" s +Mojo::Redis::Connection::_reject_queue lib/Mojo/Redis/Connection.pm 223;" s +Mojo::Redis::Connection::_write lib/Mojo/Redis/Connection.pm 231;" s Mojo::Redis::Connection::disconnect lib/Mojo/Redis/Connection.pm 22;" s Mojo::Redis::Connection::is_connected lib/Mojo/Redis/Connection.pm 30;" s Mojo::Redis::Connection::write_p lib/Mojo/Redis/Connection.pm 32;" s @@ -83,50 +83,51 @@ Mojo::Redis::Database::multi_p lib/Mojo/Redis/Database.pm 103;" s Mojo::Redis::PubSub lib/Mojo/Redis/PubSub.pm 1;" p Mojo::Redis::PubSub::DEBUG lib/Mojo/Redis/PubSub.pm 6;" c -Mojo::Redis::PubSub::_keyspace_key lib/Mojo/Redis/PubSub.pm 65;" s -Mojo::Redis::PubSub::_listen lib/Mojo/Redis/PubSub.pm 77;" s -Mojo::Redis::PubSub::_reconnect lib/Mojo/Redis/PubSub.pm 107;" s +Mojo::Redis::PubSub::_keyspace_key lib/Mojo/Redis/PubSub.pm 71;" s +Mojo::Redis::PubSub::_listen lib/Mojo/Redis/PubSub.pm 83;" s +Mojo::Redis::PubSub::_reconnect lib/Mojo/Redis/PubSub.pm 114;" s Mojo::Redis::PubSub::channels_p lib/Mojo/Redis/PubSub.pm 13;" s Mojo::Redis::PubSub::json lib/Mojo/Redis/PubSub.pm 17;" s Mojo::Redis::PubSub::keyspace_listen lib/Mojo/Redis/PubSub.pm 19;" s -Mojo::Redis::PubSub::keyspace_unlisten lib/Mojo/Redis/PubSub.pm 24;" s -Mojo::Redis::PubSub::listen lib/Mojo/Redis/PubSub.pm 29;" s -Mojo::Redis::PubSub::notify lib/Mojo/Redis/PubSub.pm 38;" s -Mojo::Redis::PubSub::numpat_p lib/Mojo/Redis/PubSub.pm 48;" s -Mojo::Redis::PubSub::numsub_p lib/Mojo/Redis/PubSub.pm 44;" s -Mojo::Redis::PubSub::unlisten lib/Mojo/Redis/PubSub.pm 52;" s -Mojo::Redis::_blocking_connection lib/Mojo/Redis.pm 61;" s -Mojo::Redis::_connection lib/Mojo/Redis.pm 45;" s -Mojo::Redis::_dequeue lib/Mojo/Redis.pm 72;" s -Mojo::Redis::_enqueue lib/Mojo/Redis.pm 82;" s -Mojo::Redis::_fork_safety lib/Mojo/Redis.pm 89;" s -Mojo::Redis::cache lib/Mojo/Redis.pm 33;" s -Mojo::Redis::cursor lib/Mojo/Redis.pm 34;" s -Mojo::Redis::db lib/Mojo/Redis.pm 35;" s -Mojo::Redis::new lib/Mojo/Redis.pm 37;" s -OFFLINE lib/Mojo/Redis/Cache.pm 10;" c +Mojo::Redis::PubSub::keyspace_unlisten lib/Mojo/Redis/PubSub.pm 26;" s +Mojo::Redis::PubSub::listen lib/Mojo/Redis/PubSub.pm 31;" s +Mojo::Redis::PubSub::notify lib/Mojo/Redis/PubSub.pm 40;" s +Mojo::Redis::PubSub::notify_p lib/Mojo/Redis/PubSub.pm 44;" s +Mojo::Redis::PubSub::numpat_p lib/Mojo/Redis/PubSub.pm 54;" s +Mojo::Redis::PubSub::numsub_p lib/Mojo/Redis/PubSub.pm 50;" s +Mojo::Redis::PubSub::unlisten lib/Mojo/Redis/PubSub.pm 58;" s +Mojo::Redis::_blocking_connection lib/Mojo/Redis.pm 63;" s +Mojo::Redis::_connection lib/Mojo/Redis.pm 47;" s +Mojo::Redis::_dequeue lib/Mojo/Redis.pm 74;" s +Mojo::Redis::_enqueue lib/Mojo/Redis.pm 84;" s +Mojo::Redis::_fork_safety lib/Mojo/Redis.pm 91;" s +Mojo::Redis::cache lib/Mojo/Redis.pm 35;" s +Mojo::Redis::cursor lib/Mojo/Redis.pm 36;" s +Mojo::Redis::db lib/Mojo/Redis.pm 37;" s +Mojo::Redis::new lib/Mojo/Redis.pm 39;" s +OFFLINE lib/Mojo/Redis/Cache.pm 9;" c SENTINELS_CONNECT_TIMEOUT lib/Mojo/Redis/Connection.pm 10;" c _add_method lib/Mojo/Redis/Database.pm 110;" s -_blocking_connection lib/Mojo/Redis.pm 61;" s -_compute_p lib/Mojo/Redis/Cache.pm 48;" s +_blocking_connection lib/Mojo/Redis.pm 63;" s +_compute_p lib/Mojo/Redis/Cache.pm 45;" s _connect lib/Mojo/Redis/Connection.pm 55;" s _connect_args lib/Mojo/Redis/Connection.pm 94;" s -_connection lib/Mojo/Redis.pm 45;" s -_dequeue lib/Mojo/Redis.pm 72;" s +_connection lib/Mojo/Redis.pm 47;" s +_dequeue lib/Mojo/Redis.pm 74;" s _discover_master lib/Mojo/Redis/Connection.pm 109;" s _encode lib/Mojo/Redis/Connection.pm 47;" s -_enqueue lib/Mojo/Redis.pm 82;" s -_fork_safety lib/Mojo/Redis.pm 89;" s +_enqueue lib/Mojo/Redis.pm 84;" s +_fork_safety lib/Mojo/Redis.pm 91;" s _generate_bnb_method lib/Mojo/Redis/Database.pm 136;" s _generate_nb_method lib/Mojo/Redis/Database.pm 160;" s _generate_p_method lib/Mojo/Redis/Database.pm 171;" s _id lib/Mojo/Redis/Connection.pm 147;" s _is_blocking lib/Mojo/Redis/Connection.pm 149;" s -_keyspace_key lib/Mojo/Redis/PubSub.pm 65;" s -_listen lib/Mojo/Redis/PubSub.pm 77;" s -_maybe_compute_p lib/Mojo/Redis/Cache.pm 64;" s +_keyspace_key lib/Mojo/Redis/PubSub.pm 71;" s +_listen lib/Mojo/Redis/PubSub.pm 83;" s +_maybe_compute_p lib/Mojo/Redis/Cache.pm 61;" s _next_p lib/Mojo/Redis/Cursor.pm 107;" s -_offline_connection lib/Mojo/Redis/Cache.pm 87;" s +_offline_connection lib/Mojo/Redis/Cache.pm 84;" s _on_close_cb lib/Mojo/Redis/Connection.pm 151;" s _on_read_cb lib/Mojo/Redis/Connection.pm 166;" s _parse_message_cb lib/Mojo/Redis/Connection.pm 178;" s @@ -144,23 +145,23 @@ _process_sscan lib/Mojo/Redis/Cursor.pm 126;" s _process_xread_structured lib/Mojo/Redis/Database.pm 204;" s _process_zscan lib/Mojo/Redis/Cursor.pm 127;" s -_reconnect lib/Mojo/Redis/PubSub.pm 107;" s -_reject_queue lib/Mojo/Redis/Connection.pm 222;" s -_time lib/Mojo/Redis/Cache.pm 114;" s -_write lib/Mojo/Redis/Connection.pm 230;" s +_reconnect lib/Mojo/Redis/PubSub.pm 114;" s +_reject_queue lib/Mojo/Redis/Connection.pm 223;" s +_time lib/Mojo/Redis/Cache.pm 111;" s +_write lib/Mojo/Redis/Connection.pm 231;" s add_dummy_user examples/twitter.pl 102;" s again lib/Mojo/Redis/Cursor.pm 11;" s all lib/Mojo/Redis/Cursor.pm 18;" s all_p lib/Mojo/Redis/Cursor.pm 46;" s -cache lib/Mojo/Redis.pm 33;" s +cache lib/Mojo/Redis.pm 35;" s call lib/Mojo/Redis/Database.pm 59;" s call_p lib/Mojo/Redis/Database.pm 77;" s channels_p lib/Mojo/Redis/PubSub.pm 13;" s command lib/Mojo/Redis/Cursor.pm 7;" s -compute_p lib/Mojo/Redis/Cache.pm 24;" s +compute_p lib/Mojo/Redis/Cache.pm 21;" s connection lib/Mojo/Redis/Database.pm 126;" s -cursor lib/Mojo/Redis.pm 34;" s -db lib/Mojo/Redis.pm 35;" s +cursor lib/Mojo/Redis.pm 36;" s +db lib/Mojo/Redis.pm 37;" s discard lib/Mojo/Redis/Database.pm 90;" s discard_p lib/Mojo/Redis/Database.pm 92;" s disconnect lib/Mojo/Redis/Connection.pm 22;" s @@ -170,19 +171,20 @@ is_connected lib/Mojo/Redis/Connection.pm 30;" s json lib/Mojo/Redis/PubSub.pm 17;" s keyspace_listen lib/Mojo/Redis/PubSub.pm 19;" s -keyspace_unlisten lib/Mojo/Redis/PubSub.pm 24;" s -listen lib/Mojo/Redis/PubSub.pm 29;" s -memoize_p lib/Mojo/Redis/Cache.pm 39;" s +keyspace_unlisten lib/Mojo/Redis/PubSub.pm 26;" s +listen lib/Mojo/Redis/PubSub.pm 31;" s +memoize_p lib/Mojo/Redis/Cache.pm 36;" s multi lib/Mojo/Redis/Database.pm 98;" s multi_p lib/Mojo/Redis/Database.pm 103;" s -new lib/Mojo/Redis.pm 37;" s +new lib/Mojo/Redis.pm 39;" s new lib/Mojo/Redis/Cursor.pm 86;" s next lib/Mojo/Redis/Cursor.pm 60;" s next_p lib/Mojo/Redis/Cursor.pm 81;" s -notify lib/Mojo/Redis/PubSub.pm 38;" s -numpat_p lib/Mojo/Redis/PubSub.pm 48;" s -numsub_p lib/Mojo/Redis/PubSub.pm 44;" s -unlisten lib/Mojo/Redis/PubSub.pm 52;" s -write_p lib/Mojo/Redis/Cache.pm 93;" s +notify lib/Mojo/Redis/PubSub.pm 40;" s +notify_p lib/Mojo/Redis/PubSub.pm 44;" s +numpat_p lib/Mojo/Redis/PubSub.pm 54;" s +numsub_p lib/Mojo/Redis/PubSub.pm 50;" s +unlisten lib/Mojo/Redis/PubSub.pm 58;" s +write_p lib/Mojo/Redis/Cache.pm 90;" s write_p lib/Mojo/Redis/Connection.pm 32;" s write_q lib/Mojo/Redis/Connection.pm 40;" s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/Changes new/Mojo-Redis-3.25/Changes --- old/Mojo-Redis-3.24/Changes 2019-05-07 17:25:50.000000000 +0200 +++ new/Mojo-Redis-3.25/Changes 2020-10-02 03:21:30.000000000 +0200 @@ -1,5 +1,10 @@ Revision history for perl distribution Mojo-Redis +3.25 2020-10-02T10:21:30+0900 + - Fix handling undef() in _process_...() methods #56 + - Fix some leaks in Mojo::Redis::PubSub + - Add Mojo::Redis::PubSub->notify_p() + 3.24 2019-05-07T22:25:50+0700 - Fix PubSub->keyspace_listen() #42 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/MANIFEST new/Mojo-Redis-3.25/MANIFEST --- old/Mojo-Redis-3.24/MANIFEST 2019-05-07 17:25:51.000000000 +0200 +++ new/Mojo-Redis-3.25/MANIFEST 2020-10-02 03:21:32.000000000 +0200 @@ -1,3 +1,4 @@ +.github/workflows/ci-ubuntu.yml .perltidyrc .travis.yml .vstags diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/META.json new/Mojo-Redis-3.25/META.json --- old/Mojo-Redis-3.24/META.json 2019-05-07 17:25:51.000000000 +0200 +++ new/Mojo-Redis-3.25/META.json 2020-10-02 03:21:32.000000000 +0200 @@ -4,7 +4,7 @@ "Jan Henning Thorsen <jhthor...@cpan.org>" ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], @@ -52,10 +52,10 @@ "web" : "https://github.com/jhthorsen/mojo-redis" } }, - "version" : "3.24", + "version" : "3.25", "x_contributors" : [ "Jan Henning Thorsen <jhthor...@cpan.org>", "Dan Book <gri...@grinnz.com>" ], - "x_serialization_backend" : "JSON::PP version 2.97001" + "x_serialization_backend" : "JSON::PP version 4.04" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/META.yml new/Mojo-Redis-3.25/META.yml --- old/Mojo-Redis-3.24/META.yml 2019-05-07 17:25:51.000000000 +0200 +++ new/Mojo-Redis-3.25/META.yml 2020-10-02 03:21:31.000000000 +0200 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -24,7 +24,7 @@ bugtracker: https://github.com/jhthorsen/mojo-redis/issues homepage: https://github.com/jhthorsen/mojo-redis repository: https://github.com/jhthorsen/mojo-redis.git -version: '3.24' +version: '3.25' x_contributors: - 'Jan Henning Thorsen <jhthor...@cpan.org>' - 'Dan Book <gri...@grinnz.com>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/Makefile.PL new/Mojo-Redis-3.25/Makefile.PL --- old/Mojo-Redis-3.24/Makefile.PL 2019-05-07 17:25:50.000000000 +0200 +++ new/Mojo-Redis-3.25/Makefile.PL 2020-10-02 03:21:29.000000000 +0200 @@ -8,6 +8,7 @@ ABSTRACT_FROM => 'lib/Mojo/Redis.pm', VERSION_FROM => 'lib/Mojo/Redis.pm', EXE_FILES => [qw()], + OBJECT => '', BUILD_REQUIRES => {} , TEST_REQUIRES => { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/README.md new/Mojo-Redis-3.25/README.md --- old/Mojo-Redis-3.24/README.md 2019-05-07 17:25:50.000000000 +0200 +++ new/Mojo-Redis-3.25/README.md 2020-10-02 03:21:30.000000000 +0200 @@ -21,7 +21,7 @@ ## Pipelining Pipelining is built into the API by sending a lot of commands and then use -["all" in Mojo::Promise](https://metacpan.org/pod/Mojo::Promise#all) to wait for all the responses. +["all" in Mojo::Promise](https://metacpan.org/pod/Mojo%3A%3APromise#all) to wait for all the responses. Mojo::Promise->all( $db->set_p($key, 10), @@ -36,15 +36,15 @@ # DESCRIPTION -[Mojo::Redis](https://metacpan.org/pod/Mojo::Redis) is a Redis driver that use the [Mojo::IOLoop](https://metacpan.org/pod/Mojo::IOLoop), which makes it +[Mojo::Redis](https://metacpan.org/pod/Mojo%3A%3ARedis) is a Redis driver that use the [Mojo::IOLoop](https://metacpan.org/pod/Mojo%3A%3AIOLoop), which makes it integrate easily with the [Mojolicious](https://metacpan.org/pod/Mojolicious) framework. -It tries to mimic the same interface as [Mojo::Pg](https://metacpan.org/pod/Mojo::Pg), [Mojo::mysql](https://metacpan.org/pod/Mojo::mysql) and -[Mojo::SQLite](https://metacpan.org/pod/Mojo::SQLite), but the methods for talking to the database vary. +It tries to mimic the same interface as [Mojo::Pg](https://metacpan.org/pod/Mojo%3A%3APg), [Mojo::mysql](https://metacpan.org/pod/Mojo%3A%3Amysql) and +[Mojo::SQLite](https://metacpan.org/pod/Mojo%3A%3ASQLite), but the methods for talking to the database vary. -This module is in no way compatible with the 1.xx version of [Mojo::Redis](https://metacpan.org/pod/Mojo::Redis) +This module is in no way compatible with the 1.xx version of [Mojo::Redis](https://metacpan.org/pod/Mojo%3A%3ARedis) and this version also tries to fix a lot of the confusing methods in -[Mojo::Redis2](https://metacpan.org/pod/Mojo::Redis2) related to pubsub. +[Mojo::Redis2](https://metacpan.org/pod/Mojo%3A%3ARedis2) related to pubsub. This module is currently EXPERIMENTAL, and bad design decisions will be fixed without warning. Please report at @@ -58,7 +58,7 @@ $cb = $redis->on(connection => sub { my ($redis, $connection) = @_; }); -Emitted when [Mojo::Redis::Connection](https://metacpan.org/pod/Mojo::Redis::Connection) connects to the Redis. +Emitted when [Mojo::Redis::Connection](https://metacpan.org/pod/Mojo%3A%3ARedis%3A%3AConnection) connects to the Redis. # ATTRIBUTES @@ -68,7 +68,7 @@ $redis = $redis->encoding("UTF-8"); The value of this attribute will be passed on to -["encoding" in Mojo::Redis::Connection](https://metacpan.org/pod/Mojo::Redis::Connection#encoding) when a new connection is created. This +["encoding" in Mojo::Redis::Connection](https://metacpan.org/pod/Mojo%3A%3ARedis%3A%3AConnection#encoding) when a new connection is created. This means that updating this attribute will not change any connection that is in use. @@ -87,14 +87,14 @@ $str = $redis->protocol_class; $redis = $redis->protocol_class("Protocol::Redis::XS"); -Default to [Protocol::Redis::XS](https://metacpan.org/pod/Protocol::Redis::XS) if the optional module is available and at -least version 0.06, or falls back to [Protocol::Redis::Faster](https://metacpan.org/pod/Protocol::Redis::Faster). +Default to [Protocol::Redis::XS](https://metacpan.org/pod/Protocol%3A%3ARedis%3A%3AXS) if the optional module is available and at +least version 0.06, or falls back to [Protocol::Redis::Faster](https://metacpan.org/pod/Protocol%3A%3ARedis%3A%3AFaster). ## pubsub $pubsub = $redis->pubsub; -Lazy builds an instance of [Mojo::Redis::PubSub](https://metacpan.org/pod/Mojo::Redis::PubSub) for this object, instead of +Lazy builds an instance of [Mojo::Redis::PubSub](https://metacpan.org/pod/Mojo%3A%3ARedis%3A%3APubSub) for this object, instead of returning a new instance like ["db"](#db) does. ## url @@ -102,7 +102,7 @@ $url = $redis->url; $redis = $redis->url(Mojo::URL->new("redis://localhost/3")); -Holds an instance of [Mojo::URL](https://metacpan.org/pod/Mojo::URL) that describes how to connect to the Redis server. +Holds an instance of [Mojo::URL](https://metacpan.org/pod/Mojo%3A%3AURL) that describes how to connect to the Redis server. # METHODS @@ -110,21 +110,21 @@ $db = $redis->db; -Returns an instance of [Mojo::Redis::Database](https://metacpan.org/pod/Mojo::Redis::Database). +Returns an instance of [Mojo::Redis::Database](https://metacpan.org/pod/Mojo%3A%3ARedis%3A%3ADatabase). ## cache $cache = $redis->cache(%attrs); -Returns an instance of [Mojo::Redis::Cache](https://metacpan.org/pod/Mojo::Redis::Cache). +Returns an instance of [Mojo::Redis::Cache](https://metacpan.org/pod/Mojo%3A%3ARedis%3A%3ACache). ## cursor $cursor = $redis->cursor(@command); -Returns an instance of [Mojo::Redis::Cursor](https://metacpan.org/pod/Mojo::Redis::Cursor) with -["command" in Mojo::Redis::Cursor](https://metacpan.org/pod/Mojo::Redis::Cursor#command) set to the arguments passed. See -["new" in Mojo::Redis::Cursor](https://metacpan.org/pod/Mojo::Redis::Cursor#new). for possible commands. +Returns an instance of [Mojo::Redis::Cursor](https://metacpan.org/pod/Mojo%3A%3ARedis%3A%3ACursor) with +["command" in Mojo::Redis::Cursor](https://metacpan.org/pod/Mojo%3A%3ARedis%3A%3ACursor#command) set to the arguments passed. See +["new" in Mojo::Redis::Cursor](https://metacpan.org/pod/Mojo%3A%3ARedis%3A%3ACursor#new). for possible commands. ## new @@ -133,7 +133,7 @@ $redis = Mojo::Redis->new(\%attrs); $redis = Mojo::Redis->new(%attrs); -Object constructor. Can coerce a string into a [Mojo::URL](https://metacpan.org/pod/Mojo::URL) and set ["url"](#url) +Object constructor. Can coerce a string into a [Mojo::URL](https://metacpan.org/pod/Mojo%3A%3AURL) and set ["url"](#url) if present. # AUTHORS @@ -151,4 +151,4 @@ # SEE ALSO -[Mojo::Redis2](https://metacpan.org/pod/Mojo::Redis2). +[Mojo::Redis2](https://metacpan.org/pod/Mojo%3A%3ARedis2). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/examples/twitter.pl new/Mojo-Redis-3.25/examples/twitter.pl --- old/Mojo-Redis-3.24/examples/twitter.pl 2018-10-23 04:35:51.000000000 +0200 +++ new/Mojo-Redis-3.25/examples/twitter.pl 2020-08-11 01:59:06.000000000 +0200 @@ -111,7 +111,7 @@ $uid = shift; # Password should not be in plain text! - Mojo::Promise->alll( + Mojo::Promise->all( $db->hmset_p("twitter_clone:user:$uid", username => 'batgirl', password => 's3cret'), $db->hset_p('twitter_clone:users', batgirl => $uid), ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/lib/Mojo/Redis/Database.pm new/Mojo-Redis-3.25/lib/Mojo/Redis/Database.pm --- old/Mojo-Redis-3.24/lib/Mojo/Redis/Database.pm 2019-05-04 16:11:06.000000000 +0200 +++ new/Mojo-Redis-3.25/lib/Mojo/Redis/Database.pm 2020-10-02 03:20:38.000000000 +0200 @@ -48,13 +48,13 @@ has redis => sub { Carp::confess('redis is required in constructor') }; -__PACKAGE__->_add_method('bnb,p' => $_) for @BASIC_COMMANDS; -__PACKAGE__->_add_method('nb,p' => $_) for @BLOCKING_COMMANDS; +__PACKAGE__->_add_method('bnb,p' => $_) for @BASIC_COMMANDS; +__PACKAGE__->_add_method('nb,p' => $_) for @BLOCKING_COMMANDS; __PACKAGE__->_add_method('bnb' => qw(_exec EXEC)); __PACKAGE__->_add_method('bnb' => qw(_discard DISCARD)); __PACKAGE__->_add_method('bnb' => qw(_multi MULTI)); __PACKAGE__->_add_method('bnb,p' => "${_}_structured", $_) for qw(info xread); -__PACKAGE__->_add_method('bnb,p' => $_) for qw(unwatch watch); +__PACKAGE__->_add_method('bnb,p' => $_) for qw(unwatch watch); sub call { my $cb = ref $_[-1] eq 'CODE' ? pop : undef; @@ -179,10 +179,12 @@ }; } -sub _process_geopos { [map { ref $_ ? +{lng => $_->[0], lat => $_->[1]} : undef } @{$_[1]}] } -sub _process_blpop { reverse @{$_[1]} } -sub _process_brpop { reverse @{$_[1]} } -sub _process_hgetall { +{@{$_[1]}} } +sub _process_geopos { + ref $_[1] eq 'ARRAY' ? [map { ref $_ ? +{lng => $_->[0], lat => $_->[1]} : undef } @{$_[1]}] : $_[1]; +} +sub _process_blpop { ref $_[1] eq 'ARRAY' ? reverse @{$_[1]} : $_[1] } +sub _process_brpop { ref $_[1] eq 'ARRAY' ? reverse @{$_[1]} : $_[1] } +sub _process_hgetall { ref $_[1] eq 'ARRAY' ? +{@{$_[1]}} : $_[1] } sub _process_info_structured { my $self = shift; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/lib/Mojo/Redis/PubSub.pm new/Mojo-Redis-3.25/lib/Mojo/Redis/PubSub.pm --- old/Mojo-Redis-3.24/lib/Mojo/Redis/PubSub.pm 2019-05-07 17:24:46.000000000 +0200 +++ new/Mojo-Redis-3.25/lib/Mojo/Redis/PubSub.pm 2020-10-02 03:20:52.000000000 +0200 @@ -6,7 +6,14 @@ use constant DEBUG => $ENV{MOJO_REDIS_DEBUG}; has connection => sub { shift->redis->_connection }; -has db => sub { shift->redis->db }; + +has db => sub { + my $self = shift; + my $db = $self->redis->db; + Scalar::Util::weaken($db->{redis}); + return $db; +}; + has reconnect_interval => 1; has redis => sub { Carp::confess('redis is requried in constructor') }; @@ -37,12 +44,14 @@ return $cb; } -sub notify { +sub notify_p { my ($self, $name, $payload) = @_; $payload = to_json $payload if $self->{json}{$name}; shift->db->call_p(PUBLISH => $name, $payload); } +sub notify { shift->notify_p(@_)->wait } + sub numsub_p { shift->db->call_p(qw(PUBSUB NUMSUB), @_)->then(sub { +{@{$_[0]}} }); } @@ -240,20 +249,20 @@ =head2 keyspace_listen - $cb = $pubsub->keyspace_listen($key, $op, sub { my ($pubsub, $message) = @_ }) }); - $cb = $pubsub->keyspace_listen($key, $op, \%args, sub { my ($pubsub, $message) = @_ }) }); + $cb = $pubsub->keyspace_listen(\%args, sub { my ($pubsub, $message) = @_ }) }); + $cb = $pubsub->keyspace_listen({key => "cool:key"}, sub { my ($pubsub, $message) = @_ }) }); + $cb = $pubsub->keyspace_listen({op => "del"}, sub { my ($pubsub, $message) = @_ }) }); Used to listen for keyspace notifications. See L<https://redis.io/topics/notifications> -for more details. - -C<$key> C<$op> and C<%args> are optional. C<$key> and C<$op> will default to -"*" and C<%args> can have the following key values: - -The channel that will be subscribed to will look like one of these: +for more details. The channel that will be subscribed to will look like one of +these: __keyspace@${db}__:$key $op __keyevent@${db}__:$op $key +This means that "key" and "op" is mutually exclusive from the list of +parameters below: + =over 2 =item * db @@ -270,11 +279,6 @@ Alternative to passing in C<$op>. Default value is "*". -=item * type - -Will default to "keyevent" if C<$key> is "*", and "keyspace" if not. It can -also be set to "key*" for listening to both "keyevent" and "keyspace" events. - =back =head2 keyspace_unlisten @@ -296,7 +300,15 @@ $pubsub->notify($channel => $message); -Send a plain string message to a channel. +Send a plain string message to a channel. This method is the same as: + + $pubsub->notify_p($channel => $message)->wait; + +=head2 notify_p + + $p = $pubsub->notify_p($channel => $message); + +Send a plain string message to a channel and returns a L<Mojo::Promise> object. =head2 numpat_p diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/lib/Mojo/Redis.pm new/Mojo-Redis-3.25/lib/Mojo/Redis.pm --- old/Mojo-Redis-3.24/lib/Mojo/Redis.pm 2019-05-07 17:25:50.000000000 +0200 +++ new/Mojo-Redis-3.25/lib/Mojo/Redis.pm 2020-10-02 03:21:30.000000000 +0200 @@ -9,7 +9,7 @@ use Mojo::Redis::PubSub; use Scalar::Util 'blessed'; -our $VERSION = '3.24'; +our $VERSION = '3.25'; $ENV{MOJO_REDIS_URL} ||= 'redis://localhost:6379'; @@ -25,16 +25,17 @@ }; has pubsub => sub { - my $pubsub = Mojo::Redis::PubSub->new(redis => $_[0]); + my $self = shift; + my $pubsub = Mojo::Redis::PubSub->new(redis => $self); Scalar::Util::weaken($pubsub->{redis}); return $pubsub; }; has url => sub { Mojo::URL->new($ENV{MOJO_REDIS_URL}) }; -sub cache { Mojo::Redis::Cache->new(redis => shift, @_) } +sub cache { Mojo::Redis::Cache->new(redis => shift, @_) } sub cursor { Mojo::Redis::Cursor->new(redis => shift, command => [@_ ? @_ : (scan => 0)]) } -sub db { Mojo::Redis::Database->new(redis => shift) } +sub db { Mojo::Redis::Database->new(redis => shift) } sub new { my $class = shift; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojo-Redis-3.24/t/pubsub.t new/Mojo-Redis-3.25/t/pubsub.t --- old/Mojo-Redis-3.24/t/pubsub.t 2019-05-05 10:49:46.000000000 +0200 +++ new/Mojo-Redis-3.25/t/pubsub.t 2020-10-02 03:20:40.000000000 +0200 @@ -21,10 +21,9 @@ memory_cycle_ok($redis, 'cycle ok after listen'); $pubsub->notify("rtest:$$:1" => 'message one'); -$db->publish_p("rtest:$$:2" => 'message two'); +$db->publish_p("rtest:$$:2" => 'message two')->wait; memory_cycle_ok($redis, 'cycle ok after notify'); -Mojo::IOLoop->start; is_deeply [sort @messages], ['message one', 'message two'], 'got messages' or diag join ", ", @messages; $pubsub->channels_p('rtest*')->then(sub { @res = @_ })->wait;