Hello community,

here is the log from the commit of package perl-Mojolicious for 
openSUSE:Factory checked in at 2015-12-03 13:31:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Mojolicious.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojolicious"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes        
2015-11-22 11:03:03.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes   
2015-12-03 13:31:06.000000000 +0100
@@ -1,0 +2,12 @@
+Sat Nov 28 09:52:46 UTC 2015 - [email protected]
+
+- updated to 6.33
+   see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+  6.33  2015-11-22
+    - Updated IO::Socket::IP requirement to 0.37 for certain bug fixes.
+    - Improved renderer not to require a return value from handlers.
+    - Improved helper method in Mojolicious to replace already existing helpers
+      silently.
+
+-------------------------------------------------------------------

Old:
----
  Mojolicious-6.32.tar.gz

New:
----
  Mojolicious-6.33.tar.gz

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

Other differences:
------------------
++++++ perl-Mojolicious.spec ++++++
--- /var/tmp/diff_new_pack.5RX8J0/_old  2015-12-03 13:31:07.000000000 +0100
+++ /var/tmp/diff_new_pack.5RX8J0/_new  2015-12-03 13:31:07.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Mojolicious
-Version:        6.32
+Version:        6.33
 Release:        0
 %define cpan_name Mojolicious
 Summary:        Real-time web framework
@@ -30,11 +30,11 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
-BuildRequires:  perl(IO::Socket::IP) >= 0.26
+BuildRequires:  perl(IO::Socket::IP) >= 0.37
 BuildRequires:  perl(JSON::PP) >= 2.27103
 BuildRequires:  perl(Pod::Simple) >= 3.09
 BuildRequires:  perl(Time::Local) >= 1.2
-Requires:       perl(IO::Socket::IP) >= 0.26
+Requires:       perl(IO::Socket::IP) >= 0.37
 Requires:       perl(JSON::PP) >= 2.27103
 Requires:       perl(Pod::Simple) >= 3.09
 Requires:       perl(Time::Local) >= 1.2

++++++ Mojolicious-6.32.tar.gz -> Mojolicious-6.33.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/Changes new/Mojolicious-6.33/Changes
--- old/Mojolicious-6.32/Changes        2015-11-18 05:48:29.000000000 +0100
+++ new/Mojolicious-6.33/Changes        2015-11-22 00:10:36.000000000 +0100
@@ -1,4 +1,10 @@
 
+6.33  2015-11-22
+  - Updated IO::Socket::IP requirement to 0.37 for certain bug fixes.
+  - Improved renderer not to require a return value from handlers.
+  - Improved helper method in Mojolicious to replace already existing helpers
+    silently.
+
 6.32  2015-11-18
   - Deprecated Mojolicious::Routes::Pattern::format_regex.
   - Added support for new HTTP status code.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/META.json 
new/Mojolicious-6.33/META.json
--- old/Mojolicious-6.32/META.json      2015-11-18 19:15:02.000000000 +0100
+++ new/Mojolicious-6.33/META.json      2015-11-22 17:46:23.000000000 +0100
@@ -34,7 +34,7 @@
       },
       "runtime" : {
          "requires" : {
-            "IO::Socket::IP" : "0.26",
+            "IO::Socket::IP" : "0.37",
             "JSON::PP" : "2.27103",
             "Pod::Simple" : "3.09",
             "Time::Local" : "1.2",
@@ -58,5 +58,5 @@
       },
       "x_IRC" : "irc://irc.perl.org/#mojo"
    },
-   "version" : "6.32"
+   "version" : "6.33"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/META.yml 
new/Mojolicious-6.33/META.yml
--- old/Mojolicious-6.32/META.yml       2015-11-18 19:15:02.000000000 +0100
+++ new/Mojolicious-6.33/META.yml       2015-11-22 17:46:23.000000000 +0100
@@ -20,7 +20,7 @@
     - examples
     - t
 requires:
-  IO::Socket::IP: '0.26'
+  IO::Socket::IP: '0.37'
   JSON::PP: '2.27103'
   Pod::Simple: '3.09'
   Time::Local: '1.2'
@@ -31,4 +31,4 @@
   homepage: http://mojolicio.us
   license: http://www.opensource.org/licenses/artistic-license-2.0
   repository: https://github.com/kraih/mojo.git
-version: '6.32'
+version: '6.33'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/Makefile.PL 
new/Mojolicious-6.33/Makefile.PL
--- old/Mojolicious-6.32/Makefile.PL    2015-10-08 18:54:16.000000000 +0200
+++ new/Mojolicious-6.33/Makefile.PL    2015-11-18 22:46:43.000000000 +0100
@@ -8,7 +8,7 @@
 # Pod::Simple 3.09 first shipped with Perl 5.11.2
 # JSON::PP 2.27103 first shipped with Perl 5.13.9
 # Time::Local 1.2 first shipped with Perl 5.13.9
-# IO::Socket::IP 0.26 first shipped with Perl 5.19.8
+# IO::Socket::IP 0.37 first shipped with Perl 5.21.11
 WriteMakefile(
   NAME         => 'Mojolicious',
   VERSION_FROM => 'lib/Mojolicious.pm',
@@ -33,7 +33,7 @@
     },
   },
   PREREQ_PM => {
-    'IO::Socket::IP' => '0.26',
+    'IO::Socket::IP' => '0.37',
     'JSON::PP'       => '2.27103',
     'Pod::Simple'    => '3.09',
     'Time::Local'    => '1.2'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/README.md 
new/Mojolicious-6.33/README.md
--- old/Mojolicious-6.32/README.md      2015-11-14 20:54:51.000000000 +0100
+++ new/Mojolicious-6.33/README.md      2015-11-19 03:17:10.000000000 +0100
@@ -19,7 +19,7 @@
       detection, first class Unicode support and much more for you to
       discover.
   * Very clean, portable and object-oriented pure-Perl API with no hidden
-    magic and no requirements besides Perl 5.20.0 (versions as old as 5.10.1
+    magic and no requirements besides Perl 5.22.0 (versions as old as 5.10.1
     can be used too, but may require additional CPAN modules to be installed)
   * Full stack HTTP and WebSocket client/server implementation with IPv6, TLS,
     SNI, IDNA, HTTP/SOCKS5 proxy, Comet (long polling), keep-alive, connection
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojo/DOM.pm 
new/Mojolicious-6.33/lib/Mojo/DOM.pm
--- old/Mojolicious-6.32/lib/Mojo/DOM.pm        2015-11-17 05:42:05.000000000 
+0100
+++ new/Mojolicious-6.33/lib/Mojo/DOM.pm        2015-11-21 23:35:35.000000000 
+0100
@@ -209,7 +209,7 @@
 sub _ancestors {
   my ($self, $root) = @_;
 
-  return unless my $tree = $self->_parent;
+  return () unless my $tree = $self->_parent;
   my @ancestors;
   do { push @ancestors, $tree }
     while ($tree->[0] eq 'tag') && ($tree = $tree->[3]);
@@ -265,7 +265,7 @@
 sub _maybe { $_[1] ? $_[0]->_build($_[1], $_[0]->xml) : undef }
 
 sub _nodes {
-  return unless my $tree = shift;
+  return () unless my $tree = shift;
   my @nodes = @$tree[_start($tree) .. $#$tree];
   return shift() ? grep { $_->[0] eq 'tag' } @nodes : @nodes;
 }
@@ -533,8 +533,8 @@
   my $result = $dom->at('div ~ p');
 
 Find first descendant element of this element matching the CSS selector and
-return it as a L<Mojo::DOM> object or return C<undef> if none could be found.
-All selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
+return it as a L<Mojo::DOM> object, or C<undef> if none could be found. All
+selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
 
   # Find first element with "svg" namespace definition
   my $namespace = $dom->at('[xmlns\:svg]')->{'xmlns:svg'};
@@ -690,7 +690,7 @@
 
   my $namespace = $dom->namespace;
 
-Find this element's namespace or return C<undef> if none could be found.
+Find this element's namespace, or return C<undef> if none could be found.
 
   # Find namespace for an element with namespace prefix
   my $namespace = $dom->at('svg > svg\:circle')->namespace;
@@ -710,7 +710,7 @@
 
   my $sibling = $dom->next;
 
-Return L<Mojo::DOM> object for next sibling element or C<undef> if there are no
+Return L<Mojo::DOM> object for next sibling element, or C<undef> if there are 
no
 more siblings.
 
   # "<h2>123</h2>"
@@ -720,7 +720,7 @@
 
   my $sibling = $dom->next_node;
 
-Return L<Mojo::DOM> object for next sibling node or C<undef> if there are no
+Return L<Mojo::DOM> object for next sibling node, or C<undef> if there are no
 more siblings.
 
   # "456"
@@ -735,7 +735,7 @@
 
   my $parent = $dom->parent;
 
-Return L<Mojo::DOM> object for parent of this node or C<undef> if this node has
+Return L<Mojo::DOM> object for parent of this node, or C<undef> if this node 
has
 no parent.
 
   # "<b><i>Test</i></b>"
@@ -808,7 +808,7 @@
 
   my $sibling = $dom->previous;
 
-Return L<Mojo::DOM> object for previous sibling element or C<undef> if there
+Return L<Mojo::DOM> object for previous sibling element, or C<undef> if there
 are no more siblings.
 
   # "<h1>Test</h1>"
@@ -818,7 +818,7 @@
 
   my $sibling = $dom->previous_node;
 
-Return L<Mojo::DOM> object for previous sibling node or C<undef> if there are
+Return L<Mojo::DOM> object for previous sibling node, or C<undef> if there are
 no more siblings.
 
   # "123"
@@ -954,9 +954,9 @@
   my $value = $dom->val;
 
 Extract value from form element (such as C<button>, C<input>, C<option>,
-C<select> and C<textarea>) or return C<undef> if this element has no value. In
+C<select> and C<textarea>), or return C<undef> if this element has no value. In
 the case of C<select> with C<multiple> attribute, find C<option> elements with
-C<selected> attribute and return an array reference with all values or C<undef>
+C<selected> attribute and return an array reference with all values, or 
C<undef>
 if none could be found.
 
   # "a"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojo/Loader.pm 
new/Mojolicious-6.33/lib/Mojo/Loader.pm
--- old/Mojolicious-6.32/lib/Mojo/Loader.pm     2015-11-17 05:42:09.000000000 
+0100
+++ new/Mojolicious-6.33/lib/Mojo/Loader.pm     2015-11-22 02:35:47.000000000 
+0100
@@ -172,8 +172,10 @@
 
   my $e = load_class 'Foo::Bar';
 
-Load a class and catch exceptions. Note that classes are checked for a C<new>
-method to see if they are already loaded.
+Load a class and catch exceptions, returns a false value if loading was
+successful, a true value if the class has already been loaded, or a
+L<Mojo::Exception> object if loading failed. Note that classes are checked for 
a
+C<new> method to see if they are already loaded.
 
   # Handle exceptions
   if (my $e = load_class 'Foo::Bar') {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojo/Server/Daemon.pm 
new/Mojolicious-6.33/lib/Mojo/Server/Daemon.pm
--- old/Mojolicious-6.32/lib/Mojo/Server/Daemon.pm      2015-11-17 
05:42:13.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojo/Server/Daemon.pm      2015-11-21 
00:56:42.000000000 +0100
@@ -228,18 +228,11 @@
   my $stream = $self->ioloop->stream($id)->write($chunk);
 
   # Finish or continue writing
+  my $next = '_write';
+  $tx->has_subscribers('finish') ? ($next = '_finish') : $self->_finish($id)
+    if $tx->is_finished;
   weaken $self;
-  my $cb = sub { $self->_write($id) };
-  if ($tx->is_finished) {
-    if ($tx->has_subscribers('finish')) {
-      $cb = sub { $self->_finish($id) }
-    }
-    else {
-      $self->_finish($id);
-      return unless $c->{tx};
-    }
-  }
-  $stream->write('' => $cb);
+  $stream->write('' => sub { $self->$next($id) });
 }
 
 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojo/Server/Morbo.pm 
new/Mojolicious-6.33/lib/Mojo/Server/Morbo.pm
--- old/Mojolicious-6.32/lib/Mojo/Server/Morbo.pm       2015-11-17 
05:42:14.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojo/Server/Morbo.pm       2015-11-21 
17:56:07.000000000 +0100
@@ -167,7 +167,7 @@
   my $file = $morbo->check;
 
 Check if file from L</"watch"> has been modified since last check and return
-its name or C<undef> if there have been no changes.
+its name, or C<undef> if there have been no changes.
 
 =head2 run
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojo/Template.pm 
new/Mojolicious-6.33/lib/Mojo/Template.pm
--- old/Mojolicious-6.32/lib/Mojo/Template.pm   2015-11-17 05:42:15.000000000 
+0100
+++ new/Mojolicious-6.33/lib/Mojo/Template.pm   2015-11-22 02:36:07.000000000 
+0100
@@ -619,16 +619,18 @@
 
 =head2 compile
 
-  my $exception = $mt->compile;
+  my $e = $mt->compile;
 
-Compile Perl L</"code"> for template.
+Compile Perl L</"code"> for template and return a L<Mojo::Exception> object, or
+C<undef> if there was no exception.
 
 =head2 interpret
 
   my $output = $mt->interpret;
   my $output = $mt->interpret(@args);
 
-Interpret L</"compiled"> template code.
+Interpret L</"compiled"> template code and return the result, or a
+L<Mojo::Exception> object if rendering failed.
 
   # Reuse template
   say $mt->render('Hello <%= $_[0] %>!', 'Bender');
@@ -646,7 +648,8 @@
   my $output = $mt->render('<%= 1 + 1 %>');
   my $output = $mt->render('<%= shift() + shift() %>', @args);
 
-Render template.
+Render template and return the result, or a L<Mojo::Exception> object if
+rendering failed.
 
   say $mt->render('Hello <%= $_[0] %>!', 'Bender');
 
@@ -655,7 +658,8 @@
   my $output = $mt->render_file('/tmp/foo.mt');
   my $output = $mt->render_file('/tmp/foo.mt', @args);
 
-Render template file.
+Render template file and return the result, or a L<Mojo::Exception> object if
+rendering failed.
 
 =head1 DEBUGGING
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojo/UserAgent/Transactor.pm 
new/Mojolicious-6.33/lib/Mojo/UserAgent/Transactor.pm
--- old/Mojolicious-6.32/lib/Mojo/UserAgent/Transactor.pm       2015-11-17 
05:42:18.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojo/UserAgent/Transactor.pm       2015-11-20 
00:08:51.000000000 +0100
@@ -326,7 +326,7 @@
 
   $t = $t->add_generator(foo => sub {...});
 
-Register a new content generator.
+Register a content generator.
 
 =head2 endpoint
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojo/Util.pm 
new/Mojolicious-6.33/lib/Mojo/Util.pm
--- old/Mojolicious-6.32/lib/Mojo/Util.pm       2015-11-17 05:42:19.000000000 
+0100
+++ new/Mojolicious-6.33/lib/Mojo/Util.pm       2015-11-21 17:59:06.000000000 
+0100
@@ -549,7 +549,7 @@
 
   my $chars = decode 'UTF-8', $bytes;
 
-Decode bytes to characters and return C<undef> if decoding failed.
+Decode bytes to characters, or return C<undef> if decoding failed.
 
 =head2 deprecated
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojolicious/Command/eval.pm 
new/Mojolicious-6.33/lib/Mojolicious/Command/eval.pm
--- old/Mojolicious-6.32/lib/Mojolicious/Command/eval.pm        2015-11-17 
05:42:21.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Command/eval.pm        2015-11-19 
22:14:08.000000000 +0100
@@ -33,6 +33,7 @@
   Usage: APPLICATION eval [OPTIONS] CODE
 
     ./myapp.pl eval 'say app->ua->get("/")->res->body'
+    ./myapp.pl eval 'say for sort keys %{app->renderer->helpers}'
     ./myapp.pl eval -v 'app->home'
     ./myapp.pl eval -V 'app->renderer->paths'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojolicious/Commands.pm 
new/Mojolicious-6.33/lib/Mojolicious/Commands.pm
--- old/Mojolicious-6.32/lib/Mojolicious/Commands.pm    2015-11-18 
07:37:57.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Commands.pm    2015-11-21 
17:57:19.000000000 +0100
@@ -302,7 +302,7 @@
 
   my $env = $commands->detect;
 
-Try to detect environment or return C<undef> if none could be detected.
+Try to detect environment, or return C<undef> if none could be detected.
 
 =head2 run
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojolicious/Guides/Cookbook.pod 
new/Mojolicious-6.33/lib/Mojolicious/Guides/Cookbook.pod
--- old/Mojolicious-6.32/lib/Mojolicious/Guides/Cookbook.pod    2015-11-01 
04:36:26.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Guides/Cookbook.pod    2015-11-22 
07:27:06.000000000 +0100
@@ -158,8 +158,8 @@
   $ ./script/my_app prefork -P /tmp/first.pid -l http://*:8080?reuse=1
   Server available at http://127.0.0.1:8080
 
-All you have to do is start a second web server listening to the same port and
-stop the first web server gracefully afterwards.
+All you have to do, is to start a second web server listening to the same port,
+and stop the first web server gracefully afterwards.
 
   $ ./script/my_app prefork -P /tmp/second.pid -l http://*:8080?reuse=1
   Server available at http://127.0.0.1:8080
@@ -986,7 +986,7 @@
 
   use Mojo::UserAgent;
 
-  # Lets fetch the latest Mojolicious tarball
+  # Fetch the latest Mojolicious tarball
   my $ua = Mojo::UserAgent->new(max_redirects => 5);
   my $tx = $ua->get('https://www.github.com/kraih/mojo/tarball/master');
   $tx->res->content->asset->move_to('mojo.tar.gz');
@@ -1388,6 +1388,7 @@
 
   $ mojo generate lite_app myapp.pl
   $ ./myapp.pl eval 'say for @{app->static->paths}'
+  $ ./myapp.pl eval 'say for sort keys %{app->renderer->helpers}'
 
 The C<verbose> options will automatically print the return value or returned
 data structure to C<STDOUT>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojolicious/Guides/Growing.pod 
new/Mojolicious-6.33/lib/Mojolicious/Guides/Growing.pod
--- old/Mojolicious-6.32/lib/Mojolicious/Guides/Growing.pod     2015-10-06 
11:40:40.000000000 +0200
+++ new/Mojolicious-6.33/lib/Mojolicious/Guides/Growing.pod     2015-11-18 
19:29:05.000000000 +0100
@@ -202,7 +202,7 @@
 Just save your changes and they will be automatically in effect the next time
 you refresh your browser.
 
-=head2 A birds-eye view
+=head2 A bird's-eye view
 
 It all starts with an HTTP request like this, sent by your browser.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-6.32/lib/Mojolicious/Guides/Rendering.pod 
new/Mojolicious-6.33/lib/Mojolicious/Guides/Rendering.pod
--- old/Mojolicious-6.32/lib/Mojolicious/Guides/Rendering.pod   2015-11-10 
14:55:24.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Guides/Rendering.pod   2015-11-22 
07:48:08.000000000 +0100
@@ -947,9 +947,9 @@
 =head2 Cross-site request forgery
 
 CSRF is a very common attack on web applications that trick your logged in
-users to submit forms they did not intend to send. All you have to do to
+users to submit forms they did not intend to send. All you have to do, to
 protect your users from this, is to add an additional hidden field to your
-forms with L<Mojolicious::Plugin::TagHelpers/"csrf_field"> and validate it with
+forms with L<Mojolicious::Plugin::TagHelpers/"csrf_field">, and validate it 
with
 L<Mojolicious::Validator::Validation/"csrf_protect">.
 
   use Mojolicious::Lite;
@@ -1373,8 +1373,8 @@
 =head2 Adding your favorite template system
 
 Maybe you would prefer a different template system than C<ep>, and there is not
-already a plugin on CPAN for your favorite one, all you have to do is add a new
-C<handler> with L<Mojolicious::Renderer/"add_handler"> when C<register> is
+already a plugin on CPAN for your favorite one. All you have to do, is to add a
+new C<handler> with L<Mojolicious::Renderer/"add_handler"> when C<register> is
 called.
 
   package Mojolicious::Plugin::MyRenderer;
@@ -1388,43 +1388,46 @@
       my ($renderer, $c, $output, $options) = @_;
 
       # Check for one-time use inline template
-      my $inline = $options->{inline};
+      my $inline_template = $options->{inline};
 
-      # Check for absolute template path
-      my $path = $renderer->template_path($options);
+      # Check for appropriate template in "templates" directories
+      my $template_path = $renderer->template_path($options);
 
-      # Check for appropriate template in DATA section
-      my $data = $renderer->get_data_template($options);
+      # Check for appropriate template in DATA sections
+      my $data_template = $renderer->get_data_template($options);
 
       # This part is up to you and your template system :)
       ...
 
-      # Just die if an error occurs
-      die 'Something went wrong with the template';
-
-      # Or pass the rendered result back to the renderer
+      # Pass the rendered result back to the renderer
       $$output = 'Hello World!';
 
-      # And return true if something has been rendered or false otherwise
-      return 1;
+      # Or just die if an error occurs
+      die 'Something went wrong with the template';
     });
   }
 
   1;
 
-Since most template systems don't support templates in the C<DATA> section, the
-renderer provides methods to help you with that.
+An C<inline> template, if provided by the user, will be passed along with the
+options. You can use L<Mojolicious::Renderer/"template_path"> to search the
+C<templates> directories of the application, and
+L<Mojolicious::Renderer/"get_data_template"> to search the C<DATA> sections.
 
   use Mojolicious::Lite;
 
   plugin 'MyRenderer';
 
-  get '/' => 'index';
+  # Render an inline template
+  get '/inline' => {inline => '...', handler => 'mine'};
+
+  # Render a template from the DATA section
+  get '/data' => {template => 'test'};
 
   app->start;
   __DATA__
 
-  @@ index.html.mine
+  @@ test.html.mine
   ...
 
 =head2 Adding a handler to generate binary data
@@ -1445,8 +1448,6 @@
 
     # Encode data from stash value
     $$output = nfreeze delete $c->stash->{storable};
-
-    return 1;
   });
 
   # Set "handler" value automatically if "storable" value is set already
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-6.32/lib/Mojolicious/Plugin/EPLRenderer.pm 
new/Mojolicious-6.33/lib/Mojolicious/Plugin/EPLRenderer.pm
--- old/Mojolicious-6.32/lib/Mojolicious/Plugin/EPLRenderer.pm  2015-11-17 
05:42:27.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Plugin/EPLRenderer.pm  2015-11-22 
00:01:31.000000000 +0100
@@ -21,7 +21,7 @@
   else {
     my $inline = $options->{inline};
     my $name = defined $inline ? md5_sum encode('UTF-8', $inline) : undef;
-    return undef unless defined($name //= $renderer->template_name($options));
+    return unless defined($name //= $renderer->template_name($options));
 
     # Inline
     if (defined $inline) {
@@ -47,12 +47,12 @@
       }
 
       # No template
-      else { $log->debug(qq{Template "$name" not found}) and return undef }
+      else { $log->debug(qq{Template "$name" not found}) }
     }
   }
 
-  # Exception or success
-  return ref $$output ? die $$output : 1;
+  # Exception
+  die $$output if ref $$output;
 }
 
 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-6.32/lib/Mojolicious/Plugin/EPRenderer.pm 
new/Mojolicious-6.33/lib/Mojolicious/Plugin/EPRenderer.pm
--- old/Mojolicious-6.32/lib/Mojolicious/Plugin/EPRenderer.pm   2015-11-17 
05:42:27.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Plugin/EPRenderer.pm   2015-11-22 
00:00:37.000000000 +0100
@@ -20,7 +20,7 @@
       my ($renderer, $c, $output, $options) = @_;
 
       my $name = $options->{inline} // $renderer->template_name($options);
-      return undef unless defined $name;
+      return unless defined $name;
       my @keys = sort grep {/^\w+$/} keys %{$c->stash};
       my $key = md5_sum encode 'UTF-8', join(',', $name, @keys);
 
@@ -47,7 +47,7 @@
       local *{"${ns}::_C"} = sub {$c};
 
       # Render with "epl" handler
-      return $renderer->handlers->{epl}($renderer, $c, $output, $options);
+      $renderer->handlers->{epl}($renderer, $c, $output, $options);
     }
   );
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-6.32/lib/Mojolicious/Plugin/PODRenderer.pm 
new/Mojolicious-6.33/lib/Mojolicious/Plugin/PODRenderer.pm
--- old/Mojolicious-6.32/lib/Mojolicious/Plugin/PODRenderer.pm  2015-11-17 
05:42:28.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Plugin/PODRenderer.pm  2015-11-22 
00:00:16.000000000 +0100
@@ -16,12 +16,8 @@
   $app->renderer->add_handler(
     $conf->{name} || 'pod' => sub {
       my ($renderer, $c, $output, $options) = @_;
-
-      # Preprocess and render
-      my $handler = $renderer->handlers->{$preprocess};
-      return undef unless $handler->($renderer, $c, $output, $options);
-      $$output = _pod_to_html($$output);
-      return 1;
+      $renderer->handlers->{$preprocess}($renderer, $c, $output, $options);
+      $$output = _pod_to_html($$output) if defined $$output;
     }
   );
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojolicious/Renderer.pm 
new/Mojolicious-6.33/lib/Mojolicious/Renderer.pm
--- old/Mojolicious-6.32/lib/Mojolicious/Renderer.pm    2015-11-18 
07:33:29.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Renderer.pm    2015-11-22 
00:32:45.000000000 +0100
@@ -129,7 +129,7 @@
   # Template or templateless handler
   else {
     $options->{template} ||= $self->template_for($c);
-    return unless $self->_render_template($c, \$output, $options);
+    return () unless $self->_render_template($c, \$output, $options);
   }
 
   # Inheritance
@@ -138,7 +138,8 @@
   while ((my $next = _next($stash)) && !defined $inline) {
     @$options{qw(handler template)} = ($stash->{handler}, $next);
     $options->{format} = $stash->{format} || $self->default_format;
-    $self->_render_template($c, \$output, $options);
+    my $layout;
+    $output = $layout if $self->_render_template($c, \$layout, $options);
     $content->{content} = $output
       if $content->{content} !~ /\S/ && $output =~ /\S/;
   }
@@ -234,16 +235,13 @@
 sub _render_template {
   my ($self, $c, $output, $options) = @_;
 
-  # Find handler and render
   my $handler = $options->{handler} ||= $self->template_handler($options);
   return undef unless $handler;
-  if (my $renderer = $self->handlers->{$handler}) {
-    return 1 if $renderer->($self, $c, $output, $options);
-  }
+  $c->app->log->error(qq{No handler for "$handler" available}) and return undef
+    unless my $renderer = $self->handlers->{$handler};
 
-  # No handler
-  else { $c->app->log->error(qq{No handler for "$handler" available}) }
-  return undef;
+  $renderer->($self, $c, $output, $options);
+  return 1 if defined $$output;
 }
 
 1;
@@ -372,13 +370,13 @@
 
   $renderer = $renderer->add_handler(epl => sub {...});
 
-Register a new handler.
+Register a handler.
 
 =head2 add_helper
 
   $renderer = $renderer->add_helper(url_for => sub {...});
 
-Register a new helper.
+Register a helper.
 
 =head2 get_data_template
 
@@ -388,15 +386,15 @@
     handler        => 'epl'
   });
 
-Get a C<DATA> section template from L</"classes"> for an options hash reference
-with C<template>, C<format>, C<variant> and C<handler> values, usually used by
-handlers.
+Return a C<DATA> section template from L</"classes"> for an options hash
+reference with C<template>, C<format>, C<variant> and C<handler> values, or
+C<undef> if no template could be found, usually used by handlers.
 
 =head2 get_helper
 
   my $helper = $renderer->get_helper('url_for');
 
-Get a helper by full name, generate a helper dynamically for a prefix or return
+Get a helper by full name, generate a helper dynamically for a prefix, or 
return
 C<undef> if no helper or prefix could be found. Generated helpers return a
 proxy object containing the current controller object and on which nested
 helpers can be called.
@@ -415,7 +413,8 @@
 
   my $name = $renderer->template_for(Mojolicious::Controller->new);
 
-Generate default template name for L<Mojolicious::Controller> object.
+Return default template name for L<Mojolicious::Controller> object, or C<undef>
+if no name could be generated.
 
 =head2 template_handler
 
@@ -424,8 +423,8 @@
     format   => 'html'
   });
 
-Detect handler for an options hash reference with C<template>, C<format> and
-C<variant> values.
+Return handler for an options hash reference with C<template>, C<format> and
+C<variant> values, or C<undef> if no handler could be found.
 
 =head2 template_name
 
@@ -435,8 +434,9 @@
     handler  => 'epl'
   });
 
-Build a template name for an options hash reference with C<template>, 
C<format>,
-C<variant> and C<handler> values, usually used by handlers.
+Return a template name for an options hash reference with C<template>,
+C<format>, C<variant> and C<handler> values, or C<undef> if no template could 
be
+found, usually used by handlers.
 
 =head2 template_path
 
@@ -446,8 +446,9 @@
     handler  => 'epl'
   });
 
-Build a full template path for an options hash reference with C<template>,
-C<format>, C<variant> and C<handler> values, usually used by handlers.
+Return the full template path for an options hash reference with C<template>,
+C<format>, C<variant> and C<handler> values, or C<undef> if the file does not
+exist in L</"paths">, usually used by handlers.
 
 =head2 warmup
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojolicious/Routes/Pattern.pm 
new/Mojolicious-6.33/lib/Mojolicious/Routes/Pattern.pm
--- old/Mojolicious-6.32/lib/Mojolicious/Routes/Pattern.pm      2015-11-18 
10:06:00.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Routes/Pattern.pm      2015-11-18 
20:45:45.000000000 +0100
@@ -4,11 +4,11 @@
 use Mojo::Util 'deprecated';
 
 has [qw(constraints defaults)] => sub { {} };
-has [qw(regex unparsed)];
 has placeholder_start => ':';
 has [qw(placeholders tree)] => sub { [] };
-has quote_end      => ')';
-has quote_start    => '(';
+has quote_end   => ')';
+has quote_start => '(';
+has [qw(regex unparsed)];
 has relaxed_start  => '#';
 has wildcard_start => '*';
 
@@ -30,7 +30,6 @@
   # Compile on demand
   $self->_compile($detect) unless $self->{regex};
 
-  # Path
   return undef unless my @captures = $$pathref =~ $self->regex;
   $$pathref = ${^POSTMATCH};
   @captures = () if $#+ == 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojolicious/Routes/Route.pm 
new/Mojolicious-6.33/lib/Mojolicious/Routes/Route.pm
--- old/Mojolicious-6.32/lib/Mojolicious/Routes/Route.pm        2015-11-17 
05:42:31.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Routes/Route.pm        2015-11-20 
00:09:31.000000000 +0100
@@ -290,8 +290,8 @@
 
   $r = $r->add_child(Mojolicious::Routes::Route->new);
 
-Add a new child to this route, it will be automatically removed from its
-current parent if necessary.
+Add a child to this route, it will be automatically removed from its current
+parent if necessary.
 
   # Reattach route
   $r->add_child($r->find('foo'));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojolicious/Routes.pm 
new/Mojolicious-6.33/lib/Mojolicious/Routes.pm
--- old/Mojolicious-6.32/lib/Mojolicious/Routes.pm      2015-11-18 
07:32:58.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Routes.pm      2015-11-20 
00:09:12.000000000 +0100
@@ -288,13 +288,13 @@
 
   $r = $r->add_condition(foo => sub {...});
 
-Add a new condition.
+Register a condition.
 
 =head2 add_shortcut
 
   $r = $r->add_shortcut(foo => sub {...});
 
-Add a new shortcut.
+Register a shortcut.
 
 =head2 continue
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojolicious/Validator.pm 
new/Mojolicious-6.33/lib/Mojolicious/Validator.pm
--- old/Mojolicious-6.32/lib/Mojolicious/Validator.pm   2015-11-17 
05:42:33.000000000 +0100
+++ new/Mojolicious-6.33/lib/Mojolicious/Validator.pm   2015-11-20 
00:09:38.000000000 +0100
@@ -115,7 +115,7 @@
 
   $validator = $validator->add_check(size => sub {...});
 
-Register a new validation check.
+Register a validation check.
 
 =head2 validation
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-6.32/lib/Mojolicious/resources/templates/mojo/menubar.html.ep 
new/Mojolicious-6.33/lib/Mojolicious/resources/templates/mojo/menubar.html.ep
--- 
old/Mojolicious-6.32/lib/Mojolicious/resources/templates/mojo/menubar.html.ep   
    2015-11-03 19:30:47.000000000 +0100
+++ 
new/Mojolicious-6.33/lib/Mojolicious/resources/templates/mojo/menubar.html.ep   
    2015-11-19 16:40:06.000000000 +0100
@@ -127,8 +127,7 @@
     });
   });
   $(document).ready(function () {
-    $('a[href^="#"]').addClass('mojoscroll');
-    $('.mojoscroll').click(function (e) {
+    $('a[href^="#"]').addClass('​mojoscroll').click(function (e) {
       e.preventDefault();
       e.stopPropagation();
       var hash   = '#' + this.href.split('#')[1];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/lib/Mojolicious.pm 
new/Mojolicious-6.33/lib/Mojolicious.pm
--- old/Mojolicious-6.32/lib/Mojolicious.pm     2015-11-17 05:42:33.000000000 
+0100
+++ new/Mojolicious-6.33/lib/Mojolicious.pm     2015-11-20 01:58:40.000000000 
+0100
@@ -43,7 +43,7 @@
 has validator => sub { Mojolicious::Validator->new };
 
 our $CODENAME = 'Clinking Beer Mugs';
-our $VERSION  = '6.32';
+our $VERSION  = '6.33';
 
 sub AUTOLOAD {
   my $self = shift;
@@ -130,13 +130,7 @@
     unless $c->tx->is_writing;
 }
 
-sub helper {
-  my ($self, $name, $cb) = @_;
-  my $r = $self->renderer;
-  $self->log->debug(qq{Helper "$name" already exists, replacing})
-    if exists $r->helpers->{$name};
-  $r->add_helper($name => $cb);
-}
+sub helper { shift->renderer->add_helper(@_) }
 
 sub hook { shift->plugins->on(@_) }
 
@@ -587,8 +581,10 @@
 
   $app->helper(foo => sub {...});
 
-Add a new helper that will be available as a method of the controller object
-and the application object, as well as a function in C<ep> templates.
+Add or replace a helper that will be available as a method of the controller
+object and the application object, as well as a function in C<ep> templates. 
For
+a full list of helpers that are available by default see
+L<Mojolicious::Plugin::DefaultHelpers> and L<Mojolicious::Plugin::TagHelpers>.
 
   # Helper
   $app->helper(cache => sub { state $cache = {} });
@@ -651,9 +647,9 @@
   $app->start;
   $app->start(@ARGV);
 
-Start the command line interface for your application, for a full list of
-commands available by default see L<Mojolicious::Commands/"COMMANDS">. Note
-that the options C<-h>/C<--help>, C<--home> and C<-m>/C<--mode>, which are
+Start the command line interface for your application. For a full list of
+commands that are available by default see L<Mojolicious::Commands/"COMMANDS">.
+Note that the options C<-h>/C<--help>, C<--home> and C<-m>/C<--mode>, which are
 shared by all commands, will be parsed from C<@ARGV> during compile time.
 
   # Always start daemon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/t/mojolicious/app.t 
new/Mojolicious-6.33/t/mojolicious/app.t
--- old/Mojolicious-6.32/t/mojolicious/app.t    2015-11-17 05:39:10.000000000 
+0100
+++ new/Mojolicious-6.33/t/mojolicious/app.t    2015-11-19 21:45:51.000000000 
+0100
@@ -140,15 +140,6 @@
 ok !!$t->app->plugins->emit_hook_reverse('does_not_exist'),
   'hook has been emitted';
 
-# Replaced helper
-my $log = '';
-my $cb = $t->app->log->on(message => sub { $log .= pop });
-$t->app->helper(replaced_helper => sub { });
-$t->app->helper(replaced_helper => sub { });
-like $log, qr/Helper "replaced_helper" already exists, replacing/,
-  'right message';
-$t->app->log->unsubscribe(message => $cb);
-
 # Custom hooks
 my $custom;
 $t->app->hook('custom_hook' => sub { $custom += shift });
@@ -169,8 +160,8 @@
   ->content_unlike(qr/Something/)->content_like(qr/Page not found/);
 
 # Plugin::Test::SomePlugin2::register (security violation again)
-$log = '';
-$cb = $t->app->log->on(message => sub { $log .= pop });
+my $log = '';
+my $cb = $t->app->log->on(message => sub { $log .= pop });
 $t->get_ok('/plugin-test-some_plugin2/register')->status_isnt(500)
   ->status_is(404)->header_is(Server => 'Mojolicious (Perl)')
   ->content_unlike(qr/Something/)->content_like(qr/Page not found/);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-6.32/t/mojolicious/renderer.t 
new/Mojolicious-6.33/t/mojolicious/renderer.t
--- old/Mojolicious-6.32/t/mojolicious/renderer.t       2015-11-17 
05:39:19.000000000 +0100
+++ new/Mojolicious-6.33/t/mojolicious/renderer.t       2015-11-22 
00:09:03.000000000 +0100
@@ -15,7 +15,8 @@
 $renderer->add_handler(
   debug => sub {
     my ($renderer, $c, $output) = @_;
-    $$output .= 'Hello Mojo!';
+    my $content = $c->content // '';
+    $$output = "Hello Mojo!$content";
   }
 );
 $c->stash->{template} = 'something';


Reply via email to