Hello community,

here is the log from the commit of package perl-Mojolicious for 
openSUSE:Factory checked in at 2020-10-13 15:46:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Mojolicious.new.3486 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojolicious"

Tue Oct 13 15:46:38 2020 rev:144 rq:841467 version:8.62

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes        
2020-10-12 13:59:17.702215605 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Mojolicious.new.3486/perl-Mojolicious.changes  
    2020-10-13 15:47:33.337499172 +0200
@@ -1,0 +2,9 @@
+Tue Oct 13 03:11:34 UTC 2020 - Tina Müller <[email protected]>
+
+- updated to 8.62
+   see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+  8.62  2020-10-10
+    - Improved commands to exit with a usage message on unknown options.
+
+-------------------------------------------------------------------

Old:
----
  Mojolicious-8.61.tar.gz

New:
----
  Mojolicious-8.62.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Mojolicious.spec ++++++
--- /var/tmp/diff_new_pack.L0gvm1/_old  2020-10-13 15:47:35.341500037 +0200
+++ /var/tmp/diff_new_pack.L0gvm1/_new  2020-10-13 15:47:35.341500037 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Mojolicious
-Version:        8.61
+Version:        8.62
 Release:        0
 %define cpan_name Mojolicious
 Summary:        Real-time web framework

++++++ Mojolicious-8.61.tar.gz -> Mojolicious-8.62.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/Changes new/Mojolicious-8.62/Changes
--- old/Mojolicious-8.61/Changes        2020-10-01 16:06:35.000000000 +0200
+++ new/Mojolicious-8.62/Changes        2020-10-10 17:08:53.000000000 +0200
@@ -1,4 +1,7 @@
 
+8.62  2020-10-10
+  - Improved commands to exit with a usage message on unknown options.
+
 8.61  2020-10-01
   - Fixed fork-safety feature in Mojo::UserAgent to work with more than one 
fork.
   - Fixed reset method in Mojo::IOLoop to not interfere with close events 
anymore, since that resulted in leaks.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/META.json 
new/Mojolicious-8.62/META.json
--- old/Mojolicious-8.61/META.json      2020-10-02 13:01:03.000000000 +0200
+++ new/Mojolicious-8.62/META.json      2020-10-12 11:56:59.000000000 +0200
@@ -4,7 +4,7 @@
       "Sebastian Riedel <[email protected]>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "ExtUtils::MakeMaker version 7.46, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.48, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "artistic_2"
    ],
@@ -63,6 +63,6 @@
          "web" : "https://webchat.freenode.net/#mojo";
       }
    },
-   "version" : "8.61",
+   "version" : "8.62",
    "x_serialization_backend" : "JSON::PP version 4.05"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/META.yml 
new/Mojolicious-8.62/META.yml
--- old/Mojolicious-8.61/META.yml       2020-10-02 13:01:02.000000000 +0200
+++ new/Mojolicious-8.62/META.yml       2020-10-12 11:56:59.000000000 +0200
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 7.46, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.48, CPAN::Meta::Converter version 
2.150010'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -34,5 +34,5 @@
   homepage: https://mojolicious.org
   license: http://www.opensource.org/licenses/artistic-license-2.0
   repository: https://github.com/mojolicious/mojo.git
-version: '8.61'
+version: '8.62'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-8.61/lib/Mojolicious/Command/Author/cpanify.pm 
new/Mojolicious-8.62/lib/Mojolicious/Command/Author/cpanify.pm
--- old/Mojolicious-8.61/lib/Mojolicious/Command/Author/cpanify.pm      
2020-09-17 13:42:25.000000000 +0200
+++ new/Mojolicious-8.62/lib/Mojolicious/Command/Author/cpanify.pm      
2020-10-09 18:42:58.000000000 +0200
@@ -10,7 +10,7 @@
 sub run {
   my ($self, @args) = @_;
 
-  getopt \@args,
+  die $self->usage unless getopt \@args,
     'p|password=s' => \(my $password = ''),
     'u|user=s'     => \(my $user     = '');
   die $self->usage unless my $file = shift @args;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-8.61/lib/Mojolicious/Command/Author/generate/plugin.pm 
new/Mojolicious-8.62/lib/Mojolicious/Command/Author/generate/plugin.pm
--- old/Mojolicious-8.61/lib/Mojolicious/Command/Author/generate/plugin.pm      
2020-09-17 13:42:25.000000000 +0200
+++ new/Mojolicious-8.62/lib/Mojolicious/Command/Author/generate/plugin.pm      
2020-10-09 18:42:35.000000000 +0200
@@ -9,7 +9,7 @@
 sub run {
   my ($self, @args) = @_;
 
-  getopt \@args, 'f|full' => \(my $full);
+  die $self->usage unless getopt \@args, 'f|full' => \(my $full);
 
   # Class
   my $name  = $args[0] // 'MyPlugin';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/lib/Mojolicious/Command/cgi.pm 
new/Mojolicious-8.62/lib/Mojolicious/Command/cgi.pm
--- old/Mojolicious-8.61/lib/Mojolicious/Command/cgi.pm 2020-09-17 
13:42:26.000000000 +0200
+++ new/Mojolicious-8.62/lib/Mojolicious/Command/cgi.pm 2020-10-09 
18:40:24.000000000 +0200
@@ -9,7 +9,7 @@
 
 sub run {
   my ($self, @args) = @_;
-  getopt \@args, nph => \(my $nph = 0);
+  die $self->usage unless getopt \@args, nph => \(my $nph = 0);
   Mojo::Server::CGI->new(app => $self->app, nph => $nph)->run;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/lib/Mojolicious/Command/daemon.pm 
new/Mojolicious-8.62/lib/Mojolicious/Command/daemon.pm
--- old/Mojolicious-8.61/lib/Mojolicious/Command/daemon.pm      2020-09-17 
13:42:27.000000000 +0200
+++ new/Mojolicious-8.62/lib/Mojolicious/Command/daemon.pm      2020-10-09 
18:39:15.000000000 +0200
@@ -11,7 +11,8 @@
   my ($self, @args) = @_;
 
   my $daemon = Mojo::Server::Daemon->new(app => $self->app);
-  getopt \@args,
+  die $self->usage
+    unless getopt \@args,
     'b|backlog=i'            => sub { $daemon->backlog($_[1]) },
     'c|clients=i'            => sub { $daemon->max_clients($_[1]) },
     'i|inactivity-timeout=i' => sub { $daemon->inactivity_timeout($_[1]) },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/lib/Mojolicious/Command/eval.pm 
new/Mojolicious-8.62/lib/Mojolicious/Command/eval.pm
--- old/Mojolicious-8.61/lib/Mojolicious/Command/eval.pm        2020-09-17 
13:42:26.000000000 +0200
+++ new/Mojolicious-8.62/lib/Mojolicious/Command/eval.pm        2020-10-09 
18:40:43.000000000 +0200
@@ -10,7 +10,7 @@
 sub run {
   my ($self, @args) = @_;
 
-  getopt \@args, 'v|verbose' => \my $v1, 'V' => \my $v2;
+  die $self->usage unless getopt \@args, 'v|verbose' => \my $v1, 'V' => \my 
$v2;
   my $code = shift @args || '';
 
   # Run code against application
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/lib/Mojolicious/Command/get.pm 
new/Mojolicious-8.62/lib/Mojolicious/Command/get.pm
--- old/Mojolicious-8.61/lib/Mojolicious/Command/get.pm 2020-09-17 
13:42:27.000000000 +0200
+++ new/Mojolicious-8.62/lib/Mojolicious/Command/get.pm 2020-10-09 
18:41:18.000000000 +0200
@@ -23,7 +23,8 @@
 
   my $ua = Mojo::UserAgent->new(ioloop => Mojo::IOLoop->singleton);
   my %form;
-  getopt \@args,
+  die $self->usage
+    unless getopt \@args,
     'C|charset=s'            => \my $charset,
     'c|content=s'            => \$in,
     'f|form=s'               => sub { _form(\%form) if $_[1] =~ 
/^(.+)=(\@?)(.+)$/ },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/lib/Mojolicious/Command/prefork.pm 
new/Mojolicious-8.62/lib/Mojolicious/Command/prefork.pm
--- old/Mojolicious-8.61/lib/Mojolicious/Command/prefork.pm     2020-09-17 
13:42:26.000000000 +0200
+++ new/Mojolicious-8.62/lib/Mojolicious/Command/prefork.pm     2020-10-09 
18:41:42.000000000 +0200
@@ -11,7 +11,8 @@
   my ($self, @args) = @_;
 
   my $prefork = Mojo::Server::Prefork->new(app => $self->app);
-  getopt \@args,
+  die $self->usage
+    unless getopt \@args,
     'a|accepts=i'            => sub { $prefork->accepts($_[1]) },
     'b|backlog=i'            => sub { $prefork->backlog($_[1]) },
     'c|clients=i'            => sub { $prefork->max_clients($_[1]) },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/lib/Mojolicious/Command/routes.pm 
new/Mojolicious-8.62/lib/Mojolicious/Command/routes.pm
--- old/Mojolicious-8.61/lib/Mojolicious/Command/routes.pm      2020-09-17 
13:42:27.000000000 +0200
+++ new/Mojolicious-8.62/lib/Mojolicious/Command/routes.pm      2020-10-09 
18:42:00.000000000 +0200
@@ -10,7 +10,7 @@
 sub run {
   my ($self, @args) = @_;
 
-  getopt \@args, 'v|verbose' => \my $verbose;
+  die $self->usage unless getopt \@args, 'v|verbose' => \my $verbose;
 
   my $rows = [];
   _walk($_, 0, $rows, $verbose) for @{$self->app->routes->children};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/lib/Mojolicious.pm 
new/Mojolicious-8.62/lib/Mojolicious.pm
--- old/Mojolicious-8.61/lib/Mojolicious.pm     2020-10-01 15:18:43.000000000 
+0200
+++ new/Mojolicious-8.62/lib/Mojolicious.pm     2020-10-02 13:01:43.000000000 
+0200
@@ -58,7 +58,7 @@
 has validator => sub { Mojolicious::Validator->new };
 
 our $CODENAME = 'Supervillain';
-our $VERSION  = '8.61';
+our $VERSION  = '8.62';
 
 sub BUILD_DYNAMIC {
   my ($class, $method, $dyn_methods) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/t/mojo/delay.t 
new/Mojolicious-8.62/t/mojo/delay.t
--- old/Mojolicious-8.61/t/mojo/delay.t 2020-09-17 13:41:31.000000000 +0200
+++ new/Mojolicious-8.62/t/mojo/delay.t 2020-10-10 20:47:30.000000000 +0200
@@ -6,197 +6,210 @@
 use Mojo::IOLoop;
 use Mojo::IOLoop::Delay;
 
-# Promise (all)
-my $delay  = Mojo::IOLoop::Delay->new->then(sub {@_});
-my $delay2 = Mojo::IOLoop::Delay->new->then(sub {@_});
-my $delay3 = Mojo::IOLoop::Delay->new->then(sub {@_});
-my @results;
-Mojo::Promise->all($delay, $delay2, $delay3)->then(sub { @results = @_ });
-$delay2->resolve('second');
-$delay3->resolve('third');
-$delay->resolve('first');
-Mojo::IOLoop->one_tick;
-is_deeply \@results, [['first'], ['second'], ['third']], 'promises resolved';
-
-# Basic functionality
-$delay   = Mojo::IOLoop::Delay->new;
-@results = ();
-for my $i (1, 1) {
-  my $end = $delay->begin;
-  Mojo::IOLoop->next_tick(sub { push @results, $i; $end->() });
-}
-my $end  = $delay->begin;
-my $end2 = $delay->begin;
-$end->();
-$end2->();
-$delay->wait;
-is_deeply \@results, [1, 1], 'right results';
-
-# Argument splicing
-$delay = Mojo::IOLoop::Delay->new;
-Mojo::IOLoop->next_tick($delay->begin);
-$delay->begin(1)->(1, 2, 3);
-$delay->begin(1, 1)->(4, 5, 6);
-$delay->begin(0, 1)->(7, 8);
-$delay->begin(2)->(9, 10, 11);
-$delay->begin(0, 0)->(12, 13);
-$delay->begin(0, 2)->(14, 15, 16);
-$delay->begin(2, 5)->(17, 18, 19, 20);
-my @numbers;
-$delay->steps(sub { (undef, @numbers) = @_ })->wait;
-is_deeply \@numbers, [2, 3, 5, 7, 11, 14, 15, 19, 20], 'right values';
-
-# Steps
-my $result;
-$delay = Mojo::IOLoop::Delay->new;
-$delay->steps(
-  sub {
-    my $delay = shift;
-    my $end   = $delay->begin;
-    $delay->begin->(3, 2, 1);
-    Mojo::IOLoop->next_tick(sub { $end->(1, 2, 3)->pass(5) });
-  },
-  sub {
-    my ($delay, @numbers) = @_;
+subtest 'Promise (all)' => sub {
+  my $delay  = Mojo::IOLoop::Delay->new->then(sub {@_});
+  my $delay2 = Mojo::IOLoop::Delay->new->then(sub {@_});
+  my $delay3 = Mojo::IOLoop::Delay->new->then(sub {@_});
+  my @results;
+  Mojo::Promise->all($delay, $delay2, $delay3)->then(sub { @results = @_ });
+  $delay2->resolve('second');
+  $delay3->resolve('third');
+  $delay->resolve('first');
+  Mojo::IOLoop->one_tick;
+  is_deeply \@results, [['first'], ['second'], ['third']], 'promises resolved';
+};
+
+subtest 'Basic functionality' => sub {
+  my $delay = Mojo::IOLoop::Delay->new;
+  my @results;
+  for my $i (1, 1) {
     my $end = $delay->begin;
-    Mojo::IOLoop->next_tick(sub { $end->(undef, @numbers, 4) });
-  },
-  sub {
-    my ($delay, @numbers) = @_;
-    $result = \@numbers;
-  }
-)->wait;
-is_deeply $result, [2, 3, 2, 1, 4, 5], 'right results';
-
-# One step
-$result = undef;
-$delay  = Mojo::IOLoop::Delay->new;
-$delay->steps(sub { ++$result });
-$delay->begin->();
-is $result, undef, 'no result';
-Mojo::IOLoop->next_tick($delay->begin);
-is $result, undef, 'no result';
-$end = $delay->begin;
-Mojo::IOLoop->next_tick(sub { $end->() });
-is $result, undef, 'no result';
-$delay->wait;
-is $result, 1, 'right result';
-
-# One step (reverse)
-$result = undef;
-$delay  = Mojo::IOLoop::Delay->new;
-$end    = $delay->begin(0);
-Mojo::IOLoop->next_tick(sub { $end->(23) });
-$delay->steps(sub { $result = pop });
-is $result, undef, 'no result';
-$delay->wait;
-is $result, 23, 'right result';
-
-# End chain after first step
-$result = undef;
-$delay  = Mojo::IOLoop::Delay->new;
-$delay->steps(sub { $result = 'success' }, sub { $result = 'fail' });
-$delay->wait;
-is $result, 'success', 'right result';
-
-# End chain after third step
-$result = undef;
-$delay  = Mojo::IOLoop::Delay->new;
-$delay->steps(
-  sub { Mojo::IOLoop->next_tick(shift->begin) },
-  sub {
-    $result = 'fail';
-    shift->pass;
-  },
-  sub { $result = 'success' },
-  sub { $result = 'fail' }
-)->wait;
-is $result, 'success', 'right result';
-
-# End chain after second step
-@results = ();
-$delay   = Mojo::IOLoop::Delay->new;
-$delay->then(sub { push @results, [@_] });
-$delay->steps(sub { shift->pass(23) }, sub { shift; push @results, [@_] }, sub 
{ push @results, 'fail' })->wait;
-is_deeply \@results, [[23], [23]], 'right results';
-
-# Nested delays
-$result = undef;
-$delay  = Mojo::IOLoop->delay(
-  sub {
-    my $first  = shift;
-    my $second = Mojo::IOLoop->delay($first->begin);
-    Mojo::IOLoop->next_tick($second->begin);
-    Mojo::IOLoop->next_tick($first->begin);
-    my $end = $second->begin(0);
-    Mojo::IOLoop->next_tick(sub { $end->(1, 2, 3) });
-  },
-  sub {
-    my ($first, @numbers) = @_;
-    $result = \@numbers;
-    my $end = $first->begin;
-    $first->begin->(3, 2, 1);
-    my $end2 = $first->begin(0);
-    my $end3 = $first->begin(0);
-    $end2->(4);
-    $end3->(5, 6);
-    $first->pass(23)->pass(24);
-    $end->(1, 2, 3);
-  },
-  sub {
-    my ($first, @numbers) = @_;
-    push @$result, @numbers;
+    Mojo::IOLoop->next_tick(sub { push @results, $i; $end->() });
   }
-)->wait;
-is_deeply $result, [1, 2, 3, 2, 3, 2, 1, 4, 5, 6, 23, 24], 'right results';
-
-# Exception in first step
-my $failed;
-$result = undef;
-$delay  = Mojo::IOLoop::Delay->new;
-$delay->steps(sub { die 'First step!' }, sub { $result = 'failed' 
})->catch(sub { $failed = shift })->wait;
-like $failed, qr/^First step!/, 'right error';
-ok !$result, 'no result';
-
-# Exception in last step
-$failed = undef;
-$delay  = Mojo::IOLoop::Delay->new;
-$delay->steps(sub { Mojo::IOLoop->next_tick(shift->begin) }, sub { die 'Last 
step!' })->catch(sub { $failed = pop })
-  ->wait;
-like $failed, qr/^Last step!/, 'right error';
-
-# Exception in second step
-($failed, $result) = ();
-$delay = Mojo::IOLoop::Delay->new;
-$delay->steps(
-  sub {
-    my $end = shift->begin;
-    Mojo::IOLoop->next_tick(sub {
-      $result = 'pass';
-      $end->();
-    });
-  },
-  sub { die 'Second step!' },
-  sub { $result = 'failed' }
-);
-$delay->catch(sub { $failed = shift })->wait;
-like $failed, qr/^Second step!/, 'right error';
-is $result,   'pass',            'right result';
-
-# Exception in second step (with active event)
-($failed, $result) = ();
-$delay = Mojo::IOLoop::Delay->new;
-$delay->steps(
-  sub { Mojo::IOLoop->next_tick(shift->begin) },
-  sub {
-    Mojo::IOLoop->next_tick(sub { Mojo::IOLoop->stop });
-    Mojo::IOLoop->next_tick(shift->begin);
-    die 'Second step!';
-  },
-  sub { $result = 'failed' }
-)->catch(sub { $failed = shift });
-Mojo::IOLoop->start;
-like $failed, qr/^Second step!/, 'right error';
-ok !$result, 'no result';
+  my $end  = $delay->begin;
+  my $end2 = $delay->begin;
+  $end->();
+  $end2->();
+  $delay->wait;
+  is_deeply \@results, [1, 1], 'right results';
+};
+
+subtest 'Argument splicing' => sub {
+  my $delay = Mojo::IOLoop::Delay->new;
+  Mojo::IOLoop->next_tick($delay->begin);
+  $delay->begin(1)->(1, 2, 3);
+  $delay->begin(1, 1)->(4, 5, 6);
+  $delay->begin(0, 1)->(7, 8);
+  $delay->begin(2)->(9, 10, 11);
+  $delay->begin(0, 0)->(12, 13);
+  $delay->begin(0, 2)->(14, 15, 16);
+  $delay->begin(2, 5)->(17, 18, 19, 20);
+  my @numbers;
+  $delay->steps(sub { (undef, @numbers) = @_ })->wait;
+  is_deeply \@numbers, [2, 3, 5, 7, 11, 14, 15, 19, 20], 'right values';
+};
+
+subtest 'Steps' => sub {
+  my $result;
+  my $delay = Mojo::IOLoop::Delay->new;
+  $delay->steps(
+    sub {
+      my $delay = shift;
+      my $end   = $delay->begin;
+      $delay->begin->(3, 2, 1);
+      Mojo::IOLoop->next_tick(sub { $end->(1, 2, 3)->pass(5) });
+    },
+    sub {
+      my ($delay, @numbers) = @_;
+      my $end = $delay->begin;
+      Mojo::IOLoop->next_tick(sub { $end->(undef, @numbers, 4) });
+    },
+    sub {
+      my ($delay, @numbers) = @_;
+      $result = \@numbers;
+    }
+  )->wait;
+  is_deeply $result, [2, 3, 2, 1, 4, 5], 'right results';
+};
+
+subtest 'One step' => sub {
+  my $result;
+  my $delay = Mojo::IOLoop::Delay->new;
+  $delay->steps(sub { ++$result });
+  $delay->begin->();
+  is $result, undef, 'no result';
+  Mojo::IOLoop->next_tick($delay->begin);
+  is $result, undef, 'no result';
+  my $end = $delay->begin;
+  Mojo::IOLoop->next_tick(sub { $end->() });
+  is $result, undef, 'no result';
+  $delay->wait;
+  is $result, 1, 'right result';
+};
+
+subtest 'One step (reverse)' => sub {
+  my $result;
+  my $delay = Mojo::IOLoop::Delay->new;
+  my $end   = $delay->begin(0);
+  Mojo::IOLoop->next_tick(sub { $end->(23) });
+  $delay->steps(sub { $result = pop });
+  is $result, undef, 'no result';
+  $delay->wait;
+  is $result, 23, 'right result';
+};
+
+subtest 'End chain after first step' => sub {
+  my $result;
+  my $delay = Mojo::IOLoop::Delay->new;
+  $delay->steps(sub { $result = 'success' }, sub { $result = 'fail' });
+  $delay->wait;
+  is $result, 'success', 'right result';
+};
+
+subtest 'End chain after third step' => sub {
+  my $result;
+  my $delay = Mojo::IOLoop::Delay->new;
+  $delay->steps(
+    sub { Mojo::IOLoop->next_tick(shift->begin) },
+    sub {
+      $result = 'fail';
+      shift->pass;
+    },
+    sub { $result = 'success' },
+    sub { $result = 'fail' }
+  )->wait;
+  is $result, 'success', 'right result';
+};
+
+subtest 'End chain after second step' => sub {
+  my @results;
+  my $delay = Mojo::IOLoop::Delay->new;
+  $delay->then(sub { push @results, [@_] });
+  $delay->steps(sub { shift->pass(23) }, sub { shift; push @results, [@_] }, 
sub { push @results, 'fail' })->wait;
+  is_deeply \@results, [[23], [23]], 'right results';
+};
+
+subtest 'Nested delays' => sub {
+  my $result;
+  my $delay = Mojo::IOLoop->delay(
+    sub {
+      my $first  = shift;
+      my $second = Mojo::IOLoop->delay($first->begin);
+      Mojo::IOLoop->next_tick($second->begin);
+      Mojo::IOLoop->next_tick($first->begin);
+      my $end = $second->begin(0);
+      Mojo::IOLoop->next_tick(sub { $end->(1, 2, 3) });
+    },
+    sub {
+      my ($first, @numbers) = @_;
+      $result = \@numbers;
+      my $end = $first->begin;
+      $first->begin->(3, 2, 1);
+      my $end2 = $first->begin(0);
+      my $end3 = $first->begin(0);
+      $end2->(4);
+      $end3->(5, 6);
+      $first->pass(23)->pass(24);
+      $end->(1, 2, 3);
+    },
+    sub {
+      my ($first, @numbers) = @_;
+      push @$result, @numbers;
+    }
+  )->wait;
+  is_deeply $result, [1, 2, 3, 2, 3, 2, 1, 4, 5, 6, 23, 24], 'right results';
+};
+
+subtest 'Exception in first step' => sub {
+  my ($failed, $result);
+  my $delay = Mojo::IOLoop::Delay->new;
+  $delay->steps(sub { die 'First step!' }, sub { $result = 'failed' 
})->catch(sub { $failed = shift })->wait;
+  like $failed, qr/^First step!/, 'right error';
+  ok !$result, 'no result';
+};
+
+subtest 'Exception in last step' => sub {
+  my $failed;
+  my $delay = Mojo::IOLoop::Delay->new;
+  $delay->steps(sub { Mojo::IOLoop->next_tick(shift->begin) }, sub { die 'Last 
step!' })->catch(sub { $failed = pop })
+    ->wait;
+  like $failed, qr/^Last step!/, 'right error';
+};
+
+subtest 'Exception in second step' => sub {
+  my ($failed, $result);
+  my $delay = Mojo::IOLoop::Delay->new;
+  $delay->steps(
+    sub {
+      my $end = shift->begin;
+      Mojo::IOLoop->next_tick(sub {
+        $result = 'pass';
+        $end->();
+      });
+    },
+    sub { die 'Second step!' },
+    sub { $result = 'failed' }
+  );
+  $delay->catch(sub { $failed = shift })->wait;
+  like $failed, qr/^Second step!/, 'right error';
+  is $result,   'pass',            'right result';
+};
+
+subtest 'Exception in second step (with active event)' => sub {
+  my ($failed, $result);
+  my $delay = Mojo::IOLoop::Delay->new;
+  $delay->steps(
+    sub { Mojo::IOLoop->next_tick(shift->begin) },
+    sub {
+      Mojo::IOLoop->next_tick(sub { Mojo::IOLoop->stop });
+      Mojo::IOLoop->next_tick(shift->begin);
+      die 'Second step!';
+    },
+    sub { $result = 'failed' }
+  )->catch(sub { $failed = shift });
+  Mojo::IOLoop->start;
+  like $failed, qr/^Second step!/, 'right error';
+  ok !$result, 'no result';
+};
 
 done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/t/mojo/home.t 
new/Mojolicious-8.62/t/mojo/home.t
--- old/Mojolicious-8.61/t/mojo/home.t  2020-09-17 13:41:26.000000000 +0200
+++ new/Mojolicious-8.62/t/mojo/home.t  2020-10-10 20:47:16.000000000 +0200
@@ -7,61 +7,57 @@
 use Mojo::HelloWorld;
 use Mojo::Home;
 
-# ENV detection
-{
+subtest 'ENV detection' => sub {
   my $fake = path->to_abs->child('does_not_exist');
   local $ENV{MOJO_HOME} = $fake->to_string;
   my $home = Mojo::Home->new->detect;
   is_deeply $home->to_array, $fake->to_array, 'right path detected';
-}
+};
 
-# Specific class detection
-{
+subtest 'Specific class detection' => sub {
   my $fake = path->to_abs->child('does_not_exist_2');
   local $INC{'My/Class.pm'} = $fake->child('My', 'Class.pm')->to_string;
   my $home = Mojo::Home->new->detect('My::Class');
   is_deeply $home->to_array, $fake->to_array, 'right path detected';
-}
+};
 
-# Specific class detection (with "lib")
-{
+subtest 'Specific class detection (with "lib")' => sub {
   my $fake = path->to_abs->child('does_not_exist_3');
   local $INC{'My/Class.pm'} = $fake->child('lib', 'My', 'Class.pm')->to_string;
   my $home = Mojo::Home->new->detect('My::Class');
   is_deeply $home->to_array, $fake->to_array, 'right path detected';
-}
+};
 
-# Specific class detection (with "blib/lib")
-{
+subtest 'Specific class detection (with "blib/lib")' => sub {
   my $fake = path->to_abs->child('does_not_exist_3');
   local $INC{'My/Class.pm'} = $fake->child('blib', 'lib', 'My', 
'Class.pm')->to_string;
   my $home = Mojo::Home->new->detect('My::Class');
   is_deeply $home->to_array, $fake->to_array, 'right path detected';
-}
+};
 
-# Specific class detection (relative)
-{
+subtest 'Specific class detection (relative)' => sub {
   local $INC{'My/Class.pm'} = path('My', 'Class.pm')->to_string;
   my $home = Mojo::Home->new->detect('My::Class');
   is_deeply $home->to_array, path->to_array, 'right path detected';
-}
+};
 
-# Specific class detection (relative "blib/lib")
-{
+subtest 'Specific class detection (relative "blib/lib")' => sub {
   local $INC{'My/Class.pm'} = path('blib', 'lib', 'My', 'Class.pm')->to_string;
   my $home = Mojo::Home->new->detect('My::Class');
   is_deeply $home->to_array, path->to_array, 'right path detected';
-}
+};
 
-# Current working directory
-my $home = Mojo::Home->new->detect;
-is_deeply $home->to_array, path->to_abs->to_array, 'right path detected';
-
-# Path generation
-$home = Mojo::Home->new(curfile->dirname);
-my $path = curfile->dirname;
-is $home->rel_file('foo.txt'), $path->child('foo.txt'), 'right path';
-is $home->rel_file('foo/bar.txt'), $path->child('foo', 'bar.txt'), 'right 
path';
-is $home->rel_file('foo/bar.txt')->basename, 'bar.txt', 'right result';
+subtest 'Current working directory' => sub {
+  my $home = Mojo::Home->new->detect;
+  is_deeply $home->to_array, path->to_abs->to_array, 'right path detected';
+};
+
+subtest 'Path generation' => sub {
+  my $home = Mojo::Home->new(curfile->dirname);
+  my $path = curfile->dirname;
+  is $home->rel_file('foo.txt'), $path->child('foo.txt'), 'right path';
+  is $home->rel_file('foo/bar.txt'), $path->child('foo', 'bar.txt'), 'right 
path';
+  is $home->rel_file('foo/bar.txt')->basename, 'bar.txt', 'right result';
+};
 
 done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/t/mojo/reactor_detect.t 
new/Mojolicious-8.62/t/mojo/reactor_detect.t
--- old/Mojolicious-8.61/t/mojo/reactor_detect.t        2020-09-17 
13:41:30.000000000 +0200
+++ new/Mojolicious-8.62/t/mojo/reactor_detect.t        2020-10-11 
03:15:26.000000000 +0200
@@ -11,23 +11,20 @@
 
 package main;
 
-# Detection (success)
-{
+subtest 'Detection (success)' => sub {
   local $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Test';
   is(Mojo::Reactor->detect, 'Mojo::Reactor::Test', 'right class');
-}
+};
 
-# Detection (fail)
-{
+subtest 'Detection (fail)' => sub {
   local $ENV{MOJO_REACTOR} = 'Mojo::Reactor::DoesNotExist';
   is(Mojo::Reactor->detect, 'Mojo::Reactor::Poll', 'right class');
-}
+};
 
-# Event loop detection
-{
+subtest 'Event loop detection' => sub {
   local $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Test';
   require Mojo::IOLoop;
   is ref Mojo::IOLoop->new->reactor, 'Mojo::Reactor::Test', 'right class';
-}
+};
 
 done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/t/mojo/signatures.t 
new/Mojolicious-8.62/t/mojo/signatures.t
--- old/Mojolicious-8.61/t/mojo/signatures.t    2020-09-17 13:41:26.000000000 
+0200
+++ new/Mojolicious-8.62/t/mojo/signatures.t    2020-10-11 03:15:23.000000000 
+0200
@@ -16,16 +16,19 @@
 
 package main;
 
-# Basics
-my $test = MojoSignatureBaseTest->new;
-is($test->foo(23, 24), 47, 'right result');
+subtest 'Basics' => sub {
+  my $test = MojoSignatureBaseTest->new;
+  is($test->foo(23, 24), 47, 'right result');
+};
 
-# Random order flags
-my $test2 = MojoSignatureBaseTest2->new;
-is($test2->foo(26, 24), 2, 'right result');
+subtest 'Random order flags' => sub {
+  my $test2 = MojoSignatureBaseTest2->new;
+  is($test2->foo(26, 24), 2, 'right result');
+};
 
-# Bad flag
-eval "package MojoSignaturesTest3; use Mojo::Base -unsupported";
-like $@, qr/Unsupported flag: -unsupported/, 'right error';
+subtest 'Bad flag' => sub {
+  eval "package MojoSignaturesTest3; use Mojo::Base -unsupported";
+  like $@, qr/Unsupported flag: -unsupported/, 'right error';
+};
 
 done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-8.61/t/mojolicious/commands.t 
new/Mojolicious-8.62/t/mojolicious/commands.t
--- old/Mojolicious-8.61/t/mojolicious/commands.t       2020-09-17 
13:41:40.000000000 +0200
+++ new/Mojolicious-8.62/t/mojolicious/commands.t       2020-10-10 
17:08:01.000000000 +0200
@@ -181,12 +181,28 @@
   $get->run('/json', '/works');
 }
 like $buffer, qr/too/, 'right output';
+$buffer = '';
+{
+  open my $handle, '>', \$buffer;
+  local *STDERR = $handle;
+  eval { $get->run('--unknown') };
+  like $@, qr/Usage: APPLICATION get/, 'unknown option';
+}
+like $buffer, qr/Unknown option: unknown/, 'right output';
 
 # cgi
 require Mojolicious::Command::cgi;
 my $cgi = Mojolicious::Command::cgi->new;
 ok $cgi->description, 'has a description';
 like $cgi->usage, qr/cgi/, 'has usage information';
+$buffer = '';
+{
+  open my $handle, '>', \$buffer;
+  local *STDERR = $handle;
+  eval { $cgi->run('--unknown') };
+  like $@, qr/Usage: APPLICATION cgi/, 'unknown option';
+}
+like $buffer, qr/Unknown option: unknown/, 'right output';
 
 # cpanify
 require Mojolicious::Command::Author::cpanify;
@@ -208,12 +224,28 @@
   $cpanify->run('-u', 'sri', '-p', 's3cret', __FILE__);
 }
 like $buffer, qr/Upload successful!/, 'right output';
+$buffer = '';
+{
+  open my $handle, '>', \$buffer;
+  local *STDERR = $handle;
+  eval { $cpanify->run('--unknown') };
+  like $@, qr/Usage: APPLICATION cpanify/, 'unknown option';
+}
+like $buffer, qr/Unknown option: unknown/, 'right output';
 
 # daemon
 require Mojolicious::Command::daemon;
 my $daemon = Mojolicious::Command::daemon->new;
 ok $daemon->description, 'has a description';
 like $daemon->usage, qr/daemon/, 'has usage information';
+$buffer = '';
+{
+  open my $handle, '>', \$buffer;
+  local *STDERR = $handle;
+  eval { $daemon->run('--unknown') };
+  like $@, qr/Usage: APPLICATION daemon/, 'unknown option';
+}
+like $buffer, qr/Unknown option: unknown/, 'right output';
 
 # eval
 require Mojolicious::Command::eval;
@@ -238,6 +270,14 @@
 like $buffer, qr/Zoidberg/, 'right output';
 eval { $eval->run('-v', 'Mojo::Promise->new->reject("DOOM")') };
 like $@, qr/DOOM/, 'right output';
+$buffer = '';
+{
+  open my $handle, '>', \$buffer;
+  local *STDERR = $handle;
+  eval { $eval->run('--unknown') };
+  like $@, qr/Usage: APPLICATION eval/, 'unknown option';
+}
+like $buffer, qr/Unknown option: unknown/, 'right output';
 
 # generate
 require Mojolicious::Command::Author::generate;
@@ -341,6 +381,14 @@
 ok -e $app->rel_file('MyApp-Ext-Test/lib/MyApp/Ext/Test.pm'), 'class exists';
 ok -e $app->rel_file('MyApp-Ext-Test/t/basic.t'),             'test exists';
 ok -e $app->rel_file('MyApp-Ext-Test/Makefile.PL'),           'Makefile.PL 
exists';
+$buffer = '';
+{
+  open my $handle, '>', \$buffer;
+  local *STDERR = $handle;
+  eval { $plugin->run('--unknown') };
+  like $@, qr/Usage: APPLICATION generate plugin/, 'unknown option';
+}
+like $buffer, qr/Unknown option: unknown/, 'right output';
 chdir $cwd;
 
 # inflate
@@ -354,6 +402,14 @@
 my $prefork = Mojolicious::Command::prefork->new;
 ok $prefork->description, 'has a description';
 like $prefork->usage, qr/prefork/, 'has usage information';
+$buffer = '';
+{
+  open my $handle, '>', \$buffer;
+  local *STDERR = $handle;
+  eval { $prefork->run('--unknown') };
+  like $@, qr/Usage: APPLICATION prefork/, 'unknown option';
+}
+like $buffer, qr/Unknown option: unknown/, 'right output';
 
 # psgi
 require Mojolicious::Command::psgi;
@@ -382,6 +438,14 @@
 }
 like $buffer, qr!/\*whatever!, 'right output';
 like $buffer, qr!/\(\.\+\)\?!, 'verbose';
+$buffer = '';
+{
+  open my $handle, '>', \$buffer;
+  local *STDERR = $handle;
+  eval { $routes->run('--unknown') };
+  like $@, qr/Usage: APPLICATION routes/, 'unknown option';
+}
+like $buffer, qr/Unknown option: unknown/, 'right output';
 
 # version
 require Mojolicious::Command::version;


Reply via email to