Hello community,
here is the log from the commit of package perl-Mojolicious for openSUSE:Factory checked in at 2015-08-28 08:26:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-08-01 11:34:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes 2015-08-28 08:26:23.000000000 +0200
@@ -1,0 +2,25 @@
+Sun Aug 23 09:02:18 UTC 2015 - coolo@suse.com
+
+- updated to 6.17
+ see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+ 6.17 2015-08-21
+ - Improved slurp method in Mojo::Asset::File to only use one file descriptor.
+
+ 6.16 2015-08-19
+ - Improved check_box, radio_button and select_field tag helpers to handle the
+ attributes "checked" and "selected" correctly.
+ - Improved performance of slurp function in Mojo::Util slightly.
+
+-------------------------------------------------------------------
+Wed Aug 19 09:15:05 UTC 2015 - coolo@suse.com
+
+- updated to 6.15
+ see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+ 6.15 2015-08-13
+ - Removed deprecated build_body and build_headers methods from Mojo::Content.
+ - Improved Mojo::Transaction::HTTP performance slightly.
+ - Fixed warnings in Mojo::DOM.
+
+-------------------------------------------------------------------
Old:
----
Mojolicious-6.14.tar.gz
New:
----
Mojolicious-6.17.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Mojolicious.spec ++++++
--- /var/tmp/diff_new_pack.NXLkSC/_old 2015-08-28 08:26:24.000000000 +0200
+++ /var/tmp/diff_new_pack.NXLkSC/_new 2015-08-28 08:26:24.000000000 +0200
@@ -17,7 +17,7 @@
Name: perl-Mojolicious
-Version: 6.14
+Version: 6.17
Release: 0
%define cpan_name Mojolicious
Summary: Real-time web framework
++++++ Mojolicious-6.14.tar.gz -> Mojolicious-6.17.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/Changes new/Mojolicious-6.17/Changes
--- old/Mojolicious-6.14/Changes 2015-07-12 17:31:04.000000000 +0200
+++ new/Mojolicious-6.17/Changes 2015-08-21 18:49:30.000000000 +0200
@@ -1,4 +1,17 @@
+6.17 2015-08-21
+ - Improved slurp method in Mojo::Asset::File to only use one file descriptor.
+
+6.16 2015-08-19
+ - Improved check_box, radio_button and select_field tag helpers to handle the
+ attributes "checked" and "selected" correctly.
+ - Improved performance of slurp function in Mojo::Util slightly.
+
+6.15 2015-08-13
+ - Removed deprecated build_body and build_headers methods from Mojo::Content.
+ - Improved Mojo::Transaction::HTTP performance slightly.
+ - Fixed warnings in Mojo::DOM.
+
6.14 2015-07-12
- Improved app generator command not to create a log directory.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/META.json new/Mojolicious-6.17/META.json
--- old/Mojolicious-6.14/META.json 2015-07-14 05:25:00.000000000 +0200
+++ new/Mojolicious-6.17/META.json 2015-08-22 21:37:44.000000000 +0200
@@ -55,6 +55,6 @@
},
"x_IRC" : "irc://irc.perl.org/#mojo"
},
- "version" : "6.14",
+ "version" : "6.17",
"x_serialization_backend" : "JSON::PP version 2.27300"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/META.yml new/Mojolicious-6.17/META.yml
--- old/Mojolicious-6.14/META.yml 2015-07-14 05:24:59.000000000 +0200
+++ new/Mojolicious-6.17/META.yml 2015-08-22 21:37:44.000000000 +0200
@@ -30,5 +30,5 @@
homepage: http://mojolicio.us
license: http://www.opensource.org/licenses/artistic-license-2.0
repository: https://github.com/kraih/mojo.git
-version: '6.14'
+version: '6.17'
x_serialization_backend: 'CPAN::Meta::YAML version 0.016'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/examples/microhttpd.pl new/Mojolicious-6.17/examples/microhttpd.pl
--- old/Mojolicious-6.14/examples/microhttpd.pl 2015-03-31 19:49:57.000000000 +0200
+++ new/Mojolicious-6.17/examples/microhttpd.pl 2015-08-13 03:31:46.000000000 +0200
@@ -18,8 +18,8 @@
# Write a minimal HTTP response
# (the "Hello World!" message has been optimized away!)
- $stream->write("HTTP/1.1 200 OK\x0d\x0aContent-Length: 0\x0d\x0a"
- . "Connection: keep-alive\x0d\x0a\x0d\x0a");
+ $stream->write(
+ "HTTP/1.1 200 OK\x0d\x0aContent-Length: 0\x0d\x0a\x0d\x0a");
}
}
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/Asset/File.pm new/Mojolicious-6.17/lib/Mojo/Asset/File.pm
--- old/Mojolicious-6.14/lib/Mojo/Asset/File.pm 2015-06-30 20:02:38.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/Asset/File.pm 2015-08-21 19:31:12.000000000 +0200
@@ -46,9 +46,7 @@
sub add_chunk {
my ($self, $chunk) = @_;
- $chunk //= '';
- croak "Can't write to asset: $!"
- unless defined $self->handle->syswrite($chunk, length $chunk);
+ defined $self->handle->syswrite($chunk) or croak "Can't write to asset: $!";
return $self;
}
@@ -124,8 +122,11 @@
sub size { -s shift->handle }
sub slurp {
- return '' unless defined(my $file = shift->path);
- return Mojo::Util::slurp $file;
+ my $handle = shift->handle;
+ $handle->sysseek(0, SEEK_SET);
+ defined $handle->sysread(my $content, -s $handle, 0)
+ or croak qq{Can't read from asset: $!};
+ return $content;
}
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/Asset/Memory.pm new/Mojolicious-6.17/lib/Mojo/Asset/Memory.pm
--- old/Mojolicious-6.14/lib/Mojo/Asset/Memory.pm 2015-04-22 20:47:10.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/Asset/Memory.pm 2015-08-18 18:05:52.000000000 +0200
@@ -47,7 +47,7 @@
sub move_to {
my ($self, $to) = @_;
- spurt $self->{content}, $to;
+ spurt $self->{content} // '', $to;
return $self;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/Base.pm new/Mojolicious-6.17/lib/Mojo/Base.pm
--- old/Mojolicious-6.14/lib/Mojo/Base.pm 2015-05-16 18:24:25.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/Base.pm 2015-08-16 04:23:39.000000000 +0200
@@ -11,7 +11,7 @@
# Only Perl 5.14+ requires it on demand
use IO::Handle ();
-# Will be shipping with Perl 5.22
+# Supported on Perl 5.22+
my $NAME
= eval { require Sub::Util; Sub::Util->can('set_subname') } || sub { $_[1] };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/Content.pm new/Mojolicious-6.17/lib/Mojo/Content.pm
--- old/Mojolicious-6.14/lib/Mojo/Content.pm 2015-06-30 20:02:38.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/Content.pm 2015-08-16 04:23:41.000000000 +0200
@@ -4,7 +4,6 @@
use Carp 'croak';
use Compress::Raw::Zlib qw(WANT_GZIP Z_STREAM_END);
use Mojo::Headers;
-use Mojo::Util 'deprecated';
use Scalar::Util 'looks_like_number';
has [qw(auto_decompress auto_relax expect_close relaxed skip_body)];
@@ -25,10 +24,6 @@
(shift->headers->content_type // '') =~ $BOUNDARY_RE ? $1 // $2 : undef;
}
-# DEPRECATED in Clinking Beer Mugs!
-sub build_body { shift->_build('get_body_chunk') }
-sub build_headers { shift->_build('get_header_chunk') }
-
sub charset {
my $type = shift->headers->content_type // '';
return $type =~ /charset\s*=\s*"?([^"\s;]+)"?/i ? $1 : undef;
@@ -169,23 +164,6 @@
return $self;
}
-# DEPRECATED in Clinking Beer Mugs!
-sub _build {
- deprecated 'Mojo::Content::build_body and Mojo::Content::build_headers'
- . ' are DEPRECATED';
- my ($self, $method) = @_;
-
- my ($buffer, $offset) = ('', 0);
- while (1) {
- next unless defined(my $chunk = $self->$method($offset));
- last unless my $len = length $chunk;
- $offset += $len;
- $buffer .= $chunk;
- }
-
- return $buffer;
-}
-
sub _build_chunk {
my ($self, $chunk) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/DOM/CSS.pm new/Mojolicious-6.17/lib/Mojo/DOM/CSS.pm
--- old/Mojolicious-6.14/lib/Mojo/DOM/CSS.pm 2015-04-05 17:50:23.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/DOM/CSS.pm 2015-08-16 04:23:43.000000000 +0200
@@ -24,11 +24,14 @@
sub select_one { _select(1, shift->tree, _compile(@_)) }
sub _ancestor {
- my ($selectors, $current, $tree, $pos) = @_;
+ my ($selectors, $current, $tree, $one, $pos) = @_;
+
while ($current = $current->[3]) {
return undef if $current->[0] eq 'root' || $current eq $tree;
return 1 if _combinator($selectors, $current, $tree, $pos);
+ last if $one;
}
+
return undef;
}
@@ -56,7 +59,7 @@
}
# ">" (parent only)
- return _parent($selectors, $current, $tree, ++$pos) if $c eq '>';
+ return _ancestor($selectors, $current, $tree, 1, ++$pos) if $c eq '>';
# "~" (preceding siblings)
return _sibling($selectors, $current, $tree, 0, ++$pos) if $c eq '~';
@@ -65,7 +68,7 @@
return _sibling($selectors, $current, $tree, 1, ++$pos) if $c eq '+';
# " " (ancestor)
- return _ancestor($selectors, $current, $tree, ++$pos);
+ return _ancestor($selectors, $current, $tree, 0, ++$pos);
}
sub _compile {
@@ -138,13 +141,6 @@
sub _name {qr/(?:^|:)\Q@{[_unescape(shift)]}\E$/}
-sub _parent {
- my ($selectors, $current, $tree, $pos) = @_;
- return undef unless my $parent = $current->[3];
- return undef if $parent->[0] eq 'root' || $parent eq $tree;
- return _combinator($selectors, $parent, $tree, $pos);
-}
-
sub _pc {
my ($class, $args, $current) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/DOM.pm new/Mojolicious-6.17/lib/Mojo/DOM.pm
--- old/Mojolicious-6.14/lib/Mojo/DOM.pm 2015-07-03 15:34:12.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/DOM.pm 2015-08-16 04:23:44.000000000 +0200
@@ -185,10 +185,9 @@
# Detect "pre" tag
my $tree = $self->tree;
- if (!defined $trim || $trim) {
- $trim = 1;
- $_->[1] eq 'pre' and $trim = 0 for $self->_ancestors, $tree;
- }
+ $trim = 1 unless defined $trim;
+ map { $_->[1] eq 'pre' and $trim = 0 } $self->_ancestors, $tree
+ if $trim && $tree->[0] ne 'root';
return _text([_nodes($tree)], $recurse, $trim);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/Headers.pm new/Mojolicious-6.17/lib/Mojo/Headers.pm
--- old/Mojolicious-6.14/lib/Mojo/Headers.pm 2015-04-01 22:43:17.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/Headers.pm 2015-08-16 04:23:45.000000000 +0200
@@ -7,7 +7,7 @@
has max_lines => sub { $ENV{MOJO_MAX_LINES} || 100 };
# Common headers
-my %NORMALCASE = map { lc($_) => $_ } (
+my %NORMALCASE = map { lc() => $_ } (
qw(Accept Accept-Charset Accept-Encoding Accept-Language Accept-Ranges),
qw(Access-Control-Allow-Origin Allow Authorization Cache-Control Connection),
qw(Content-Disposition Content-Encoding Content-Language Content-Length),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/JSON.pm new/Mojolicious-6.17/lib/Mojo/JSON.pm
--- old/Mojolicious-6.14/lib/Mojo/JSON.pm 2015-05-27 22:14:27.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/JSON.pm 2015-08-16 04:23:48.000000000 +0200
@@ -161,11 +161,11 @@
# High surrogate
($ord & 0xfc00) == 0xd800
- or pos($_) = $pos + pos($str), _throw('Missing high-surrogate');
+ or pos = $pos + pos($str), _throw('Missing high-surrogate');
# Low surrogate
$str =~ /\G\\u([Dd][C-Fc-f]..)/gc
- or pos($_) = $pos + pos($str), _throw('Missing low-surrogate');
+ or pos = $pos + pos($str), _throw('Missing low-surrogate');
$ord = 0x10000 + ($ord - 0xd800) * 0x400 + (hex($1) - 0xdc00);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/Loader.pm new/Mojolicious-6.17/lib/Mojo/Loader.pm
--- old/Mojolicious-6.14/lib/Mojo/Loader.pm 2015-06-30 20:02:38.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/Loader.pm 2015-08-16 19:47:39.000000000 +0200
@@ -147,6 +147,7 @@
Extract embedded file from the C<DATA> section of a class, all files will be
cached once they have been accessed for the first time.
+ # List embedded files
say for keys %{data_section 'Foo::Bar'};
=head2 file_is_binary
@@ -174,6 +175,7 @@
Load a class and catch exceptions. 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') {
die ref $e ? "Exception: $e" : 'Not found!';
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/Reactor/Poll.pm new/Mojolicious-6.17/lib/Mojo/Reactor/Poll.pm
--- old/Mojolicious-6.14/lib/Mojo/Reactor/Poll.pm 2015-04-27 03:01:29.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/Reactor/Poll.pm 2015-08-16 04:23:51.000000000 +0200
@@ -64,7 +64,7 @@
}
# Wait for timeout if poll can't be used
- elsif ($timeout) { usleep $timeout * 1000 }
+ elsif ($timeout) { usleep($timeout * 1000) }
# Timers (time should not change in between timers)
my $now = steady_time;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/Server.pm new/Mojolicious-6.17/lib/Mojo/Server.pm
--- old/Mojolicious-6.14/lib/Mojo/Server.pm 2015-07-05 22:07:50.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/Server.pm 2015-08-16 04:23:54.000000000 +0200
@@ -5,7 +5,7 @@
use Cwd 'abs_path';
use Mojo::Loader 'load_class';
use Mojo::Util 'md5_sum';
-use POSIX;
+use POSIX ();
use Scalar::Util 'blessed';
has app => sub { shift->build_app('Mojo::HelloWorld') };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/Transaction/HTTP.pm new/Mojolicious-6.17/lib/Mojo/Transaction/HTTP.pm
--- old/Mojolicious-6.14/lib/Mojo/Transaction/HTTP.pm 2015-02-24 23:59:20.000000000 +0100
+++ new/Mojolicious-6.17/lib/Mojo/Transaction/HTTP.pm 2015-08-16 04:23:55.000000000 +0200
@@ -142,16 +142,8 @@
# Nothing written yet
$self->{$_} ||= 0 for qw(offset write);
my $msg = $server ? $self->res : $self->req;
- unless ($self->{http_state}) {
-
- # Connection header
- my $headers = $msg->headers;
- $headers->connection($self->keep_alive ? 'keep-alive' : 'close')
- unless $headers->connection;
-
- # Switch to start-line
- @$self{qw(http_state write)} = ('start_line', $msg->start_line_size);
- }
+ @$self{qw(http_state write)} = ('start_line', $msg->start_line_size)
+ unless $self->{http_state};
# Start-line
my $chunk = '';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojo/Util.pm new/Mojolicious-6.17/lib/Mojo/Util.pm
--- old/Mojolicious-6.14/lib/Mojo/Util.pm 2015-06-30 20:02:38.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojo/Util.pm 2015-08-21 19:29:42.000000000 +0200
@@ -233,9 +233,9 @@
sub slurp {
my $path = shift;
- croak qq{Can't open file "$path": $!} unless open my $file, '<', $path;
- my $content = '';
- while ($file->sysread(my $buffer, 131072, 0)) { $content .= $buffer }
+ open my $file, '<', $path or croak qq{Can't open file "$path": $!};
+ defined $file->sysread(my $content, -s $file, 0)
+ or croak qq{Can't read from file "$path": $!};
return $content;
}
@@ -244,9 +244,9 @@
sub spurt {
my ($content, $path) = @_;
- croak qq{Can't open file "$path": $!} unless open my $file, '>', $path;
- croak qq{Can't write to file "$path": $!}
- unless defined $file->syswrite($content);
+ open my $file, '>', $path or croak qq{Can't open file "$path": $!};
+ defined $file->syswrite($content)
+ or croak qq{Can't write to file "$path": $!};
return $content;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojolicious/Guides/FAQ.pod new/Mojolicious-6.17/lib/Mojolicious/Guides/FAQ.pod
--- old/Mojolicious-6.14/lib/Mojolicious/Guides/FAQ.pod 2015-03-31 05:18:20.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojolicious/Guides/FAQ.pod 2015-08-13 03:31:46.000000000 +0200
@@ -66,7 +66,7 @@
First of all, you need to be aware that according to the L<perlpolicy>, only
the two most recent stable release series of Perl are supported by the
-community and receive bug fixes, which are currently 5.20.x and 5.18.x.
+community and receive bug fixes, which are currently 5.22.x and 5.20.x.
L<Mojolicious> follows this model and fully supports these two release series.
In addition we will also keep the distribution installable up to a certain
legacy version that we deem worthy of supporting, but not specifically optimize
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.14/lib/Mojolicious/Guides/Rendering.pod new/Mojolicious-6.17/lib/Mojolicious/Guides/Rendering.pod
--- old/Mojolicious-6.14/lib/Mojolicious/Guides/Rendering.pod 2015-05-30 04:09:11.000000000 +0200
+++ new/Mojolicious-6.17/lib/Mojolicious/Guides/Rendering.pod 2015-08-19 05:20:41.000000000 +0200
@@ -292,18 +292,8 @@
These mappings can be easily extended or changed with L