Hello community, here is the log from the commit of package perl-Mojolicious for openSUSE:Factory checked in at 2016-08-22 10:49:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2016-08-05 18:17:33.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes 2016-08-22 10:49:21.000000000 +0200 @@ -1,0 +2,13 @@ +Thu Aug 18 05:35:10 UTC 2016 - [email protected] + +- updated to 7.03 + see /usr/share/doc/packages/perl-Mojolicious/Changes + + 7.03 2016-08-17 + - Fixed packaging errors. + + 7.02 2016-08-17 + - Fixed bugs in Mojo::Loader and Mojo::Util where the DATA handle would be + mentioned in error messages. (jberger, kiwiroy, sri) + +------------------------------------------------------------------- Old: ---- Mojolicious-7.01.tar.gz New: ---- Mojolicious-7.03.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojolicious.spec ++++++ --- /var/tmp/diff_new_pack.TE1dvG/_old 2016-08-22 10:49:22.000000000 +0200 +++ /var/tmp/diff_new_pack.TE1dvG/_new 2016-08-22 10:49:22.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-Mojolicious -Version: 7.01 +Version: 7.03 Release: 0 %define cpan_name Mojolicious Summary: Real-time web framework ++++++ Mojolicious-7.01.tar.gz -> Mojolicious-7.03.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/Changes new/Mojolicious-7.03/Changes --- old/Mojolicious-7.01/Changes 2016-08-01 02:05:11.000000000 +0200 +++ new/Mojolicious-7.03/Changes 2016-08-17 18:37:48.000000000 +0200 @@ -1,4 +1,11 @@ +7.03 2016-08-17 + - Fixed packaging errors. + +7.02 2016-08-17 + - Fixed bugs in Mojo::Loader and Mojo::Util where the DATA handle would be + mentioned in error messages. (jberger, kiwiroy, sri) + 7.01 2016-08-01 - Improved support for systemd. - Fixed a bug in Mojo::Server::Prefork where PID files would not contain a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/META.json new/Mojolicious-7.03/META.json --- old/Mojolicious-7.01/META.json 2016-08-01 20:45:57.000000000 +0200 +++ new/Mojolicious-7.03/META.json 2016-08-17 18:39:28.000000000 +0200 @@ -4,7 +4,7 @@ "Sebastian Riedel <[email protected]>" ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 7.18, CPAN::Meta::Converter version 2.150005", + "generated_by" : "ExtUtils::MakeMaker version 7.22, CPAN::Meta::Converter version 2.150005", "license" : [ "artistic_2" ], @@ -58,6 +58,6 @@ }, "x_IRC" : "irc://irc.perl.org/#mojo" }, - "version" : "7.01", + "version" : "7.03", "x_serialization_backend" : "JSON::PP version 2.27400" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/META.yml new/Mojolicious-7.03/META.yml --- old/Mojolicious-7.01/META.yml 2016-08-01 20:45:57.000000000 +0200 +++ new/Mojolicious-7.03/META.yml 2016-08-17 18:39:28.000000000 +0200 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 7.18, CPAN::Meta::Converter version 2.150005' +generated_by: 'ExtUtils::MakeMaker version 7.22, CPAN::Meta::Converter version 2.150005' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -31,5 +31,5 @@ homepage: http://mojolicious.org license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/kraih/mojo.git -version: '7.01' +version: '7.03' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/examples/connect-proxy.pl new/Mojolicious-7.03/examples/connect-proxy.pl --- old/Mojolicious-7.01/examples/connect-proxy.pl 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/examples/connect-proxy.pl 2016-08-12 11:18:42.000000000 +0200 @@ -14,7 +14,7 @@ # Write chunk from client to server my $server = $buffer{$id}{connection}; - return Mojo::IOLoop->stream($server)->write($chunk) if length $server; + return Mojo::IOLoop->stream($server)->write($chunk) if $server; # Read connect request from client my $buffer = $buffer{$id}{client} .= $chunk; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/lib/Mojo/IOLoop/Server.pm new/Mojolicious-7.03/lib/Mojo/IOLoop/Server.pm --- old/Mojolicious-7.01/lib/Mojo/IOLoop/Server.pm 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/lib/Mojo/IOLoop/Server.pm 2016-08-05 16:07:43.000000000 +0200 @@ -311,7 +311,8 @@ tls_verify => 0x00 -TLS verification mode, defaults to C<0x03>. +TLS verification mode, defaults to C<0x03> if a certificate authority file has +been provided, or C<0x00>. =item tls_version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/lib/Mojo/Loader.pm new/Mojolicious-7.03/lib/Mojo/Loader.pm --- old/Mojolicious-7.01/lib/Mojo/Loader.pm 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/lib/Mojo/Loader.pm 2016-08-16 16:46:53.000000000 +0200 @@ -63,6 +63,7 @@ my $class = shift; return $CACHE{$class} if $CACHE{$class}; + local $.; my $handle = do { no strict 'refs'; \*{"${class}::DATA"} }; return {} unless fileno $handle; seek $handle, 0, 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/lib/Mojo/Server/Daemon.pm new/Mojolicious-7.03/lib/Mojo/Server/Daemon.pm --- old/Mojolicious-7.01/lib/Mojo/Server/Daemon.pm 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/lib/Mojo/Server/Daemon.pm 2016-08-05 16:07:06.000000000 +0200 @@ -417,7 +417,8 @@ verify=0x00 -TLS verification mode, defaults to C<0x03>. +TLS verification mode, defaults to C<0x03> if a certificate authority file has +been provided, or C<0x00>. =item version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/lib/Mojo/Util.pm new/Mojolicious-7.03/lib/Mojo/Util.pm --- old/Mojolicious-7.01/lib/Mojo/Util.pm 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/lib/Mojo/Util.pm 2016-08-16 16:59:07.000000000 +0200 @@ -36,6 +36,7 @@ next unless $line =~ /^(\S+)\s+U\+(\S+)(?:\s+U\+(\S+))?/; $ENTITIES{$1} = defined $3 ? (chr(hex $2) . chr(hex $3)) : chr(hex $2); } +close DATA; # Characters that should be escaped in XML my %XML = ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/lib/Mojolicious/Guides/Tutorial.pod new/Mojolicious-7.03/lib/Mojolicious/Guides/Tutorial.pod --- old/Mojolicious-7.01/lib/Mojolicious/Guides/Tutorial.pod 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/lib/Mojolicious/Guides/Tutorial.pod 2016-08-16 16:57:46.000000000 +0200 @@ -11,6 +11,13 @@ Almost everything you'll learn here also applies to full L<Mojolicious> applications. +This is only the first of the L<Mojolicious::Guides>. Other guides delve deeper +into topics like L<growing|Mojolicious::Guides::Growing> a L<Mojolicious::Lite> +prototype into a well-structured L<Mojolicious> application, +L<routing|Mojolicious::Guides::Routing>, +L<rendering|Mojolicious::Guides::Rendering> and more. It is highly encouraged +that readers continue on to the remaining guides after reading this one. + =head2 Hello World A simple Hello World application can look like this, L<strict>, L<warnings>, @@ -305,8 +312,9 @@ =head2 Helpers -Helpers are little functions you can reuse throughout your whole application, -from actions to templates. +Helpers are little functions you can create with the keyword +L<Mojolicious::Lite/"helper"> and reuse throughout your whole application, from +actions to templates. use Mojolicious::Lite; @@ -401,7 +409,8 @@ =head2 HTTP methods -Routes can be restricted to specific request methods with different keywords. +Routes can be restricted to specific request methods with different keywords +like L<Mojolicious::Lite/"get"> and L<Mojolicious::Lite/"any">. use Mojolicious::Lite; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/lib/Mojolicious/Lite.pm new/Mojolicious-7.03/lib/Mojolicious/Lite.pm --- old/Mojolicious-7.01/lib/Mojolicious/Lite.pm 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/lib/Mojolicious/Lite.pm 2016-08-16 16:55:43.000000000 +0200 @@ -99,10 +99,12 @@ my $route = any '/:foo' => [foo => qr/\w+/] => sub {...}; my $route = any ['GET', 'POST'] => '/:foo' => sub {...}; my $route = any ['GET', 'POST'] => '/:foo' => [foo => qr/\w+/] => sub {...}; + my $route = any + ['GET', 'POST'] => '/:foo' => (agent => qr/Firefox/) => sub {...}; Generate route with L<Mojolicious::Routes::Route/"any">, matching any of the -listed HTTP request methods or all. See also L<Mojolicious::Guides::Tutorial> -for many more argument variations. +listed HTTP request methods or all. See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. =head2 app @@ -121,10 +123,11 @@ my $route = del '/:foo' => sub {...} => 'name'; my $route = del '/:foo' => {foo => 'bar'} => sub {...}; my $route = del '/:foo' => [foo => qr/\w+/] => sub {...}; + my $route = del '/:foo' => (agent => qr/Firefox/) => sub {...}; Generate route with L<Mojolicious::Routes::Route/"delete">, matching only -C<DELETE> requests. See also L<Mojolicious::Guides::Tutorial> for many more -argument variations. +C<DELETE> requests. See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. =head2 get @@ -132,10 +135,11 @@ my $route = get '/:foo' => sub {...} => 'name'; my $route = get '/:foo' => {foo => 'bar'} => sub {...}; my $route = get '/:foo' => [foo => qr/\w+/] => sub {...}; + my $route = get '/:foo' => (agent => qr/Firefox/) => sub {...}; Generate route with L<Mojolicious::Routes::Route/"get">, matching only C<GET> -requests. See also L<Mojolicious::Guides::Tutorial> for many more argument -variations. +requests. See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. =head2 group @@ -161,10 +165,11 @@ my $route = options '/:foo' => sub {...} => 'name'; my $route = options '/:foo' => {foo => 'bar'} => sub {...}; my $route = options '/:foo' => [foo => qr/\w+/] => sub {...}; + my $route = options '/:foo' => (agent => qr/Firefox/) => sub {...}; Generate route with L<Mojolicious::Routes::Route/"options">, matching only -C<OPTIONS> requests. See also L<Mojolicious::Guides::Tutorial> for many more -argument variations. +C<OPTIONS> requests. See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. =head2 patch @@ -172,10 +177,11 @@ my $route = patch '/:foo' => sub {...} => 'name'; my $route = patch '/:foo' => {foo => 'bar'} => sub {...}; my $route = patch '/:foo' => [foo => qr/\w+/] => sub {...}; + my $route = patch '/:foo' => (agent => qr/Firefox/) => sub {...}; Generate route with L<Mojolicious::Routes::Route/"patch">, matching only -C<PATCH> requests. See also L<Mojolicious::Guides::Tutorial> for many more -argument variations. +C<PATCH> requests. See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. =head2 plugin @@ -189,10 +195,11 @@ my $route = post '/:foo' => sub {...} => 'name'; my $route = post '/:foo' => {foo => 'bar'} => sub {...}; my $route = post '/:foo' => [foo => qr/\w+/] => sub {...}; + my $route = post '/:foo' => (agent => qr/Firefox/) => sub {...}; Generate route with L<Mojolicious::Routes::Route/"post">, matching only C<POST> -requests. See also L<Mojolicious::Guides::Tutorial> for many more argument -variations. +requests. See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. =head2 put @@ -200,10 +207,11 @@ my $route = put '/:foo' => sub {...} => 'name'; my $route = put '/:foo' => {foo => 'bar'} => sub {...}; my $route = put '/:foo' => [foo => qr/\w+/] => sub {...}; + my $route = put '/:foo' => (agent => qr/Firefox/) => sub {...}; Generate route with L<Mojolicious::Routes::Route/"put">, matching only C<PUT> -requests. See also L<Mojolicious::Guides::Tutorial> for many more argument -variations. +requests. See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. =head2 under @@ -211,11 +219,13 @@ my $route = under '/:foo' => sub {...}; my $route = under '/:foo' => {foo => 'bar'}; my $route = under '/:foo' => [foo => qr/\w+/]; + my $route = under '/:foo' => (agent => qr/Firefox/); my $route = under [format => 0]; Generate nested route with L<Mojolicious::Routes::Route/"under">, to which all -following routes are automatically appended. See also -L<Mojolicious::Guides::Tutorial> for more argument variations. +following routes are automatically appended. See +L<Mojolicious::Guides::Tutorial> and L<Mojolicious::Guides::Routing> for more +information. =head2 websocket @@ -223,10 +233,11 @@ my $route = websocket '/:foo' => sub {...} => 'name'; my $route = websocket '/:foo' => {foo => 'bar'} => sub {...}; my $route = websocket '/:foo' => [foo => qr/\w+/] => sub {...}; + my $route = websocket '/:foo' => (agent => qr/Firefox/) => sub {...}; Generate route with L<Mojolicious::Routes::Route/"websocket">, matching only -WebSocket handshakes. See also L<Mojolicious::Guides::Tutorial> for many more -argument variations. +WebSocket handshakes. See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. =head1 ATTRIBUTES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/lib/Mojolicious/Routes/Route.pm new/Mojolicious-7.03/lib/Mojolicious/Routes/Route.pm --- old/Mojolicious-7.01/lib/Mojolicious/Routes/Route.pm 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/lib/Mojolicious/Routes/Route.pm 2016-08-17 10:43:42.000000000 +0200 @@ -296,29 +296,73 @@ =head2 any + my $route = $r->any; my $route = $r->any('/:foo'); my $route = $r->any('/:foo' => sub {...}); + my $route = $r->any('/:foo' => sub {...} => 'name'); my $route = $r->any('/:foo' => {foo => 'bar'} => sub {...}); my $route = $r->any('/:foo' => [foo => qr/\w+/] => sub {...}); + my $route = $r->any('/:foo' => (agent => qr/Firefox/) => sub {...}); my $route = $r->any(['GET', 'POST'] => '/:foo' => sub {...}); my $route = $r->any(['GET', 'POST'] => '/:foo' => [foo => qr/\w+/]); Generate L<Mojolicious::Routes::Route> object matching any of the listed HTTP -request methods or all. See also L<Mojolicious::Guides::Tutorial> for many more -argument variations. +request methods or all. - # Route with destination + # Route with pattern and destination $r->any('/user')->to('user#whatever'); +All arguments are optional, but some have to appear in a certain order, like the +two supported array reference values, which contain the HTTP methods to match +and restrictive placeholders. + + # Route with HTTP methods, pattern, restrictive placeholders and destination + $r->any(['DELETE', 'PUT'] => '/:foo' => [foo => qr/\w+/])->to('foo#bar'); + +There are also two supported string values, containing the route pattern and the +route name, defaulting to the pattern C</> and a name based on the pattern. + + # Route with pattern, name and destination + $r->any('/:foo' => 'foo_route')->to('foo#bar'); + +An arbitrary number of key/value pairs in between the route pattern and name can +be used to specify route conditions. + + # Route with pattern, condition and destination + $r->any('/' => (agent => qr/Firefox/))->to('foo#bar'); + +A hash reference is used to specifiy optional placeholders and default values +for the stash. + + # Route with pattern, optional placeholder and destination + $r->any('/:foo' => {foo => 'bar'})->to('foo#bar'); + +And a code reference can be used to specify a C<cb> value to be merged into the +default values for the stash. + + # Route with pattern and a closure as destination + $r->any('/:foo' => sub { + my $c = shift; + $c->render(text => 'Hello World!'); + }); + +See L<Mojolicious::Guides::Tutorial> and L<Mojolicious::Guides::Routing> for +more information. + =head2 delete + my $route = $r->delete; my $route = $r->delete('/:foo'); my $route = $r->delete('/:foo' => sub {...}); + my $route = $r->delete('/:foo' => sub {...} => 'name'); my $route = $r->delete('/:foo' => {foo => 'bar'} => sub {...}); my $route = $r->delete('/:foo' => [foo => qr/\w+/] => sub {...}); + my $route = $r->delete('/:foo' => (agent => qr/Firefox/) => sub {...}); -Generate L<Mojolicious::Routes::Route> object matching only C<DELETE> requests. -See also L<Mojolicious::Guides::Tutorial> for many more argument variations. +Generate L<Mojolicious::Routes::Route> object matching only C<DELETE> requests, +takes the same arguments as L</"any"> (except for the HTTP methods to match, +which are implied). See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. # Route with destination $r->delete('/user')->to('user#remove'); @@ -345,13 +389,18 @@ =head2 get + my $route = $r->get; my $route = $r->get('/:foo'); my $route = $r->get('/:foo' => sub {...}); + my $route = $r->get('/:foo' => sub {...} => 'name'); my $route = $r->get('/:foo' => {foo => 'bar'} => sub {...}); my $route = $r->get('/:foo' => [foo => qr/\w+/] => sub {...}); + my $route = $r->get('/:foo' => (agent => qr/Firefox/) => sub {...}); -Generate L<Mojolicious::Routes::Route> object matching only C<GET> requests. -See also L<Mojolicious::Guides::Tutorial> for many more argument variations. +Generate L<Mojolicious::Routes::Route> object matching only C<GET> requests, +takes the same arguments as L</"any"> (except for the HTTP methods to match, +which are implied). See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. # Route with destination $r->get('/user')->to('user#show'); @@ -395,14 +444,18 @@ =head2 options + my $route = $r->options; my $route = $r->options('/:foo'); my $route = $r->options('/:foo' => sub {...}); + my $route = $r->options('/:foo' => sub {...} => 'name'); my $route = $r->options('/:foo' => {foo => 'bar'} => sub {...}); my $route = $r->options('/:foo' => [foo => qr/\w+/] => sub {...}); + my $route = $r->options('/:foo' => (agent => qr/Firefox/) => sub {...}); Generate L<Mojolicious::Routes::Route> object matching only C<OPTIONS> -requests. See also L<Mojolicious::Guides::Tutorial> for many more argument -variations. +requests, takes the same arguments as L</"any"> (except for the HTTP methods to +match, which are implied). See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. # Route with destination $r->options('/user')->to('user#overview'); @@ -430,39 +483,54 @@ =head2 patch + my $route = $r->patch; my $route = $r->patch('/:foo'); my $route = $r->patch('/:foo' => sub {...}); + my $route = $r->patch('/:foo' => sub {...} => 'name'); my $route = $r->patch('/:foo' => {foo => 'bar'} => sub {...}); my $route = $r->patch('/:foo' => [foo => qr/\w+/] => sub {...}); + my $route = $r->patch('/:foo' => (agent => qr/Firefox/) => sub {...}); -Generate L<Mojolicious::Routes::Route> object matching only C<PATCH> requests. -See also L<Mojolicious::Guides::Tutorial> for many more argument variations. +Generate L<Mojolicious::Routes::Route> object matching only C<PATCH> requests, +takes the same arguments as L</"any"> (except for the HTTP methods to match, +which are implied). See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. # Route with destination $r->patch('/user')->to('user#update'); =head2 post + my $route = $r->post; my $route = $r->post('/:foo'); my $route = $r->post('/:foo' => sub {...}); + my $route = $r->post('/:foo' => sub {...} => 'name'); my $route = $r->post('/:foo' => {foo => 'bar'} => sub {...}); my $route = $r->post('/:foo' => [foo => qr/\w+/] => sub {...}); + my $route = $r->post('/:foo' => (agent => qr/Firefox/) => sub {...}); -Generate L<Mojolicious::Routes::Route> object matching only C<POST> requests. -See also L<Mojolicious::Guides::Tutorial> for many more argument variations. +Generate L<Mojolicious::Routes::Route> object matching only C<POST> requests, +takes the same arguments as L</"any"> (except for the HTTP methods to match, +which are implied). See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. # Route with destination $r->post('/user')->to('user#create'); =head2 put + my $route = $r->put; my $route = $r->put('/:foo'); my $route = $r->put('/:foo' => sub {...}); + my $route = $r->put('/:foo' => sub {...} => 'name'); my $route = $r->put('/:foo' => {foo => 'bar'} => sub {...}); my $route = $r->put('/:foo' => [foo => qr/\w+/] => sub {...}); + my $route = $r->put('/:foo' => (agent => qr/Firefox/) => sub {...}); -Generate L<Mojolicious::Routes::Route> object matching only C<PUT> requests. -See also L<Mojolicious::Guides::Tutorial> for many more argument variations. +Generate L<Mojolicious::Routes::Route> object matching only C<PUT> requests, +takes the same arguments as L</"any"> (except for the HTTP methods to match, +which are implied). See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. # Route with destination $r->put('/user')->to('user#replace'); @@ -537,11 +605,14 @@ my $route = $r->under('/:foo' => sub {...}); my $route = $r->under('/:foo' => {foo => 'bar'}); my $route = $r->under('/:foo' => [foo => qr/\w+/]); + my $route = $r->under('/:foo' => (agent => qr/Firefox/)); my $route = $r->under([format => 0]); Generate L<Mojolicious::Routes::Route> object for a nested route with its own -intermediate destination. See also L<Mojolicious::Guides::Tutorial> for many -more argument variations. +intermediate destination, takes the same arguments as L</"any"> (except for the +HTTP methods to match, which are not available). See +L<Mojolicious::Guides::Tutorial> and L<Mojolicious::Guides::Routing> for more +information. # Intermediate destination and prefix shared between two routes my $auth = $r->under('/user')->to('user#auth'); @@ -563,14 +634,18 @@ =head2 websocket + my $route = $r->websocket; my $route = $r->websocket('/:foo'); my $route = $r->websocket('/:foo' => sub {...}); + my $route = $r->websocket('/:foo' => sub {...} => 'name'); my $route = $r->websocket('/:foo' => {foo => 'bar'} => sub {...}); my $route = $r->websocket('/:foo' => [foo => qr/\w+/] => sub {...}); + my $route = $r->websocket('/:foo' => (agent => qr/Firefox/) => sub {...}); Generate L<Mojolicious::Routes::Route> object matching only WebSocket -handshakes. See also L<Mojolicious::Guides::Tutorial> for many more argument -variations. +handshakes, takes the same arguments as L</"any"> (except for the HTTP methods +to match, which are implied). See L<Mojolicious::Guides::Tutorial> and +L<Mojolicious::Guides::Routing> for more information. # Route with destination $r->websocket('/echo')->to('example#echo'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/lib/Mojolicious.pm new/Mojolicious-7.03/lib/Mojolicious.pm --- old/Mojolicious-7.01/lib/Mojolicious.pm 2016-07-31 18:57:15.000000000 +0200 +++ new/Mojolicious-7.03/lib/Mojolicious.pm 2016-08-17 18:34:19.000000000 +0200 @@ -43,7 +43,7 @@ has validator => sub { Mojolicious::Validator->new }; our $CODENAME = 'Doughnut'; -our $VERSION = '7.01'; +our $VERSION = '7.03'; sub AUTOLOAD { my $self = shift; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/t/mojo/daemon_ipv6_tls.t new/Mojolicious-7.03/t/mojo/daemon_ipv6_tls.t --- old/Mojolicious-7.01/t/mojo/daemon_ipv6_tls.t 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/t/mojo/daemon_ipv6_tls.t 2016-08-12 11:18:36.000000000 +0200 @@ -40,7 +40,7 @@ # Write chunk from client to server my $server = $buffer{$id}{connection}; - return Mojo::IOLoop->stream($server)->write($chunk) if length $server; + return Mojo::IOLoop->stream($server)->write($chunk) if $server; # Read connect request from client my $buffer = $buffer{$id}{client} .= $chunk; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/t/mojo/hypnotoad.t new/Mojolicious-7.03/t/mojo/hypnotoad.t --- old/Mojolicious-7.01/t/mojo/hypnotoad.t 2016-07-30 17:37:32.000000000 +0200 +++ new/Mojolicious-7.03/t/mojo/hypnotoad.t 2016-08-12 11:30:39.000000000 +0200 @@ -67,7 +67,6 @@ plugin Config => { default => { hypnotoad => { - inactivity_timeout => 3, listen => ['http://127.0.0.1:$port1', 'http://127.0.0.1:$port2'], workers => 1 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/t/mojo/loader.t new/Mojolicious-7.03/t/mojo/loader.t --- old/Mojolicious-7.01/t/mojo/loader.t 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/t/mojo/loader.t 2016-08-16 16:52:44.000000000 +0200 @@ -160,4 +160,8 @@ ['test.bin'], 'right DATA files'; } +# Hide DATA usage from error messages +eval { die 'whatever' }; +unlike $@, qr/DATA/, 'DATA has been hidden'; + done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/t/mojo/user_agent_tls.t new/Mojolicious-7.03/t/mojo/user_agent_tls.t --- old/Mojolicious-7.01/t/mojo/user_agent_tls.t 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/t/mojo/user_agent_tls.t 2016-08-12 11:27:37.000000000 +0200 @@ -86,20 +86,19 @@ . '&ca=t/mojo/certs/ca.crt' . '&ciphers=AES256-SHA:ALL' . '&verify=0x00' - . '&version=SSLv3'; + . '&version=TLSv1'; $daemon->listen([$listen])->start; $port = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port; # Invalid certificate $ua = Mojo::UserAgent->new(ioloop => $ua->ioloop); $ua->cert('t/mojo/certs/bad.crt')->key('t/mojo/certs/bad.key'); -IO::Socket::SSL::set_defaults(SSL_version => 'SSLv3'); $tx = $ua->get("https://127.0.0.1:$port"); ok $tx->success, 'successful'; ok !$tx->error, 'no error'; is $ua->ioloop->stream($tx->connection)->handle->get_cipher, 'AES256-SHA', 'AES256-SHA has been negotiatied'; -is $ua->ioloop->stream($tx->connection)->handle->get_sslversion, 'SSLv3', - 'SSLv3 has been negotiatied'; +is $ua->ioloop->stream($tx->connection)->handle->get_sslversion, 'TLSv1', + 'TLSv1 has been negotiatied'; done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/t/mojo/util.t new/Mojolicious-7.03/t/mojo/util.t --- old/Mojolicious-7.01/t/mojo/util.t 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/t/mojo/util.t 2016-08-16 16:52:55.000000000 +0200 @@ -500,4 +500,8 @@ is term_escape("\x00\x09\x0b\x1f\x7f\x80\x9f"), '\x00\x09\x0b\x1f\x7f\x80\x9f', 'right result'; +# Hide DATA usage from error messages +eval { die 'whatever' }; +unlike $@, qr/DATA/, 'DATA has been hidden'; + done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/t/mojo/websocket_proxy.t new/Mojolicious-7.03/t/mojo/websocket_proxy.t --- old/Mojolicious-7.01/t/mojo/websocket_proxy.t 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/t/mojo/websocket_proxy.t 2016-08-12 11:18:56.000000000 +0200 @@ -54,7 +54,7 @@ # Write chunk from client to server my $server = $buffer{$id}{connection}; - return Mojo::IOLoop->stream($server)->write($chunk) if length $server; + return Mojo::IOLoop->stream($server)->write($chunk) if $server; # Read connect request from client my $buffer = $buffer{$id}{client} .= $chunk; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.01/t/mojo/websocket_proxy_tls.t new/Mojolicious-7.03/t/mojo/websocket_proxy_tls.t --- old/Mojolicious-7.01/t/mojo/websocket_proxy_tls.t 2016-07-19 02:38:18.000000000 +0200 +++ new/Mojolicious-7.03/t/mojo/websocket_proxy_tls.t 2016-08-12 11:19:15.000000000 +0200 @@ -72,7 +72,7 @@ # Write chunk from client to server my $server = $buffer{$id}{connection}; - return Mojo::IOLoop->stream($server)->write($chunk) if length $server; + return Mojo::IOLoop->stream($server)->write($chunk) if $server; # Read connect request from client my $buffer = $buffer{$id}{client} .= $chunk;
