Chinaunix

标题: Mojolicious新版本发布,5.0.2. 旧版本升级可能会报错 [打印本页]

作者: py    时间: 2014-06-02 14:48
标题: Mojolicious新版本发布,5.0.2. 旧版本升级可能会报错
今天从4.99升级到5.02。报了一个EV timer错误,完全坏掉了。看了一下,是因为5.0中的一个变化

  1. - Replaced reserved stash value partial with render_to_string method.
复制代码
renter的时候已经不可以用partial参数,改成render_to_string.文档在这里http://search.cpan.org/~sri/Mojo ... cious/Controller.pm
作者: hiwork    时间: 2014-06-02 17:47
  1. Mojo::Reactor::EV: Timer 78f6c5a31c5f9e86a6ffb82cfdd44e0b failed: Can't call method "is_websocket" on an undefined value at /usr/local/share/perl5/Mojolicious/Controller.pm line 249, <FH> line 1118.
  2. Mojo::Reactor::EV: Timer 78f6c5a31c5f9e86a6ffb82cfdd44e0b failed: Can't call method "is_websocket" on an undefined value at /usr/local/share/perl5/Mojolicious/Controller.pm line 249, <FH> line 1118.
  3. Mojo::Reactor::EV: Timer 7525788e4364c58fbf9668c886aeca3d failed: Can't call method "is_websocket" on an undefined value at /usr/local/share/perl5/Mojolicious/Controller.pm line 249, <FH> line 1118.
复制代码
我只用到了send
  1.     Mojo::IOLoop->recurring(0.01 => sub {                                                                                         |   ~                          
  2.         my $line = <FH>;                                                                                                          |   ~                          
  3.         #$self->send("<br \>");                                                                                                   |   ~                          
  4.         $self->send($line);  
复制代码

作者: stanley_tam    时间: 2014-06-02 19:12
一直就觉得partial怪怪的{:3_193:}
作者: py    时间: 2014-06-03 08:40
新版本还是有不少变化的。升级时候得看清楚。
  1. 5.0  2014-05-29
  2.   - Code name "Tiger Face", this is a major release.
  3.   - Changed heuristics for number detection in Mojo::JSON to better line up
  4.     with user expectations.
  5.   - Changed lock and unlock callbacks in Mojo::IOLoop to not receive an
  6.     invocant.
  7.   - Changed return value of path_for method in Mojolicious::Routes::Match.
  8.   - Changed return value and arguments of error method in Mojo::Message.
  9.   - Removed deprecated support for "X-Forwarded-HTTPS".
  10.   - Removed return values from wait method in Mojo::IOLoop::Delay.
  11.   - Removed list context support from header method in Mojo::Headers.
  12.   - Removed generate_port method from Mojo::IOLoop.
  13.   - Replaced reserved stash value partial with render_to_string method.
  14.   - Replaced format method in Mojo::Log with an attribute.
  15.   - Replaced check_file method in Mojo::Server::Morbo with check method.
  16.   - Added with_compression method to Mojo::Transaction::WebSocket.
  17.   - Added catch method to Mojo::EventEmitter.
  18.   - Added append method to Mojo::Log.
  19.   - Updated jQuery to version 2.1.1.
  20.   - Improved Mojo::IOLoop::Delay to automatically check if the event loop is
  21.     already running.
  22.   - Improved Mojo::Parameters to consistently accept arrays.
  23.   - Improved Mojo::Collection to perform actual boolean checks. (marcus)
  24.   - Fixed Mojo::DOM::HTML to handle slashes in unquoted attribute values
  25.     correctly.
  26.   - Fixed Mojo::IOLoop::Server to work correctly with newer versions of
  27.     IO::Socket::SSL. (noxxi)
  28.   - Fixed rendering bug where rewritten arguments could not be localized.
  29.   - Fixed verification bug in Mojo::IOLoop::Server.
  30.   - Fixed path generation bug in Mojolicious::Routes::Match.
  31.   - Fixed warnings in Mojo::IOLoop::Delay.
复制代码





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2