Mojolicious-7.59/000755 000765 000024 00000000000 13215530107 013707 5ustar00sristaff000000 000000 Mojolicious-7.59/LICENSE000644 000765 000024 00000021413 13200114653 014713 0ustar00sristaff000000 000000 The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Mojolicious-7.59/Changes000644 000765 000024 00000476072 13215066557 015237 0ustar00sristaff000000 000000 7.59 2017-12-15 - Moved home and ua attributes from Mojo to Mojolicious. - Changed Mojo::IOLoop::Client to only start a thread pool with Net::DNS::Native on demand. (Grinnz) - Improved subprocess method in Mojo::IOLoop to allow for easier role composition. - Fixed RFC 7230 compliance bug in Mojo::Message::Response. (jberger) 7.58 2017-12-02 - Added websocket_p method to Mojo::UserAgent. 7.57 2017-11-18 - Fixed installation problems with some versions of Perl on Windows. 7.56 2017-11-14 - Added num check to Mojolicious::Validator. - Improved built-in templates with high resolution logos. 7.55 2017-11-06 - Added -role flag to Mojo::Base. (jberger) - Improved tablify function in Mojo::Util to work with non-rectangular arrays. (CandyAngel, jabberwok) - Improved Windows compatibility of Mojo::Server::Daemon. 7.54 2017-11-05 - Fixed a bug in Mojo::Promise where promise chains could not recover from rejections. 7.53 2017-11-04 - Added module Mojo::Promise. - Improved Mojo::IOLoop::Delay to be a subclass of Mojo::Promise. 7.52 2017-11-02 - Added delete_p, get_p, head_p, options_p, patch_p, post_p, put_p and start_p methods to Mojo::UserAgent. 7.51 2017-10-31 - Added -signatures flag to Mojo::Base and Mojolicious::Lite. - Added support for new HTTP status code. - Improved ojo to enable subroutine signatures automatically on Perl 5.20+. 7.50 2017-10-30 - Deprecated error and finish events in Mojo::IOLoop::Delay. Since there is no good way to warn our users about this deprecation, it will be in effect until the next major release. Where we will also change the base class from Mojo::EventEmitter to Mojo::Base. - Improved documentation browser with links to MetaCPAN. 7.49 2017-10-28 - Deprecated Mojo::IOLoop::Delay::data and Mojo::IOLoop::Delay::remaining. - Added Promises/A+ support. Note that Mojo::IOLoop::Delay previously inherited a catch method from Mojo::EventEmitter that was passed the error message as second argument instead of the first, so you might have to change $delay->catch(sub { my ($delay, $error) = @_; ... }); to $delay->catch(sub { my ($error) = @_; ... }); - Added all, catch, finally, race and then methods to Mojo::IOLoop::Delay. - Updated jQuery to version 3.2.1. 7.48 2017-10-19 - Reverted previous Mojo::File change since there were too many unintended side effects. 7.47 2017-10-05 - Added multipart content generator to Mojo::UserAgent::Transactor. - Fixed a bug in Mojo::File where parts of a path could get accidentally upgraded from bytes to characters. 7.46 2017-09-12 - Fixed support for versions of IO::Socket::SSL older than 1.965 again. 7.45 2017-09-06 - Fixed support for versions of IO::Socket::SSL older than 1.965. (mudler, foursixnine, genio, sri) 7.44 2017-09-02 - Reverted a previous change to Mojo::Loader that allowed for load_class to be called on the same class multiple times, since it had very bad side effects. - Improved Mojo::IOLoop::TLS to use a little less memory. - Fixed a bug where Mojolicious controllers like "MyApp::Controller::Foo::Bar" would disappear if loading the controller "MyApp::Controller::Foo" was attempted but failed. 7.43 2017-08-18 - Improved Mojo::Base role support with the ability to rebless objects. 7.42 2017-08-17 - Improved Mojo::Base role support with shorthands. MyClass->with_roles('MyClass::Role::Foo') becomes MyClass->with_roles('+Foo') 7.41 2017-08-15 - Added with_roles method to Mojo::ByteStream, Mojo::Collection, Mojo::DOM and Mojo::File. 7.40 2017-08-14 - Added support for Role::Tiny extensions to all classes based on Mojo::Base. (dotan) - Added with_roles method to Mojo::Base. (dotan) - Added the guide Mojolicious::Guides::Testing. (scottw) - Replaced systemd detection in Mojo::Log with the MOJO_LOG_SHORT environment variable, since there is no reliable way to detect systemd. 7.39 2017-08-03 - Removed experimental close_idle_connections method from Mojo::Server::Daemon. - Increased default graceful_timeout from 60 to 120 seconds in Mojo::Server::Prefork. - Improve Mojo::Server::Daemon to log request errors. - Fixed a bug where Mojo::Server::Daemon would close connections too quickly and interrupt requests. 7.38 2017-07-30 - Added extra attribute to Mojolicious::Static. (jabberwok) - Improve Mojo::URL performance significantly. - Fixed memory leak in Mojo::URL that was caused by a Perl 5.24 bug. 7.37 2017-07-21 - Added slugify method to Mojo::ByteStream. (Grinnz) - Added slugify function to Mojo::Util. (Grinnz) - Fixed bugs in Mojo::IOLoop and Mojo::Reactor::Poll that would prevent a reset from clearing events. 7.36 2017-07-09 - Fixed basename method in Mojo::File to work with relative paths. (jberger) - Fixed a bug where Mojo::Log could not correctly identify if it was deployed with systemd. - Fixed Mojo::HelloWorld to actually be a Mojolicious subclass. 7.35 2017-07-05 - Removed deprecated watch attribute from Mojo::Server::Morbo. - Added spare attribute to Mojo::Server::Prefork. - Added -s option to prefork command. - Added fd option to Mojo::IOLoop::Server::listen. - Added fd parameter to Mojo::Server::Daemon::listen. - Added spare setting to Hypnotoad. - Increased default graceful_timeout from 20 to 60 seconds and heartbeat_timeout from 20 to 30 seconds in Mojo::Server::Prefork. 7.34 2017-07-02 - Added short attribute to Mojo::Log. - Improved Mojo::Log to print log messages without timestamps to STDERR when deployed with systemd. - Improved Mojo::DOM performance slightly. 7.33 2017-06-05 - Added EXPERIMENTAL support for :matches pseudo-class and :not pseudo-class with compound selectors to Mojo::DOM::CSS. - Fixed a few form element value extraction bugs in Mojo::DOM. - Fixed version command to use the new MetaCPAN API, since the old one got shut down. 7.32 2017-05-28 - Added -f option to get command. - Improved get command with support for passing request data by redirecting STDIN. - Fixed memory leak in Mojo::IOLoop::Client that sometimes prevented the connect timeout from working correctly for TLS handshakes. 7.31 2017-04-23 - Removed deprecated files, slurp and spurt functions from Mojo::Util. - Removed deprecated parts attribute from Mojo::Home. - Removed deprecated slurp and spurt methods from Mojo::ByteStream. - Removed deprecated lib_dir, list_files, parse and rel_dir methods from Mojo::Home. - Removed deprecated rel_dir method from Mojolicious::Command. - Removed deprecated is_status_class method from Mojo::Message::Response. - Fixed a bug in the app generator command where the config file name was not based on the application moniker. 7.30 2017-04-04 - Deprecated Mojo::Server::Morbo::watch in favor of Mojo::Server::Morbo::Backend::Poll::watch. (marcus) - Added support for pluggable Morbo backends. (marcus) - Added Mojo::Server::Morbo::Backend and Mojo::Server::Morbo::Backend::Poll modules. (marcus) - Added backend attribute to Mojo::Server::Morbo. (marcus) - Added -b option to Morbo. (marcus) 7.29 2017-03-12 - Added support for overriding configuration files in applications tested with Test::Mojo. - Added html_attr_unescape function to Mojo::Util. - Fixed unescaping of HTML5 attribute values in Mojo::DOM::HTML. 7.28 2017-03-07 - Added copy_to, realpath and sibling methods to Mojo::File. - Added dir option to list_tree method in Mojo::File. - Improved app generator command to generate a config file. (tudorconstantin) 7.27 2017-02-27 - Added support for UNIX domain sockets. (sri, salva) - Improved Mojo::UserAgent to complain about unsupported protocols. - Fixed a bug in Mojo::URL where invalid host strings could be generated. - Fixed blib handling in Mojo::Home. 7.26 2017-02-15 - Fixed bug in Mojo::IOLoop::Subprocess where starting multiple subprocesses at once could cause expcetions. (jberger) 7.25 2017-02-09 - Fixed cleanup bugs in Mojo::IOLoop::Stream. 7.24 2017-02-05 - Added open method to Mojo::File. - Added tempfile function to Mojo::File. - Fixed bug in Mojo::Asset::File where the slurp method would not work correctly for very large files. 7.23 2017-01-29 - Added max_request_size attribute to Mojolicious. - Added max_response_size attribute to Mojo::UserAgent. - Added to_unsafe_string method to Mojo::URL. - Added -S option to get command. - Fixed a data corruption problem in Mojo::IOLoop::Stream, caused by a dependency of IO::Socket::SSL on the internal representation of strings, which differs from IO::Socket::IP. (coolo, sri) 7.22 2017-01-25 - Added ports method to Mojo::Server::Daemon. - Added remove_tree method to Mojo::File. - Improved spurt method in Mojo::File with support for writing multiple chunks at once. 7.21 2017-01-21 - Added extract_usage function to Mojo::Util. - Improve getopt function in Mojo::Util to use @ARGV by default. 7.20 2017-01-18 - Fixed a bug in Mojo::File where the make_path method would die even if no error occurred. - Fixed warnings in Mojo::IOLoop::TLS. 7.19 2017-01-14 - Added module Mojo::IOLoop::TLS. - Added can_nnr and can_socks methods to Mojo::IOLoop::Client. 7.18 2017-01-11 - Fixed support for relative %INC paths in Mojo::Home. - Fixed a bug in Mojo::URL where invalid fragment strings could be generated. 7.17 2017-01-11 - Fixed Windows bugs in Mojo::File. (kmx) 7.16 2017-01-10 - Fixed Windows bugs in Mojo::File. (kmx) 7.15 2017-01-09 - Deprecated Mojo::ByteStream::slurp and Mojo::Util::slurp in favor of Mojo::File::slurp. - Deprecated Mojo::ByteStream::spurt and Mojo::Util::spurt in favor of Mojo::File::spurt. - Deprecated Mojo::Util::files in favor of Mojo::File::list_tree. - Deprecated Mojo::Home::lib_dir, Mojo::Home::parse, Mojo::Home::parts in favor of new features inherited from the Mojo::File base class. - Added module Mojo::File. - Improved Mojo::Home to be a subclass of Mojo::File. - Improved mojo_lib_dir and rel_file methods in Mojo::Home to return Mojo::Home objects. - Improved rel_file methods in Mojolicious::Command to return Mojo::File objects. - Improved every_param and param methods in Mojolicious::Validator::Validation to use the current topic. 7.14 2017-01-04 - Deprecated Mojo::Home::list_files in favor of Mojo::Util::files. - Deprecated Mojo::Home::rel_dir in favor of Mojo::Home::rel_file. - Deprecated Mojolicious::Command::rel_dir in favor of Mojolicious::Command::rel_file. - Fixed a bug in Mojo::IOLoop::Subprocess where the pipe used for IPC could disappear because of a timeout. 7.13 2016-12-23 - Deprecated Mojo::Message::Response::is_status_class in favor of new is_* methods. - Added result method to Mojo::Transaction. - Added is_client_error, is_error, is_info, is_redirect, is_server_error and is_success methods to Mojo::Message::Response. - Fixed bug where Morbo could not handle broken symlinks. (Grinnz) 7.12 2016-12-18 - Added button_to and csrf_button_to helpers to Mojolicious::Plugin::TagHelpers. - Removed experimental status from Mojo::IOLoop::Subprocess. - Removed experimental status from subprocess method in Mojo::IOLoop. 7.11 2016-11-30 - Added EXPERIMENTAL close_idle_connections method to Mojo::Server::Daemon. - Improved one_tick method in Mojo::IOLoop to protect from recursion, similar to the start method. - Improved log attribute in Mojolicious to make it easier to override default settings. (jberger) - Fixed bug in Mojo::Server::Prefork where workers would accept keep-alive requests after a graceful shutdown had already been initiated. - Fixed bugs in Mojo::Util and Mojo::Asset::File where incomplete writes would not be recognized as errors. (bobkare, sri) 7.10 2016-11-01 - Added getopt function to Mojo::Util. 7.09 2016-10-22 - Added every_header method to Mojo::Headers. - Fixed redirect bug in Mojo::UserAgent::Transactor. - Fixed a few proxy bugs in Mojo::UserAgent. 7.08 2016-09-23 - Added -i and -o options to get command. - Updated jQuery to version 3.1.1. - Improved accuracy of finished_ok test in Test::Mojo. - Fixed state transition bug in Mojo::Transaction::HTTP that caused message bodies to be included in responses to HEAD requests. 7.07 2016-09-20 - Fixed bug in Mojo::UserAgent::Transactor where 303 redirects would not be followed correctly with GET requests. (jberger) 7.06 2016-09-17 - Fixed bug where Mojolicious::Renderer would wrap text in layouts. - Fixed a few test description encoding bugs in Test::Mojo. 7.05 2016-08-29 - Fixed bug in Mojo::IOLoop::Subprocess where EV would steal the subprocess exit status. 7.04 2016-08-28 - Added EXPERIMENTAL support for performing computationally expensive operations in subprocesses, without blocking the event loop. (jberger, sri) - Added EXPERIMENTAL module Mojo::IOLoop::Subprocess. (jberger, sri) - Added EXPERIMENTAL subprocess method to Mojo::IOLoop. (jberger, sri) - Improved many methods in Mojolicious::Controller to die more gracefully if the connection has already been closed. - Fixed bug where Mojo::UserAgent would try to follow redirects for CONNECT requests. 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 newline character. 7.0 2016-07-19 - Code name "Doughnut", this is a major release. - Removed Mojolicious::Plugin::Charset. - Removed authority method from Mojo::URL. - Removed squish method from Mojo::ByteStream. - Removed squish function from Mojo::Util. - Removed support for smart whitespace trimming from all_text and text methods in Mojo::DOM. - Updated jQuery to version 3.1.0. - Improved Mojo::URL not to include the userinfo part when generating URLs, as recommended by the URL Living Standard. - Improved Mojolicious::Plugin::Config to no longer log which files have been loaded. - Fixed trailing slash bug in Mojo::URL. - Fixed a few whitespace bugs in Mojo::DOM. - Fixed attribute selector bug in Mojo::DOM::CSS. (Akron) - Fixed a bug causing headers with zero length values to be ignored by the get command. (jberger) 6.66 2016-06-16 - Fixed support for CONNECT requests without keep alive connections in Mojo::UserAgent. (anparker, sri) 6.65 2016-06-14 - Added password and username methods to Mojo::URL. - Updated jQuery to version 3.0.0. - Fixed "0" value bug in Mojo::UserAgent::CookieJar. (jamadam) 6.64 2016-06-09 - Updated HTML5 entities in Mojo::Util. - Improved Mojo::IOLoop to fall back to Mojo::Reactor::Poll if Perl has been compiled with fork emulation. 6.63 2016-06-03 - Removed deprecated check method from Mojo::Server::Morbo. - Removed deprecated build, compile and interpret methods from Mojo::Template. - Removed deprecated multi_accept methods from Mojo::IOLoop, Mojo::IOLoop::Server and Mojo::Server::Daemon. - Updated jQuery to version 2.2.4. - Improved generator commands not to overwrite existing files. 6.62 2016-05-14 - Removed deprecated is_debug, is_error, is_info and is_warn methods from Mojo::Log. - Improved support for Ubuntu on Windows. 6.61 2016-04-30 - Improved Mojo::Server::Daemon to no longer log when a connection has been closed prematurely. - Fixed bug in Mojo::Content where the drain event would not always be emitted for dynamically generated content with a Content-Length header. 6.60 2016-04-25 - Fixed bug in Mojo::IOLoop where stopping gracefully would sometimes result in connections getting closed too early. (anparker, sri) 6.59 2016-04-22 - Removed deprecated xss_escape function from Mojo::Util. - Improved HTML Living Standard compliance of Mojo::DOM::HTML. - Improved Mojo::Server::Daemon to log when a connection has been closed prematurely. - Improved Mojo::Server::Prefork to log when the manager process has been stopped. - Fixed a few tests to keep up with breaking changes in IO::Socket::SSL. - Fixed a few timing bugs in tests. 6.58 2016-04-09 - Removed deprecated build_frame and parse_frame methods from Mojo::Transaction::WebSocket. - Added fork policy to Mojolicious::Guides::Contributing. - Improved Mojo::JSON to generate canonical JSON objects. - Fixed bug in Mojo::Loader where classes with exceptions could not be loaded twice. (kiwiroy, sri) 6.57 2016-03-23 - Fixed a few validation bugs in Mojolicious::Validator::Validation. (Mikey, sri) - Fixed copyright notice. 6.56 2016-03-16 - Added hidden option to list_files method in Mojo::Home. (batman, sri) - Added hidden option to files function in Mojo::Util. (batman, sri) - Fixed bug where Morbo would not ignore hidden files. (batman, sri) - Fixed bug where Morbo would ignore the --verbose option. - Fixed keep-alive bug in Mojo::UserAgent. (jberger) 6.55 2016-03-08 - Deprecated Mojo::Server::Morbo::check in favor of Mojo::Server::Morbo::modified_files. (leejo, nugged) - Added modified_files method to Mojo::Server::Morbo. (leejo, nugged) - Improved renderer performance slightly. - Fixed a bug where Morbo would restart more than once if multiple files changed at the same time. (leejo, nugged) 6.54 2016-03-06 - Deprecated Mojo::Template::build and Mojo::Template::compile. - Deprecated Mojo::Template::interpret in favor of Mojo::Template::process. - Added support for named variables to Mojo::Template. - Added vars attribute to Mojo::Template. - Added process method to Mojo::Template. - Improved Mojo::Template performance slightly. 6.53 2016-03-03 - Removed multi_accept setting from Hypnotoad. - Removed -M options from daemon and prefork commands. - Deprecated Mojo::IOLoop::multi_accept. - Deprecated Mojo::IOLoop::Server::multi_accept. - Deprecated Mojo::Server::Daemon::multi_accept. - Added single_accept option to Mojo::IOLoop::Server::listen. - Added single_accept parameter to Mojo::Server::Daemon::listen. - Increased default max_requests from 25 to 100 in Mojo::Server::Daemon. - Increased default accepts from 1000 to 10000 in Mojo::Server::Prefork. - Improved performance of many Mojo::Util functions slightly. - Fixed default value bug in val method of Mojo::DOM. 6.52 2016-03-02 - Added is_accepting method to Mojo::IOLoop::Server. - Added -M option to daemon command. - Improved responsiveness of stop_gracefully method in Mojo::IOLoop. - Fixed bug in Mojo::IOLoop where too many connections could be accepted. - Fixed a few concurrency bugs in Mojo::IOLoop. 6.51 2016-02-29 - Fixed bug in Mojolicious::Plugin::EPLRenderer where empty templates from the DATA section would be ignored. - Fixed a few "0" value bugs in Mojolicious::Renderer. 6.50 2016-02-27 - Added throw method to Mojo::Exception. 6.49 2016-02-26 - Removed throw method from Mojo::Exception. - Added inspect method to Mojo::Exception. - Improved check_box and radio_button helpers with support for "on" default values. - Improved val method in Mojo::DOM with support for "on" default values. - Fixed url_for bug where routes with custom names would not match in the same order as routes with automatically generated names. - Fixed bug in Mojo::Template where not all exceptions were verbose. - Fixed Windows bug in "util.t". 6.48 2016-02-24 - Added files function to Mojo::Util. - Updated jQuery to version 2.2.1. - Improved url_for performance significantly. - Fixed bug where the results of the list_files method in Mojo::Home would include directories. - Fixed a few small CGI bugs. 6.47 2016-02-19 - Deprecated Mojo::Log::is_debug, Mojo::Log::is_error, Mojo::Log::is_info and Mojo::Log::is_warn in favor of Mojo::Log::is_level. - Added is_level method to Mojo::Log. - Fixed datetime_field helper to use the correct type attribute value. 6.46 2016-02-13 - Improved Mojo::Headers performance. (batman) - Fixed small proxy bug in Mojo::UserAgent::Transactor. 6.45 2016-02-09 - Deprecated Mojo::Util::xss_escape in favor of Mojo::Util::xml_escape. - Improved Mojo::Template performance slightly. 6.44 2016-02-04 - Removed deprecated format_regex attribute from Mojolicious::Routes::Pattern. - Improved get command not to use the user agent of the application. - Improved Mojo::JSON performance slightly. 6.43 2016-02-01 - Removed client_close and server_close methods from Mojo::Transaction. - Added closed method to Mojo::Transaction. - Added parse_message method to Mojo::Transaction::WebSocket. - Improved a few examples to avoid timing attacks. - Fixed timing bug in Mojo::Server::Daemon. 6.42 2016-01-24 - Fixed use of deprecated Perl feature in Mojo::JSON. - Fixed validation filter bugs in Mojolicious::Validator::Validation. 6.41 2016-01-20 - Added support for validation filters. - Added filters attribute to Mojolicious::Validator. - Added add_filter method to Mojolicious::Validator. - Added filter arguments to optional and required methods in Mojolicious::Validator::Validation. - Fixed MOJO_WEBSOCKET_DEBUG environment variable. (jberger) 6.40 2016-01-13 - Removed client_challenge, client_handshake, server_handshake and server_open methods from Mojo::Transaction::WebSocket. (batman, sri) - Removed is_writing method from Mojo::Transaction. - Removed upgrade event from Mojo::Transaction::HTTP. - Deprecated Mojo::Transaction::WebSocket::build_frame and Mojo::Transaction::WebSocket::parse_frame in favor of Mojo::WebSocket::build_frame and Mojo::WebSocket::parse_frame. (batman) - Replaced deprecated proxy method in Mojo::Message::Request with an attribute. - Added SNI support to all built-in web servers. (bpmedley, sri) - Added module Mojo::WebSocket. (batman) - Added established attribute to Mojo::Transaction::WebSocket. - Added completed method to Mojo::Transaction. - Updated jQuery to version 2.2.0. - Improved performance of Mojo::Server::Daemon and Mojo::UserAgent slightly. - Improved mtime attribute in Mojo::Asset::Memory to default to the value of $^T. - Improved app generator command to generate more portable scripts. - Fixed a few timing bugs. - Fixed url_for to handle fragments correctly. 6.39 2016-01-03 - Updated links to Mojolicious website. - Fixed small html_unescape bug in Mojo::Util. - Fixed handling of invalid max age in Mojo::UserAgent::CookieJar. 6.38 2015-12-19 - Updated prettify.js to version 8-Dec-2015. - Improved form generation in Mojo::UserAgent::Transactor to use UTF-8 as the default charset. 6.37 2015-12-14 - Added protocol and with_protocols methods to Mojo::Transaction::WebSocket. - Fixed a few reference encoding bugs in Mojo::JSON. - Fixed a few form generation bugs in Mojo::UserAgent::Transactor. 6.36 2015-12-08 - Improved Mojo::JSON performance slightly. (haarg) - Improved inactivity_timeout helper to return the current controller object. 6.35 2015-12-04 - Removed deprecated collecting method from Mojo::UserAgent::CookieJar. - Fixed warnings in Mojo::Cookie::Response. 6.34 2015-12-01 - Improved Hypnotoad to report problems that have occured during the creation of listen sockets. - Fixed bug in Mojo::DOM where the wrap method would attempt to wrap an HTML/XML fragment around the content of root nodes. - Fixed bug in Mojo::DOM where the wrap_content method would attempt to wrap an HTML/XML fragment around nodes that do not have children. - Fixed a few small formatting bugs in Mojolicious::Plugin::PODRenderer. 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. - Improved router performance. - Improved Mojo::DOM::CSS performance slightly. (jamadam) - Fixed a few case-sensitivity and An+B notation bugs in Mojo::DOM::CSS. (jamadam) 6.31 2015-11-13 - Improved documentation browser CSS. - Fixed handling of invalid URLs in Mojo::UserAgent::CookieJar. - Fixed a few small selector bugs in Mojo::DOM::CSS. - Fixed a few small formatting bugs in Mojolicious::Plugin::PODRenderer. 6.30 2015-11-11 - Fixed bug in Mojolicious::Renderer where layouts could not be used with template inheritance. (nic, sri) 6.29 2015-11-03 - Fixed a few bugs in built-in templates. (Zoffix, sri) 6.28 2015-11-02 - Improved build_app method in Mojo::Server to work more like the load_app method. - Fixed multi-line attribute bug in Mojo::DOM::HTML. (jamadam) 6.27 2015-10-29 - Updated HTML5 entities in Mojo::Util. - Improved Mojo::Server::Prefork to log if the process id file could not be created. 6.26 2015-10-28 - Renamed built-in templates with more descriptive names. - Added warmup methods to Mojolicious::Renderer and Mojolicious::Static. 6.25 2015-10-21 - Deprecated Mojo::Message::Request::proxy with boolean and string arguments in favor of Mojo::Message::Request::via_proxy. - Moved all bundled files into "resources" directories. - Added via_proxy attribute to Mojo::Message::Request. - Improved Mojo::DOM::CSS to support selectors with leading and trailing whitespace. - Improved rendering of built-in templates to show actual template names in log messages. - Fixed punycode bug in Mojo::URL. - Fixed "0" value bug in Mojo::JSON::Pointer. 6.24 2015-10-13 - Improved session security by not storing secrets in the stash and making CSRF tokens much harder to guess. - Improved commands to show all options that can affect their behavior. - Fixed bug in Mojo::JSON::Pointer that prevented JSON Pointers with trailing slash from working correctly. (dolmen) - Fixed support for domains with trailing dot in Mojo::URL. 6.23 2015-10-06 - Improved documentation browser CSS. - Fixed bug in Mojo::Transaction::WebSocket where an unsupported protocol could be selected automatically. - Fixed input record separator bug in Mojo::Util. (Zoffix, sri) - Fixed small redirect bug in Mojo::UserAgent::Transactor. 6.22 2015-09-26 - Improved Mojo::JSON by reusing JSON::PP boolean constants. - Improved uniq method in Mojo::Collection to accept a callback. (CandyAngel) - Improved first and grep methods in Mojo::Collection to be able to call methods. - Improved support for empty attributes in Mojo::DOM::HTML. 6.21 2015-09-23 - Added val method to Mojo::DOM. 6.20 2015-09-15 - Deprecated Mojo::UserAgent::CookieJar::collecting in favor of Mojo::UserAgent::CookieJar::ignore. - Improved support for epoll/kqueue in Mojo::IOLoop::Client. 6.19 2015-09-12 - Added code of conduct to Mojolicious::Guides::Contributing. - Added ignore attribute to Mojo::UserAgent::CookieJar. - Added tls_version option to Mojo::IOLoop::Server::listen. - Added version parameter to Mojo::Server::Daemon::listen. 6.18 2015-09-02 - Improved portability of slurp function in Mojo::Util. - Fixed handling of parameters with multiple values in Mojolicious::Plugin::TagHelpers. - Fixed Makefile.PL to be compliant with version 2 of the CPAN distribution metadata specification. (Grinnz) 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. 6.13 2015-07-08 - Added support for validating file uploads. - Added upload check to Mojolicious::Validator. - Improved error messages for broken applications in Mojo::Server. (mst) - Improved subscribers method in Mojo::EventEmitter to allow subscribers to be modified more easily. 6.12 2015-06-18 - Welcome to the Mojolicious core team Dan Book. - Added TO_JSON method to Mojo::Collection. (wttw) - Added find_packages function to Mojo::Loader. - Fixed bug in Mojo::Message where multipart content would get downgraded unnecessarily. 6.11 2015-05-16 - Deprecated Mojo::Content::build_body and Mojo::Content::build_headers. - Added headers_contain method to Mojo::Content. - Updated jQuery to version 2.1.4. - Fixed indentation of ASCII art in documentation browser. (jberger) - Fixed bug where inline was not considered a reserved stash value. 6.10 2015-04-26 - Removed support for user/group switching, because it never worked correctly, which means that this security feature has become an attack vector itself. If you depend on this functionality, you can now use the CPAN module Mojolicious::Plugin::SetUserGroup instead. - Removed group and user attributes from Mojo::Server. - Removed setuidgid method from Mojo::Server. - Removed group and user settings from Hypnotoad. - Removed -g/--group and -u/--user options from daemon and prefork commands. - Added next_tick method to Mojo::Reactor::Poll. - Improved next_tick callbacks to run in the same order in which they were registered. 6.09 2015-04-25 - Improved HTML Living Standard compliance of Mojo::Parameters. (riche, sri) - Fixed bug in Mojolicious::Types where the json MIME type did not specify a charset. (kaktus) 6.08 2015-04-09 - Added is_established and server_open methods to Mojo::Transaction::WebSocket. - Improved finish and send methods in Mojolicious::Controller to automatically establish the WebSocket connection if necessary. - Improved pod_to_html helper in Mojolicious::Plugin::PODRenderer to unindent verbatim blocks. (OlegG) 6.07 2015-04-07 - Fixed Windows bug in "daemon.t". 6.06 2015-04-06 - Added element_count_is method to Test::Mojo. (Zoffix) - Added "chat.pl" to example scripts. - Improved Mojo::DOM::CSS to handle attribute selectors with single quotes correctly. 6.05 2015-03-24 - Fixed circular require bug in Mojo::Base and Mojo::Util. 6.04 2015-03-23 - Improved Mojo::Reactor::EV and Mojo::Reactor::Poll to fail more consistently. - Improved Mojo::Base performance slightly. - Fixed a few bugs in Mojo::DOM::CSS that required class, id and attribute selectors, as well as pseudo-classes, to be in a specific order. 6.03 2015-03-16 - Added support for overriding the HTTP request method with the _method query parameter. - Added suggested_method method to Mojolicious::Routes::Route. - Improved portability of some tests. 6.02 2015-03-09 - Added daemon attribute to Mojo::Server::Morbo. - Improved portability of Mojo::Server::Morbo. - Fixed empty template handling in Mojo::Template. 6.01 2015-03-03 - Added content_with helper to Mojolicious::Plugin::DefaultHelpers. - Relaxed request-line handling in Mojo::Message::Request. - Fixed code name in version command and built-in templates. 6.0 2015-02-26 - Code name "Clinking Beer Mugs", this is a major release. - Removed name listing support from param method in Mojolicious::Controller. - Removed name listing support from param method in Mojo::Parameters. - Removed name listing support from error and param methods in Mojolicious::Validator::Validation. - Removed multi-name support from cookie, param and signed_cookie methods in Mojolicious::Controller. - Removed multi-name support from param method in Mojolicious::Validator::Validation. - Removed multi-name support from param method in Mojo::Parameters. - Removed multi-name support from cookie and upload methods in Mojo::Message. - Removed custom socket support from Mojo::UserAgent. - Removed is_fatal, is_level and log methods from Mojo::Log. - Removed auto_render method from Mojolicious::Routes. - Removed deprecated object-oriented Mojo::Loader API. - Removed deprecated accept_interval, lock and unlock attributes from Mojo::IOLoop. - Removed deprecated accept_interval, lock_file and lock_timeout attributes from Mojo::Server::Prefork. - Removed deprecated bridge method from Mojolicious::Routes::Route. - Removed deprecated is_readable method from Mojo::Reactor. - Removed deprecated siblings method from Mojo::DOM. - Removed deprecated render_exception and render_not_found methods from Mojolicious::Controller. - Removed deprecated keep_alive_requests setting from Hypnotoad. - Changed return values of all and find methods in Mojo::UserAgent::CookieJar. - Renamed template attribute in Mojo::Template to unparsed. - Renamed extracting attribute in Mojo::UserAgent::CookieJar to collecting. - Renamed types attribute in Mojolicious::Types to mapping. - Renamed current attribute in Mojolicious::Routes::Match to position. - Renamed pattern attribute in Mojolicious::Routes::Pattern to unparsed. - Renamed all_contents, contents, following_siblings, match, next_sibling, node, preceding_siblings, previous_sibling and type methods in Mojo::DOM to descendant_nodes, child_nodes, following_nodes, matches, next_node, type, preceding_nodes, previous_node and tag. - Renamed match methods in Mojo::DOM and Mojo::DOM::CSS to matches. - Renamed extract and inject methods in Mojo::UserAgent::CookieJar to collect and prepare. - Renamed inject method in Mojo::UserAgent::Proxy to prepare. - Renamed params method in Mojo::Parameters to pairs. - Renamed match method in Mojolicious::Routes::Match to find. - Renamed -A option of prefork command to -a. - Added names method to Mojo::Parameters. - Added failed and passed methods to Mojolicious::Validator::Validation. - Added -I and -M options to prefork command. - Fixed Mojo::Template support for parentheses in expressions. (jberger, sri) 5.82 2015-02-22 - Deprecated Mojo::Reactor::is_readable. - Deprecated keep_alive_requests setting in Hypnotoad in favor of requests. - Improved Morbo to restart slightly faster. - Fixed bug in daemon and prefork commands where --inactivity-timeout option was called --inactivity. 5.81 2015-02-20 - Deprecated object-oriented Mojo::Loader API. - Added data_section, file_is_binary, load_class and find_modules functions to Mojo::Loader. - Improved design of built-in templates. - Fixed test command to not let Test::Harness enable global warnings by default. (OlegG) 5.80 2015-02-18 - Deprecated Mojo::IOLoop::accept_interval, Mojo::IOLoop::lock and Mojo::IOLoop::unlock. - Deprecated Mojo::Server::Prefork::accept_interval, Mojo::Server::Prefork::lock_file and Mojo::Server::Prefork::lock_timeout. - Removed -a/--accept-interval, --lock-file and -L/--lock-timeout options from prefork command. - Removed accept_interval, lock_file and lock_timeout settings from Hypnotoad. - Added stop_gracefully method to Mojo::IOLoop. - Added finish event to Mojo::IOLoop. - Reduced CPU usage of Mojo::IOLoop and Mojo::Server::Prefork significantly. - Improved app generator command to use current best practices. - Fixed bug where semicolons at the end of a cookie were not parsed correctly. (dmw397) - Fixed bug in Mojo::IOLoop where connection limits were not properly enforced. - Fixed url_for to handle paths without trailing slash correctly in embedded applications. 5.79 2015-02-13 - Fixed bug in Mojo::Reactor::Poll that caused excessive idle CPU usage. 5.78 2015-02-12 - Replaced expires method in Mojo::Cookie::Response with an attribute. - Added split_cookie_header function to Mojo::Util. - Updated IO::Socket::SSL requirement to 1.94. - Relaxed RFC 822/1123 and RFC 850/1036 handling in Mojo::Date. - Improved Mojo::Reactor::Poll performance significantly. - Improved text method in Mojo::Message to use default_charset as well. - Improved design of built-in templates. - Fixed bug in Mojo::DOM that made parsing a requirement. - Fixed warnings in Mojo::URL. 5.77 2015-02-03 - Added content_security_policy method to Mojo::Headers. - Fixed canonicalize in Mojo::Path to not remove parts with more than three dots. 5.76 2015-02-02 - Emergency release for a critical security issue that can expose files on Windows systems, everybody should update! - Increased default max_message_size from 10MB to 16MB in Mojo::Message. - Reduced default max_line_size from 10KB to 8KB in Mojo::Headers and Mojo::Message. - Improved Hypnotoad load balancing by calling srand() after starting a new worker in Mojo::Server::Prefork. - Improved design of built-in templates. - Fixed bug in Mojo::IOLoop where the accept limit was applied too broadly. - Fixed bug in Mojo::Server::Prefork where the TTOU signal would not always stop a worker. - Fixed bug in Mojo::DOM::CSS where combinators needed to be surrounded by whitespace. 5.75 2015-01-26 - Added healthy method to Mojo::Server::Prefork. - Improved all built-in web servers to die if group or user assignment failed. - Improved Hypnotoad to wait for new workers to be ready before stopping the old ones during hot deployment. - Improved commands and log messages to use less punctuation. - Fixed bug in Mojo::IOLoop where the callback passed to next_tick would receive the wrong invocant. - Fixed race condition and memory leak in Mojo::Server::Prefork. 5.74 2015-01-25 - Improved parser errors to be more consistent with connection errors in Mojo::Message::Request and Mojo::Message::Response. - Fixed "0" value bug in Mojo::Parameters. - Fixed bug where placeholder default values would not always have precedence. - Fixed proxy detection in get command. 5.73 2015-01-24 - Deprecated Mojolicious::Routes::Route::bridge in favor of Mojolicious::Routes::Route::under. - Deprecated Mojolicious::Controller::render_exception in favor of reply->exception helper. - Deprecated Mojolicious::Controller::render_not_found in favor of reply->not_found helper. - Removed deprecated object-oriented Mojo::JSON API. - Removed deprecated stringification support from Mojo::Collection. - Removed deprecated support for data arguments from Mojo::JSON::Pointer. - Removed deprecated AUTOLOAD and pluck methods from Mojo::Collection. - Removed deprecated AUTOLOAD and val methods from Mojo::DOM. - Moved tutorial from Mojolicious::Lite to Mojolicious::Guides::Tutorial. - Added term_escape method to Mojo::ByteStream. - Added term_escape function to Mojo::Util. - Improved get command to use the user agent of the application. - Improved diagnostics information for MOJO_DAEMON_DEBUG, MOJO_USERAGENT_DEBUG and MOJO_WEBSOCKET_DEBUG environment variables. - Fixed tag helpers to generate correct HTML5. (batman, sri) - Fixed JSON Pointer escaping bug. - Fixed portability bug in monkey_patch tests. 5.72 2015-01-11 - Added EXPERIMENTAL support for case-insensitive attribute selectors like [foo="bar" i] to Mojo::DOM::CSS. - Added max_lines attribute to Mojo::Headers. - Improved Mojo::Reactor::EV to update the current time before starting a timer. - Improved error messages for start-line and header limits. - Fixed bug in Mojo::Headers where max_line_size was not checked correctly. - Fixed whitespace bug in Mojo::DOM::CSS. 5.71 2015-01-01 - Updated Net::DNS::Native requirement to 0.15 for some important bug fixes. - Updated jQuery to version 2.1.3. - Improved Mojo::URL performance. - Fixed fragment and userinfo normalization bugs in Mojo::URL. - Fixed query charset bug in Mojo::URL. - Fixed a few merge bugs in Mojo::Parameters. 5.70 2014-12-18 - Improved Mojo::Template performance. - Fixed error handling bugs in Mojo::IOLoop::Stream. - Fixed a few limit bugs in Mojo::Message. - Fixed Windows bug in Mojo::IOLoop::Client. (OlegG) 5.69 2014-12-13 - Deprecated Mojo::DOM::siblings. - Added following, following_siblings, preceding and preceding_siblings methods to Mojo::DOM. - Added port method to Mojo::IOLoop::Server. - Removed deprecated emit_safe method from Mojo::EventEmitter. - Removed deprecated render_static method from Mojolicious::Controller. - Removed deprecated has_conditions method from Mojolicious::Routes::Route. - Updated Net::DNS::Native requirement to 0.14 for some important bug fixes. - Improved Mojo::DOM::HTML performance slightly. - Fixed parent combinator bug in Mojo::DOM::CSS. - Fixed whitespace bug in Mojo::DOM::HTML. - Fixed Mojo::UserAgent::Transactor to handle query parameters more like most common browsers. 5.68 2014-12-02 - Improved Mojo::DOM::CSS performance significantly. - Fixed deprecation warnings in get command. - Fixed bug in Mojolicious::Controller where sending a WebSocket message would cause multiple resume events. 5.67 2014-11-27 - Improved overall performance by deserializing sessions only on demand. - Fixed bug where embedded applications would deserialize sessions twice. 5.66 2014-11-26 - Improved many WebSocket tests in Test::Mojo to be able to fail gracefully. - Fixed bug in Mojo::DOM::CSS where the :empty pseudo-class would not ignore comments and processing instructions. 5.65 2014-11-24 - Improved installable scripts to use #!perl. (jberger) - Improved Mojo::JSON security by escaping the "/" character. - Improved Mojolicious::Commands to reset the global Getopt::Long configuration more safely. - Fixed bug in Mojo::DOM::CSS where selected results would also include the current root element. 5.64 2014-11-22 - Fixed bug in Mojolicious::Commands where the global Getopt::Long configuration would be changed after a command had already been loaded. 5.63 2014-11-21 - Improved portability of some tests. - Fixed a few multipart form handling bugs. 5.62 2014-11-18 - Fixed bug in Mojolicious::Routes::Pattern where optional placeholders in nested routes would sometimes not work correctly. - Fixed bug where "handler" was not an allowed name for controller methods. 5.61 2014-11-14 - Moved entities.txt into the DATA section of Mojo::Util to avoid gratuitously breaking module bundlers. 5.60 2014-11-11 - Added to_array method to Mojo::Collection. - Added xss_escape function to Mojo::Util. - Updated Net::DNS::Native requirement to 0.12 for some important bug fixes. 5.59 2014-11-07 - Added support for non-blocking name resolution with Net::DNS::Native. 5.58 2014-11-06 - Improved error handling in Mojo::IOLoop::Client. 5.57 2014-11-02 - Deprecated stringification support in Mojo::Collection in favor of Mojo::Collection::join. - Deprecated Mojo::Collection::pluck in favor of Mojo::Collection::map. - Deprecated Mojo::DOM::val. - Improved map method in Mojo::Collection to be able to call methods. - Improved tap method in Mojo::Base to be able to call methods. 5.56 2014-10-29 - Deprecated Mojo::Collection::AUTOLOAD in favor of Mojo::Collection::pluck. - Deprecated Mojo::DOM::AUTOLOAD in favor of Mojo::DOM::children. 5.55 2014-10-28 - Deprecated support for data arguments in Mojo::JSON::Pointer. - Added access_control_allow_origin, content_language, content_location and strict_transport_security methods to Mojo::Headers. 5.54 2014-10-23 - Deprecated object-oriented Mojo::JSON API. - Added auto_decompress attribute to Mojo::Content. - Improved Mojo::Content to parse content more defensively. - Fixed chunked transfer encoding bug in Mojo::Content. - Fixed bug where Mojo::UserAgent would try to follow redirects for protocols other than HTTP and HTTPS. 5.53 2014-10-20 - Fixed bug in Mojo::Server where secondary groups were not reassigned correctly. (ksm, sri) 5.52 2014-10-18 - Fixed read-only file system compatibility of Mojo::Asset::File. 5.51 2014-10-17 - Fixed bug in Mojolicious::Validator::Validation where every_param would sometimes return an array reference containing an undef value. - Fixed Mojo::ByteStream and Mojo::Collection to always return true in boolean context. 5.50 2014-10-15 - Improved Mojo::DOM::HTML performance slightly. - Fixed description list parsing bug in Mojo::DOM::HTML. (Trelane) 5.49 2014-10-10 - Improved form content generator to allow custom content types. - Improved Mojo::Server to load applications consistently for all servers. (tianon, sri) - Fixed Mojolicious::Static to hide files without extensions in DATA sections. - Fixed inflate command to ignore files without extensions. - Fixed bug in Mojolicious::Routes::Route where formats could be rendered twice for embedded applications. 5.48 2014-10-07 - Emergency release for a serious security issue that can result in parameter injection attacks, everybody should update! Breaking change: Methods that previously worked differently in scalar than in list context now always assume scalar context, and new methods have been added to cover the list context functionality. - Added every_cookie and every_upload methods to Mojo::Message. - Added every_param method to Mojo::Message::Request. - Added every_param method to Mojo::Parameters. - Added every_cookie, every_param and every_signed_cookie methods to Mojolicious::Controller. - Added every_param method to Mojolicious::Validator::Validation. - Added from_json and to_json functions to Mojo::JSON. - Improved pluck method in Mojo::Collection to be able to extract values from hash references. 5.47 2014-09-28 - Improved url_for performance. 5.46 2014-09-26 - PAUSE lost the previous release. 5.45 2014-09-26 - Deprecated Mojolicious::Routes::Route::has_conditions. - Added extracting attribute to Mojo::UserAgent::CookieJar. - Improved performance of next, next_sibling, previous and previous_sibling methods in Mojo::DOM significantly. - Improved Mojo::Cache to allow caching to be disabled. (mvgrimes, sri) - Fixed url_for bug where deeply nested WebSocket routes would not work correctly. 5.44 2014-09-23 - Fixed bug in Mojolicious::Renderer that prevented proxy objects from being reused. 5.43 2014-09-22 - Updated Makefile.PL for version 2 of the CPAN distribution metadata specification. - Improved get command to not depend on Content-Type headers for differentiating between JSON and HTML/XML. 5.42 2014-09-17 - Fixed url_for bug where an unnecessary slash could be rendered before formats. 5.41 2014-09-13 - Deprecated Mojolicious::Controller::render_static in favor of reply->static helper. - Added mtime attribute to Mojo::Asset::Memory. - Added mtime method to Mojo::Asset and Mojo::Asset::File. - Added reply->asset and reply->static helpers to Mojolicious::Plugin::DefaultHelpers. - Fixed bug in Mojo::UserAgent where connections would sometimes not get closed correctly. 5.40 2014-09-12 - Deprecated Mojo::EventEmitter::emit_safe. - Added reply->exception and reply->not_found helpers to Mojolicious::Plugin::DefaultHelpers. - Improved all events to handle exceptions the same. 5.39 2014-09-07 - Improved decamelize performance. - Fixed bug in Mojo::Template where newline characters could get lost. 5.38 2014-09-05 - Improved routes command to use new terminology for flags. - Fixed bug in Mojo::Util where tablify could not handle empty columns. 5.37 2014-09-03 - Improved Mojo::Template performance slightly. - Fixed .ep template bug where the stash value "c" could no longer be used. 5.36 2014-09-02 - Improved Mojo::Template performance. 5.35 2014-08-30 - Improved monkey_patch to be able to name generated functions. 5.34 2014-08-29 - Added original_remote_address attribute to Mojo::Transaction. - Fixed bug where Mojolicious::Commands would change @ARGV when loaded. 5.33 2014-08-24 - Improved Mojo::Date to be able to handle higher precision times. - Improved Mojo::ByteStream performance. 5.32 2014-08-21 - Added to_datetime method to Mojo::Date. - Improved Mojo::Date to support RFC 3339. 5.31 2014-08-19 - Improved Mojolicious::Static to allow custom content types. - Improved url_for performance. 5.30 2014-08-17 - Improved Mojolicious::Static to only handle GET and HEAD requests. - Improved Mojo::URL performance. - Improved url_for performance slightly. - Fixed bug where DATA sections sometimes got corrupted after forking, which caused applications to fail randomly. - Fixed Mojo::IOLoop::Client to use a timeout for every connection. 5.29 2014-08-16 - Added helpers method to Mojolicious::Controller. - Improved performance of .ep templates slightly. - Fixed "0" value bug in Mojolicious::Plugin::EPRenderer. 5.28 2014-08-13 - Improved performance of nested helpers and helpers in templates significantly. - Improved Mojo::JSON to generate smaller JSON by not escaping the "/" character. 5.27 2014-08-11 - Added support for nested helpers. - Added get_helper method to Mojolicious::Renderer. - Added n function to ojo. - Fixed bug in Mojolicious::Routes::Match where placeholder values got merged too early. 5.26 2014-08-09 - Improved WebSocket performance. - Fixed proxy exception handling bug in Mojo::UserAgent. - Fixed bug where Mojo::Transaction::WebSocket would build incorrect frames if the FIN bit was not set. 5.25 2014-08-07 - Added reduce method to Mojo::Collection. (sri, batman) - Added if_none_match method to Mojo::Headers. - Added is_fresh method to Mojolicious::Static. - Added is_fresh helper to Mojolicious::Plugin::DefaultHelpers. - Improved Mojolicious to use MyApp::Controller namespace by default and encourage its use in the documentation. - Improved sort method in Mojo::Collection to use $a and $b. (batman) - Improved Mojolicious::Static to support ETag and If-None-Match headers. - Improved documentation browser CSS. - Fixed escaping bugs in Mojo::DOM::CSS. 5.24 2014-08-02 - Improved url_escape performance slightly. - Fixed memory leak in Mojo::IOLoop::Client. - Fixed bug where ojo would sometimes die silently. 5.23 2014-07-31 - Improved router performance. - Improved routes command to show format regular expression separately. - Fixed partial route bug in Mojolicious::Routes::Match. - Fixed format detection bug in Mojolicious::Routes::Pattern. 5.22 2014-07-30 - Added SOCKS5 support to Mojo::UserAgent. - Added socks_address, socks_pass, socks_port and socks_user options to Mojo::IOLoop::Client::connect. - Improved documentation browser CSS. 5.21 2014-07-27 - Improved handling of Pod::Simple::XHTML 3.09 dependency. - Improved documentation browser CSS. 5.20 2014-07-27 - Fixed a few bugs in Mojolicious::Plugin::PODRenderer by switching from Pod::Simple::HTML to Pod::Simple::XHTML. - Fixed Perl 5.18.x compatibility. 5.19 2014-07-26 - Improved support for Unicode anchors in Mojolicious::Plugin::PODRenderer. - Fixed is_readable scalability problems in Mojo::Reactor. 5.18 2014-07-25 - Improved is_readable performance in Mojo::Reactor. 5.17 2014-07-24 - Welcome to the Mojolicious core team Jan Henning Thorsen. - Added val method to Mojo::DOM. (batman, sri) - Improved Mojo::Collection performance. - Fixed support for Unicode anchors in Mojolicious::Plugin::PODRenderer. 5.16 2014-07-21 - Improved Mojo::Asset::File to allow appending data to existing files. (iakuf, sri) 5.15 2014-07-17 - Improved Mojo::DOM::HTML performance slightly. - Fixed small selector bug in get command. 5.14 2014-07-14 - Improved all_text performance in Mojo::DOM. - Improved Mojo::DOM::CSS, Mojo::DOM::HTML and Mojo::JSON performance with regular expression optimizations. - Fixed deep recursion warnings in Mojo::DOM and Mojo::DOM::HTML. (jberger) 5.13 2014-07-13 - Added json_like, json_message_like, json_message_unlike and json_unlike methods to Test::Mojo. - Improved HTML5.1 compliance of Mojo::DOM::HTML. - Fixed bug where Mojo::UserAgent would keep too many connections alive. - Fixed Mojo::Reactor::Poll bug where watchers were active after they have been removed. (jberger) 5.12 2014-07-04 - Fixed a few multipart form handling bugs. - Fixed AUTOLOAD bug in Mojo::Collection where it would behave differently than calling pluck directly. 5.11 2014-07-02 - Moved reverse_proxy attribute from Mojo::Server::Daemon to Mojo::Server. - Added delay and inactivity_timeout helpers to Mojolicious::Plugin::DefaultHelpers. - Improved error method in Mojolicious::Validator::Validation to return field names when called without arguments. - Fixed "0" value bug in Mojo::UserAgent::Transactor. 5.10 2014-06-28 - Added cleanup attribute to Mojo::Server::Prefork. - Improved Mojo::Server::Prefork to keep sending heartbeat messages when stopping gracefully. - Fixed small bug where Mojo::Server::Daemon was too eager to reconfigure Mojo::IOLoop. - Fixed small bug where Hypnotoad would clean up process id and lock files too early. 5.09 2014-06-24 - Improved .ep templates to make the current controller available as $c. 5.08 2014-06-17 - Added reset method to Mojo::IOLoop. - Added reset method to Mojo::Reactor. - Added reset method to Mojo::Reactor::Poll. 5.07 2014-06-13 - Fixed RFC 7230 compliance bugs in Mojo::Headers. 5.06 2014-06-11 - Added deserialize and serialize attributes to Mojolicious::Sessions. - Improved redirect_to to behave more like url_for. - Fixed bug in Mojo::UserAgent where HTTP/1.0 connections were sometimes kept alive. 5.05 2014-06-08 - Fixed parsing of header fields with single character names in Mojo::Headers. (crab) 5.04 2014-06-03 - Added expect_close attribute to Mojo::Content. - Improved support for broken responses to CONNECT requests. 5.03 2014-06-02 - Fixed bug where Mojo::DOM::HTML could not handle certain broken tags. 5.02 2014-05-31 - Added multi-name support to cookie and signed_cookie methods in Mojolicious::Controller. - Added multi-name support to cookie and upload methods in Mojo::Message. - Improved Mojolicious::Command::generate::plugin to use better directory names. - Fixed bug where Mojo::DOM::HTML could not handle tags with lots of attributes. 5.01 2014-05-30 - Fixed continuation line handling in Mojo::Headers. 5.0 2014-05-29 - Code name "Tiger Face", this is a major release. - Changed heuristics for number detection in Mojo::JSON to better line up with user expectations. - Changed lock and unlock callbacks in Mojo::IOLoop to not receive an invocant. - Changed return value of path_for method in Mojolicious::Routes::Match. - Changed return value and arguments of error method in Mojo::Message. - Removed deprecated support for X-Forwarded-HTTPS. - Removed return values from wait method in Mojo::IOLoop::Delay. - Removed list context support from header method in Mojo::Headers. - Removed generate_port method from Mojo::IOLoop. - Replaced reserved stash value partial with render_to_string method. - Replaced format method in Mojo::Log with an attribute. - Replaced check_file method in Mojo::Server::Morbo with check method. - Added with_compression method to Mojo::Transaction::WebSocket. - Added catch method to Mojo::EventEmitter. - Added append method to Mojo::Log. - Updated jQuery to version 2.1.1. - Improved Mojo::IOLoop::Delay to automatically check if the event loop is already running. - Improved Mojo::Parameters to consistently accept arrays. - Improved Mojo::Collection to perform actual boolean checks. (marcus) - Fixed Mojo::DOM::HTML to handle slashes in unquoted attribute values correctly. - Fixed Mojo::IOLoop::Server to work correctly with newer versions of IO::Socket::SSL. (noxxi) - Fixed rendering bug where rewritten arguments could not be localized. - Fixed verification bug in Mojo::IOLoop::Server. - Fixed path generation bug in Mojolicious::Routes::Match. - Fixed warnings in Mojo::IOLoop::Delay. 4.99 2014-05-12 - Added support for performing blocking and non-blocking requests at the same time with Mojo::UserAgent. - Added nb_url method to Mojo::UserAgent::Server. - Improved Mojo::IOLoop::Server and Mojo::Server::Daemon to be able to listen on random ports. 4.98 2014-05-09 - Removed deprecated get_line function from Mojo::Util. - Removed deprecated content_xml, replace_content, text_before, text_after and to_xml methods from Mojo::DOM. - Improved accept performance in Mojo::IOLoop::Server. 4.97 2014-04-30 - Deprecated support for X-Forwarded-HTTPS in favor of X-Forwarded-Proto. - Added multi-name support to param method in Mojo::Parameters. 4.96 2014-04-28 - Improved Mojo::IOLoop to use Mojo::IOLoop::Delay more consistently. 4.95 2014-04-27 - Improved Mojo::IOLoop::Delay with circular reference protection. - Improved Mojo::IOLoop::Delay to allow argument splicing. - Improved Mojo::IOLoop::Server to reuse cipher list from IO::Socket::SSL. - Fixed memory leak in Mojo::UserAgent::Server. 4.94 2014-04-20 - Added reverse_proxy attribute to Mojo::Server::Daemon. - Added reverse_proxy attribute to Mojo::Message::Request. - Added prefork and upgrade_timeout attributes to Mojo::Server::Hypnotoad. - Added configure method to Mojo::Server::Hypnotoad. - Relaxed name handling in Mojo::Headers a little. - Fixed small bug in online tests. 4.93 2014-04-13 - Fixed bug where Mojolicious::Static would not use the correct default MIME type. 4.92 2014-04-08 - Removed deprecated use of hash references for optgroup generation with select_field helper. - Improved dumper helper to escape unprintable characters. - Fixed small handler detection bug in Mojolicious::Renderer. 4.91 2014-03-29 - Added daemonize method to Mojo::Server. - Added ensure_pid_file method to Mojo::Server::Prefork. - Removed deprecated secret method from Mojolicious. - Improved performance of Mojolicious::Plugin::EPRenderer and Mojolicious::Plugin::EPLRenderer. - Improved Mojo::Reactor::Poll portability with POLLPRI support. 4.90 2014-03-16 - Removed deprecated to_rel method from Mojo::URL. - Updated IO::Socket::SSL requirement to 1.84 due to breaking changes in IO::Socket::SSL. - Improved documentation browser with more accessible links and readable inline code. - Fixed textarea and title parsing bugs in Mojo::DOM::HTML. 4.89 2014-03-13 - Added support for template variants. - Improved built-in templates with unobtrusive menu bar. - Fixed bug in Mojo::DOM::HTML where non-self-closing elements were not handled correctly. - Fixed bug in Mojo::DOM::HTML where was not treated as an alias for . 4.88 2014-03-09 - Added build_controller method to Mojolicious. - Added match method to Mojolicious::Routes. - Improved Mojo::Server::Daemon to handle setuid/setgid errors more gracefully. - Improved Mojo::Server::Prefork to handle lock file errors more gracefully. - Improved exception page to show better context information for templates. - Fixed comment on last line bug in Mojo::Template. 4.87 2014-03-04 - Improved Mojo::ByteStream to allow more method chaining. - Fixed RFC 7159 support in Mojo::JSON. - Fixed RFC 7159 compliance bugs in Mojo::Transaction::WebSocket and Test::Mojo. - Fixed Unicode bugs in Test::Mojo. 4.86 2014-03-03 - Improved Mojo::IOLoop::Delay to allow more method chaining. - Improved WebSocket and long poll performance. 4.85 2014-02-26 - Added next_tick methods to Mojo::IOLoop and Mojo::Reactor. - Added host_port and path_query methods to Mojo::URL. - Added is_handshake method to Mojo::Message::Request. - Improved Mojo::Reactor::EV responsiveness. - Fixed IDNA support for CONNECT requests. - Fixed "0" value bug in Mojo::Message::Request. 4.84 2014-02-22 - Added remaining attribute to Mojo::IOLoop::Delay. - Added data and pass methods to Mojo::IOLoop::Delay. - Improved Mojo::Exception context detection to better line up with user expectations. 4.83 2014-02-19 - Improved Mojo::JSON to handle encoding errors more gracefully. - Fixed line numbers in Mojo::JSON error messages. 4.82 2014-02-19 - Added decode_json and encode_json functions to Mojo::JSON. - Added data attribute to Mojo::JSON::Pointer. - Fixed bug in "user_agent_online.t". - Fixed small decoding bug in Mojo::JSON. 4.81 2014-02-15 - Added direct array access for child nodes to Mojo::DOM. - Improved Mojolicious::Routes::Pattern to normalize more route variations. - Improved routes command to show which routes are using certain features with flags. 4.80 2014-02-13 - Merged Mojo::DOM::Node into Mojo::DOM. - Added next_sibling and previous_sibling methods to Mojo::DOM. - Added last method to Mojo::Collection. - Improved many methods in Mojo::DOM to work with all node types. - Improved Mojo::DOM::HTML to handle slashes between attributes more gracefully. - Fixed list parsing bug in Mojo::DOM::HTML. 4.79 2014-02-11 - Improved not found page to show request information and the exact path used for route matching. 4.78 2014-02-08 - Deprecated Mojo::Util::get_line. - Fixed ";" handling in Mojo::Parameters to be compliant with the HTML Living Standard. - Fixed case-sensitivity bug in Mojolicious::Types. 4.77 2014-02-06 - Deprecated Mojo::DOM::text_after and Mojo::DOM::text_before in favor of Mojo::DOM::contents. - Deprecated Mojo::DOM::content_xml and Mojo::DOM::replace_content in favor of Mojo::DOM::content. - Deprecated Mojo::DOM::to_xml in favor of Mojo::DOM::to_string. - Added wrap_content method to Mojo::DOM. - Added tablify function to Mojo::Util. - Improved wrap method in Mojo::DOM to allow wrapping of the root node. 4.76 2014-02-04 - Added wrap method to Mojo::DOM. - Updated IO::Socket::IP requirement to 0.20 for certain bug fixes. - Improved Mojo::DOM::HTML to generate better HTML. 4.75 2014-02-02 - Fixed and re-added support for permessage-deflate WebSocket compression. (Mikey, sri) 4.74 2014-02-02 - Added all_contents method to Mojo::DOM. - Removed support for permessage-deflate WebSocket compression, since there have been too many problems with Chrome. 4.73 2014-02-01 - Improved xml_escape performance significantly. - Improved html_unescape and url_unescape performance. - Fixed Mojo::UserAgent::Transactor to handle redirects more like most common browsers. 4.72 2014-01-29 - Added accepts, template_for and template_handler methods to Mojolicious::Renderer. - Added accepts helper to Mojolicious::Plugin::DefaultHelpers. - Added before_render hook. - Fixed bug in Mojo::Transaction::WebSocket that prevented decompression errors from being handled gracefully. 4.71 2014-01-28 - Fixed a few compression bugs in Mojo::Transaction::WebSocket and Mojo::Content. 4.70 2014-01-26 - Added extract_usage method to Mojolicious::Command. - Added unindent method to Mojo::ByteStream. - Added unindent function to Mojo::Util. - Updated jQuery to version 2.1. - Improved all built-in commands to show usage information in their SYNOPSIS sections. - Improved tag helpers to make data attributes more convenient. (ravengerUA) %= tag 'div', data => {my_id => 1, Name => 'test'} => 'some content' is equivalent to %= tag 'div', data-my-id => 1, data-name => 'test' => 'some content' - Fixed indentation of code in documentation browser. 4.69 2014-01-24 - Improved router to allow format detection for bridges. 4.68 2014-01-22 - Added module Mojo::DOM::Node. - Added contents and node methods to Mojo::DOM. - Removed deprecated http_proxy, https_proxy, name and no_proxy attributes from Mojo::UserAgent. - Removed deprecated app, app_url, detect_proxy and need_proxy methods from Mojo::UserAgent. - Improved router to allow placeholders anywhere in a pattern to become optional. "get '/foo/:bar/baz' => {bar => 'bar'};" now matches "/foo/baz" "get '/foo(:bar)baz' => {bar => 'bar'};" now matches "/foobaz" - Improved request_ok method in Test::Mojo to handle WebSocket handshakes. - Improved Mojo::IOLoop::Server to use address and port for descriptor inheritance. - Improved list of available commands to be alphabetical. (jberger) - Fixed select_field helper to be nondestructive. - Fixed XML semantics bug in Mojo::DOM::HTML. 4.67 2014-01-11 - Added history and max_history_size attributes to Mojo::Log. - Improved exception and not found pages with log messages. - Improved exception page with more information. - Improved not found page with a more generic message. - Improved inline templates to use their checksum as name. 4.66 2014-01-04 - Added success attribute to Test::Mojo. - Improved Mojo::DOM::CSS and Mojo::DOM::HTML performance. - Fixed XML detection bug in Mojo::DOM. - Fixed escaping bugs in Mojo::DOM::CSS. 4.65 2014-01-02 - Deprecated use of hash references for optgroup generation with select_field helper in favor of Mojo::Collection objects. - Added b and c helpers to Mojolicious::Plugin::DefaultHelpers. - Fixed reference handling bug in Mojo::Collection. 4.64 2014-01-01 - Fixed helper export bug in Mojolicious::Plugin::EPRenderer. 4.63 2013-12-19 - Deprecated Mojolicious::secret in favor of Mojolicious::secrets. - Added support for rotating secrets. - Added secrets method to Mojolicious. 4.62 2013-12-17 - Deprecated Mojo::URL::to_rel. 4.61 2013-12-16 - Added select_one method to Mojo::DOM::CSS. - Improved performance of Mojo::DOM::at significantly. 4.60 2013-12-11 - Improved Mojolicious::Validator::Validation to allow custom validation errors. 4.59 2013-12-04 - Added CSRF protection support. - Added support for permessage-deflate WebSocket compression. - Added csrf_protect method to Mojolicious::Validator::Validation. - Added build_message method to Mojo::Transaction::WebSocket. - Added csrf_token attribute to Mojolicious::Validator::Validation. - Added compressed and context_takeover attributes to Mojo::Transaction::WebSocket. - Added csrf_token helper to Mojolicious::Plugin::DefaultHelpers. - Added csrf_field helper to Mojolicious::Plugin::TagHelpers. - Removed deprecated mode specific methods in application class. - Relicensed all artwork to CC-SA version 4.0. 4.58 2013-11-19 - Improved IIS and WebSphere compatibility of Mojo::Message::Request. - Improved Mojo::Collection to allow join without arguments. - Improved Mojo::DOM::HTML performance. - Fixed recursion bug in Mojo::Reactor::EV where timers could run more than once. - Fixed a few "0" value bugs in Mojo::DOM::HTML. 4.57 2013-11-11 - Improved compatibility with IO::Socket::SSL 1.957. - Fixed error event bug in Mojo::IOLoop::Delay. 4.56 2013-11-09 - Fixed backspace escaping bug in Mojo::JSON. (ig3) 4.55 2013-11-07 - Fixed Windows bug in "daemon.t". 4.54 2013-11-07 - Added parts attribute to Mojo::Home. - Fixed keep alive connection timeout bug in Mojo::UserAgent. - Fixed support for links within a page in Mojolicious::Plugin::PODRenderer. - Fixed home detection bug in Mojo. 4.53 2013-10-30 - Fixed a few unsubscribe and error event bugs in Mojo::EventEmitter. 4.52 2013-10-29 - Improved Mojo::EventEmitter to allow unhandled error events to be fatal. (powerman, sri) 4.51 2013-10-28 - Added tag_with_error helper to Mojolicious::Plugin::TagHelpers. - Improved .ep template performance significantly, the number of helpers no longer has any effect. (jberger, sri) - Improved form_for performance. - Improved built-in templates with documentation search. - Fixed template inheritance bug in include helper. - Fixed a few multipart form handling bugs. 4.50 2013-10-22 - Deprecated Mojo::UserAgent::app in favor of Mojo::UserAgent::Server::app. - Deprecated Mojo::UserAgent::app_url in favor of Mojo::UserAgent::Server::url. - Deprecated Mojo::UserAgent::detect_proxy in favor of Mojo::UserAgent::Proxy::detect. - Deprecated Mojo::UserAgent::http_proxy in favor of Mojo::UserAgent::Proxy::http. - Deprecated Mojo::UserAgent::https_proxy in favor of Mojo::UserAgent::Proxy::https. - Deprecated Mojo::UserAgent::no_proxy in favor of Mojo::UserAgent::Proxy::not. - Deprecated Mojo::UserAgent::need_proxy in favor of Mojo::UserAgent::Proxy::is_needed. - Deprecated Mojo::UserAgent::name in favor of Mojo::UserAgent::Transactor::name. - Added modules Mojo::UserAgent::Proxy and Mojo::UserAgent::Server. - Added proxy and server attributes to Mojo::UserAgent. - Removed deprecated attrs method from Mojo::DOM. - Improved Mojo::Message to allow max_message_size check to be disabled. - Fixed small assignment bug in content helper. 4.49 2013-10-17 - Added tls_ciphers option to Mojo::IOLoop::Server::listen. - Added ciphers parameter to Mojo::Server::Daemon::listen. - Removed experimental status from Mojolicioua::Validator. - Removed experimental status from Mojolicioua::Validator::Validation. - Removed experimental status from validation method in Mojolicious::Controller. - Removed experimental status from validator attribute in Mojolicious. - Removed experimental status from validation helper in Mojolicious::Plugin::DefaultHelpers. - Fixed parameter bug in Mojolicious::Validator::Validation. 4.48 2013-10-16 - Fixed support for Net::SSLeay 1.55. 4.47 2013-10-15 - Added dumper function to Mojo::Util. - Improved compatibility with IO::Socket::SSL 1.955. - Improved IIS compatibility of Mojo::Server::CGI. 4.46 2013-10-11 - Changed default name for generated applications from MyMojoliciousApp to MyApp. - Improved performance of route matching in Mojolicious::Routes::Pattern. - Improved HTML Living Standard compliance of Mojo::DOM::HTML. 4.45 2013-10-06 - Changed return values of validation checks in Mojolicious::Validator. - Fixed unquoted attribute selector bug in Mojo::DOM::CSS. 4.44 2013-10-04 - Removed experimental status from label_for helper. - Renamed regex check in Mojolicious::Validator to like. 4.43 2013-10-02 - Removed generators for dynamic error messages from Mojolicious::Validator. 4.42 2013-09-30 - Added EXPERIMENTAL form validation support. - Added EXPERIMENTAL modules Mojolicious::Validator and Mojolicious::Validator::Validation. - Added EXPERIMENTAL validation method to Mojolicious::Controller. - Added EXPERIMENTAL validator attribute to Mojolicious. - Added EXPERIMENTAL label_for and validation helpers to Mojolicious::Plugin::DefaultHelpers. 4.41 2013-09-22 - Improved documentation browser to be a little more RESTful. - Fixed flatten to work with older versions of Perl. (jamadam) 4.40 2013-09-21 - Added text method to Mojo::Message. - Added siblings method to Mojo::DOM. - Added flatten method to Mojo::Collection. - Improved documentation browser with source links. - Fixed smart whitespace trimming bug in Mojo::DOM. - Fixed table parsing bug in Mojo::DOM::HTML. - Fixed bug in Mojolicious::Types where the txt MIME type did not specify a charset. 4.39 2013-09-17 - Improved HTML5.1 compliance of Mojo::DOM::HTML. 4.38 2013-09-16 - Added is_binary method to Mojo::Loader. - Fixed support for binary files in inflate command. - Fixed stylesheet helper not to enforce a media attribute. 4.37 2013-09-13 - Improved design of built-in templates. 4.36 2013-09-12 - Added match method to Mojo::DOM. - Added match method to Mojo::DOM::CSS. - Improved ancestors and children methods in Mojo::DOM to support all CSS selectors. - Improved syntax highlighting in documentation browser. - Improved compatibility with different object systems. 4.35 2013-09-10 - Added origin attribute to Mojo::Cookie::Response. - Fixed RFC 6265 compliance bugs in Mojo::Cookie::Request, Mojo::Cookie::Response and Mojo::UserAgent::CookieJar. 4.34 2013-09-08 - Fixed portability bug in SO_REUSEPORT tests. 4.33 2013-09-07 - Fixed portability bug in Mojo::IOLoop::Delay. 4.32 2013-09-06 - Added error event to Mojo::IOLoop::Delay. 4.31 2013-09-04 - Deprecated mode specific methods in application class. sub production_mode {...} becomes (in the startup method) if ($app->mode eq 'production') {...} 4.30 2013-09-01 - Fixed memory leak in Mojolicious::Routes. 4.29 2013-08-31 - Fixed automatic rendering to work after non-blocking operations have been performed in bridges. 4.28 2013-08-29 - Added support for non-blocking operations in bridges to Mojolicious::Routes. - Added continue method to Mojolicious::Controller. - Added continue method to Mojolicious::Routes. - Added current attribute to Mojolicious::Routes::Match. - Fixed automatic rendering bug in Mojolicious::Routes. 4.27 2013-08-26 - Added acceptors attribute to Mojo::Server::Daemon. - Added handle method to Mojo::IOLoop::Server. - Added -V option to eval command. - Added reuse option to Mojo::IOLoop::Server::listen. - Added reuse parameter to Mojo::Server::Daemon::listen. - Fixed console message bug in Mojo::Server::Daemon. - Fixed SNI bug in online tests. 4.26 2013-08-18 - Fixed support for Netscape cookies in Mojo::Cookie::Response. - Fixed element method bug in Mojo::Collection. 4.25 2013-08-17 - Added support for calling element methods to Mojo::Collection. - Added compact method to Mojo::Collection. 4.24 2013-08-08 - Added ancestors method to Mojo::DOM. - Fixed bug where Mojo::IOLoop::Stream timeout was not always available. 4.23 2013-08-01 - Added redirects method to Mojo::Transaction::HTTP. 4.22 2013-07-30 - Improved Mojo::Server to use FindBin more defensively. - Fixed empty attribute bug in Mojo::DOM::CSS. - Fixed partial route handling in routes command. 4.21 2013-07-29 - Added strip method to Mojo::DOM. - Fixed return values of remove and replace methods in Mojo::DOM. 4.20 2013-07-28 - Deprecated Mojo::DOM::attrs in favor of Mojo::DOM::attr. - Improved Mojo::UserAgent connection management to be fork-safe. 4.19 2013-07-21 - Improved invalid tag handling in Mojo::DOM::HTML. 4.18 2013-07-08 - Added --mode option to Morbo. - Fixed bug in Mojo::UserAgent where not all 2xx responses would be accepted for CONNECT requests. 4.17 2013-07-04 - Updated jQuery to version 2.0.3. - Improved Mojo::IOLoop::Server to use Perfect Forward Secrecy for TLS. - Fixed Mojo::Transaction::WebSocket to generate RFC 6455 compliant Sec-WebSocket-Key headers. (josh) - Fixed bug where not all uppercase methods were hidden from the router. 4.16 2013-06-19 - Improved Perl 5.10.x and 5.12.x compatibility. (trinitum) 4.15 2013-06-18 - Added around_action hook. - Improved ojo to make the current controller object available to actions as $_. (jberger, sri) - Fixed a few error reporting bugs in Mojo::IOLoop::Client and Mojo::IOLoop::Server. - Fixed small emit_chain bug in Mojolicious::Plugins. 4.14 2013-06-10 - Improved url_for performance slightly. - Fixed bug where match attribute and render_later method were not hidden from the router. 4.13 2013-06-09 - Replaced ua method in Mojolicious::Controller with a helper. - Fixed url_for support for absolute URLs without scheme or authority. (bduggan, sri) 4.12 2013-06-07 - Improved Mojo::Message::Request to allow a few more ASCII characters in URLs. 4.11 2013-06-03 - Added allow and append methods to Mojo::Headers. - Added split_header function to Mojo::Util. - Fixed cookie quoting bugs. - Fixed a few small boundary and charset detection bugs in Mojo::Content. - Fixed a few small filename detection bugs in Mojo::Message. - Fixed small quality detection bug in Mojolicious::Types. 4.10 2013-06-01 - Added link and vary methods to Mojo::Headers. 4.09 2013-05-31 - Updated jQuery to version 2.0.2. - Increased default max_message_size from 5MB to 10MB in Mojo::Message. 4.08 2013-05-30 - Improved Mojo::Message::Request to allow curly brackets in URLs. - Improved HMAC-SHA1 performance in Mojo::Util. 4.07 2013-05-26 - Updated jQuery to version 2.0.1. - Fixed format handling in routes command. 4.06 2013-05-25 - Fixed Windows bug in "log.t". 4.05 2013-05-24 - Fixed encoding bug in Mojo::Log. 4.04 2013-05-23 - Added WebSocket subprotocol support to Mojo::UserAgent::Transactor. 4.03 2013-05-21 - Fixed redirect support in get command. 4.02 2013-05-20 - Fixed extends, layout and title helpers not to generate unnecessary log messages. 4.01 2013-05-19 - Fixed small drain event bug in Mojo::IOLoop::Stream. (ChinaXing) 4.0 2013-05-15 - Code name "Top Hat", this is a major release. - Added simple JSON serialization and deserialization support to Mojo::Transaction::WebSocket. - Added json event to Mojo::Transaction::WebSocket. - Added render_maybe method to Mojolicious::Controller. - Added again methods to Mojo::Reactor, Mojo::Reactor::Poll and Mojo::Reactor::EV. - Added is_empty method to Mojo::Transaction::HTTP. - Added close_gracefully method to Mojo::IOLoop::Stream. - Changed Mojolicious default secret to the application moniker to make it slightly more secure. - Changed types in Mojolicious::Types to consistently use arrays. - Changed heuristics for number detection in Mojo::JSON to better line up with user expectations. - Changed render and render_static methods in Mojolicious::Controller to call render_not_found if no response could be generated. - Removed callback support from body method in Mojo::Message. - Removed Mojolicious::Plugin::PoweredBy and Mojolicious::Plugin::RequestTimer. - Removed pair_separator attribute from Mojolicious::Parameters. - Removed data attribute from Mojo::URL. - Removed captures attribute from Mojolicious::Routes::Match. - Removed charset attribute from Mojo::DOM::HTML. - Removed charset method from Mojo::DOM. - Removed render_data, render_json, render_partial and render_text methods from Mojolicious::Controller. - Removed json_content_is method from Test::Mojo. - Removed has_leftovers method from Mojo::Content. - Removed is_chunked, is_dynamic, is_multipart, has_leftovers, leftovers, write and write_chunk methods from Mojo::Message. - Removed hmac_md5_sum method from Mojo::ByteStream. - Removed hmac_md5_sum function from Mojo::Util. - Removed memorize helper. - Removed deprecated end method from Mojo::IOLoop::Delay. - Removed deprecated build_form_tx, build_json_tx, post_form and post_json methods from Mojo::UserAgent. - Removed deprecated form and json methods from Mojo::UserAgent::Transactor. - Removed deprecated post_form_ok and post_json_ok methods from Test::Mojo. - Removed deprecated f and n functions from ojo. - Removed deprecated after_static_dispatch hook. - Renamed shape_match method in Mojolicious::Routes::Pattern to match_partial. - Reduced idle CPU usage of Mojo::IOLoop. - Increased default lock_timeout from 0.5 to 1 second in Mojo::Server::Prefork and Mojo::Server::Hypnotoad. - Improved Mojo::IOLoop performance significantly and reduced CPU usage when managing more than 10k concurrent connections. - Improved Mojolicious to be able to detect the current operating mode from the PLACK_ENV environment variable. - Improved Mojolicious to not trap exceptions if the default exception handling has been deactivated. - Improved json_is and json_message_is methods in Test::Mojo by making the JSON Pointer optional. (jberger) - Improved renderer performance. - Improved Mojo::DOM::HTML performance. - Improved Mojo::Reactor::Poll performance. - Improved html_unescape performance in Mojo::Util. - Improved Mojolicious::Plugin::EPLRenderer to cache templates more efficiently. - Fixed Perl 5.17.11+ compatibility. - Fixed Mojo::JSON to encode "inf" and "nan" values as strings. (chansen) - Fixed a few authority and rendering bugs in Mojo::URL. - Fixed layout bugs in Mojolicious::Renderer. - Fixed support for HEAD request method in Mojo::Server::CGI and Mojo::Server::PSGI. - Fixed small line directive bug in Mojo::Template. - Fixed small limit bug in Mojo::Message. 3.97 2013-04-25 - Added data attribute to Mojo::URL. - Improved compatibility with IO::Socket::SSL 1.87. - Improved Test::Mojo diagnostics messages. - Fixed a few small timing bugs in WebSocket tests. 3.96 2013-04-22 - Updated jQuery to version 2.0. - Updated prettify.js to version 4-Mar-2013. - Improved Mojo::URL to be able to contain scheme data for unknown schemes. - Improved form content generator for GET and HEAD requests. (jberger) - Improved default descriptions in Test::Mojo. - Fixed host normalization bug in Mojo::URL. - Fixed small html_unescape bug in Mojo::Util. - Fixed small encoding bug in routes command. - Fixed a few small clone bugs. - Fixed a few small redirect and proxy connect bugs in Mojo::UserAgent::Transactor. - Fixed a few small method handling bugs in Mojo::Transaction::HTTP. 3.95 2013-04-12 - Added finished_ok method to Test::Mojo. - Removed deprecated slurp_rel_file method from Mojo::Home. - Removed deprecated html_escape function from Mojo::Util. - Improved Mojo::Transaction::WebSocket with support for status codes and reasons. - Fixed message size limit bug in Mojo::Transaction::WebSocket. - Fixed a few small timing bugs in Mojo::Server::Daemon. - Fixed small description bug in Test::Mojo. 3.94 2013-04-08 - Added is_hidden method to Mojolicious::Routes. - Removed deprecated start method from Mojolicious::Commands. - Fixed small selector bug in get command. - Fixed small anchor bug in Mojolicious::Plugin::PODRenderer. 3.93 2013-04-05 - Deprecated Mojo::IOLoop::Delay::end in favor of generated callbacks. - Improved Mojo::IOLoop::Delay to be able to generate callbacks that can capture all arguments. - Improved prefork command to allow -a and -L values below 1 second. - Fixed multiple timing bugs in Mojo::IOLoop::Delay. 3.92 2013-04-03 - Added monotonic clock support to make Mojolicious more resilient to time jumps. - Added steady_time function to Mojo::Util. - Removed deprecated namespace method from Mojolicious::Routes. - Removed deprecated base_tag helper. - Improved WebSocket send method to stringify objects. (jberger) - Improved version command to show required versions of optional dependencies. - Fixed RFC 6901 compliance of Mojo::JSON::Pointer. (jberger, sri) - Fixed a few small Unicode bugs in get command. 3.91 2013-03-17 - Improved bad charset handling in Mojo::DOM::HTML. - Fixed HTTPS proxy support for blocking requests in Mojo::UserAgent. - Fixed support for RFC 2817 in Mojo::Message::Request. - Fixed whitespace bug in Mojo::DOM::HTML. - Fixed proxy detection bug in get command. 3.90 2013-03-14 - Added direct array access for parsed parameters to Mojo::Parameters. - Added direct array access for path parts to Mojo::Path. - Improved dumper helper to sort hash keys. - Fixed bug in Mojo::Headers that prevented multi-line headers from being parsed correctly. - Fixed multi-line header support in hash representation of Mojo::Headers. - Fixed cloning bug in Mojo::Headers. 3.89 2013-03-04 - Fixed installable scripts to not "use lib", which sadly breaks updated dual-life modules. (jberger, sri) - Fixed bug preventing delayed normalization for reused Mojo::Path objects. - Fixed path matching bug in Mojo::Path. 3.88 2013-03-03 - Improved Mojo::Path to delay normalization as long as possible. - Improved Mojo::Path performance. - Fixed small domain detection bug in Mojo::UserAgent::CookieJar. 3.87 2013-02-23 - Added deprecated function to Mojo::Util. (marcus) - Removed deprecated render_content helper. 3.86 2013-02-22 - Welcome to the Mojolicious core team Joel Berger. - Improved portability of Mojo::Asset::File tests. - Fixed path generation bug in Mojolicious::Routes::Pattern. (jberger) - Fixed small domain detection bug in Mojo::UserAgent::CookieJar. (dione, sri) - Fixed comment lines in Mojo::Template to cover the whole line. 3.85 2013-02-13 - Deprecated Mojo::UserAgent::build_form_tx in favor of Mojo::UserAgent::build_tx. - Deprecated Mojo::UserAgent::build_json_tx in favor of Mojo::UserAgent::build_tx. - Deprecated Mojo::UserAgent::post_form in favor of Mojo::UserAgent::post. - Deprecated Mojo::UserAgent::post_json in favor of Mojo::UserAgent::post. - Deprecated Mojo::UserAgent::Transactor::form in favor of Mojo::UserAgent::Transactor::tx. - Deprecated Mojo::UserAgent::Transactor::json in favor of Mojo::UserAgent::Transactor::tx. - Deprecated Test::Mojo::post_form_ok in favor of Test::Mojo::post_ok. - Deprecated Test::Mojo::post_json_ok in favor of Test::Mojo::post_ok. - Deprecated ojo::f in favor of ojo::p. - Deprecated ojo::n in favor of ojo::p. - Added support for pluggable content generators to Mojo::UserAgent::Transactor. (judofyr, sri) - Added generators attribute to Mojo::UserAgent::Transactor. - Added add_generator method to Mojo::UserAgent::Transactor. - Updated jQuery to version 1.9.1. - Fixed memory leak in development not found page. - Fixed custom temporary directory bug in Mojo::Asset::File. 3.84 2013-01-30 - Deprecated after_static_dispatch hook in favor of before_routes. - Added after_static hook. - Fixed small file descriptor leak in Mojo::UserAgent. 3.83 2013-01-27 - Moved bundled static files to mojo directory. - Fixed small Getopt::Long configuration bug in Mojolicious::Commands. 3.82 2013-01-18 - Fixed Windows bugs in tests. (kmx, sri) 3.81 2013-01-17 - Added modules Mojo::Server::Prefork and Mojolicious::Command::prefork. - Added lookup method to Mojolicious::Routes. - Updated jQuery to version 1.9. - Improved url_for performance significantly. - Improved Mojo::Server::Hypnotoad to be a small wrapper around Mojo::Server::Prefork. - Fixed small memory leak in Hypnotoad that only shows when Perl is compiled with -DPERL_USE_SAFE_PUTENV. (lewoberst) 3.80 2013-01-15 - Deprecated testing WebSocket messages without calling Test::Mojo::message_ok. - Deprecated Mojo::Util::html_escape in favor of Mojo::Util::xml_escape. - Deprecated Mojo::ByteStream::html_escape in favor of Mojo::ByteStream::xml_escape. - Deprecated Mojo::Home::slurp_rel_file in favor of Mojo::Util::slurp. - Added message attribute to Test::Mojo. - Added json_message_has, json_message_hasnt and message_ok methods to Test::Mojo. - Fixed support for multi-character entities in Mojo::Util. 3.79 2013-01-13 - Fixed small domain detection bug in Mojo::UserAgent::CookieJar. 3.78 2013-01-13 - Added to_dir method to Mojo::Path. - Fixed domain and path detection bugs in Mojo::UserAgent::CookieJar. - Fixed IDNA support in Mojo::UserAgent::CookieJar. 3.77 2013-01-12 - Added support for advanced binary WebSocket message tests to Test::Mojo. - Added binary and text events to Mojo::Transaction::WebSocket. - Added json_message_is method to Test::Mojo. - Added j function to Mojo::JSON. - Updated a few example scripts. - Fixed aliasing bug in Mojo::EventEmitter. - Fixed WebSocket cookie bug in Mojo::UserAgent. - Fixed small upgrade bugs in Mojo::UserAgent::Transactor. 3.76 2013-01-10 - Added support for multiple uploads sharing the same name to Mojo::UserAgent::Transactor. - Improved performance and memory usage of Mojo::EventEmitter. - Fixed support for multiple uploads in Mojolicious::Controller. 3.75 2013-01-08 - Added to_route method to Mojo::Path. - Improved router performance slightly. 3.74 2013-01-07 - Fixed bug where Mojolicious::Lite applications in modules would generate the wrong moniker. 3.73 2013-01-06 - Deprecated Mojolicious::Commands::start in favor of Mojolicious::Commands::start_app. - Added moniker attribute to Mojolicious. - Added after_render hook. - Improved name detection in Mojolicious::Plugin::Config. 3.72 2013-01-05 - Deprecated base_tag helper. 3.71 2013-01-02 - Modernized ".travis.yml". - Improved Mojo::EventEmitter to warn about unhandled error events. - Improved Mojo::UserAgent to warn more often about failed events. - Improved monkey_patch to patch multiple functions at once. (jberger) - Fixed small memory leak in Mojo::DOM. 3.70 2012-12-23 - Added accept_interval setting to Hypnotoad. - Reduced idle CPU usage of Mojo::Reactor::Poll. - Improved Mojo::Server to die more gracefully if an application class could not be found. 3.69 2012-12-20 - Deprecated Mojolicious::Routes::namespace in favor of Mojolicious::Routes::namespaces. - Added color_field helper to Mojolicious::Plugin::TagHelpers. - Added date_field helper to Mojolicious::Plugin::TagHelpers. - Added datetime_field helper to Mojolicious::Plugin::TagHelpers. - Added email_field helper to Mojolicious::Plugin::TagHelpers. - Added month_field helper to Mojolicious::Plugin::TagHelpers. - Added number_field helper to Mojolicious::Plugin::TagHelpers. - Added range_field helper to Mojolicious::Plugin::TagHelpers. - Added search_field helper to Mojolicious::Plugin::TagHelpers. - Added tel_field helper to Mojolicious::Plugin::TagHelpers. - Added time_field helper to Mojolicious::Plugin::TagHelpers. - Added url_field helper to Mojolicious::Plugin::TagHelpers. - Added week_field helper to Mojolicious::Plugin::TagHelpers. - Improved Mojo::Base to use utf8. 3.68 2012-12-16 - Added monkey_patch function to Mojo::Util. - Added ".travis.yml". - Modernized ".gitignore". - Updated jQuery to version 1.8.3. - Converted README to markdown. - Fixed small export bug in Mojolicious::Lite. (jberger) 3.67 2012-12-15 - Added support for MIME type prioritization to Mojolicious::Types. - Improved respond_to to prioritize multiple MIME types if the X-Requested-With header is set to the value "XMLHttpRequest". 3.66 2012-12-14 - Added request_ok method to Test::Mojo. - Fixed multipart boundary detection bug in Mojo::Content. - Fixed format regex generation bug in Mojolicious::Routes::Pattern. 3.65 2012-12-09 - Added upgrade method to Mojo::UserAgent::Transactor. - Added is_range method to Mojo::Asset. - Fixed parameter replacement bug in Mojo::Parameters. (alexbyk, sri) - Fixed small paragraph bug in Mojo::DOM::HTML. 3.64 2012-12-01 - Fixed bug where Mojo::UserAgent::Transactor would escape Content-Disposition values. 3.63 2012-11-28 - Added support for smooth restarting to Morbo. - Added acceptor method to Mojo::IOLoop. - Added stop method to Mojo::Server::Daemon. - Improved memory usage of chunked transfer encoding parser in Mojo::Content. 3.62 2012-11-26 - Improved compatibility with IO::Socket::SSL 1.79. - Improved encode/decode performance in Mojo::Util by using a cache. - Fixed clone bugs in Mojo::URL. 3.61 2012-11-25 - Added protocol method to Mojo::URL. - Added charset attribute to Mojo::Path. - Improved support for relative redirects in Mojo::UserAgent::Transactor. - Fixed clone bugs in Mojo::Parameters and Mojo::URL. - Fixed case-sensitivity bugs in Mojo::UserAgent::Transactor. 3.60 2012-11-22 - Added unexpected event to Mojo::Transaction::HTTP. - Fixed Mojo::UserAgent to ignore unexpected 1xx responses. 3.59 2012-11-20 - Fixed memory leak in Mojo::Message::Request. - Fixed keep-alive bug in Mojo::Server::Daemon. 3.58 2012-11-19 - Fixed state bugs in Mojo::Content::MultiPart. - Fixed Mojo::UserAgent to remove codes from parser errors. 3.57 2012-11-12 - Deprecated Mojo::Exception::raw_message. - Improved error message accuracy in Mojo::Template by using line directives. - Improved performance of contains method in Mojo::Asset::File by 100%. - Fixed range bug in Mojo::Asset::Memory. 3.56 2012-11-09 - Improved performance of contains method in Mojo::Asset::File significantly. - Fixed offset bug in Mojo::Asset::File. 3.55 2012-11-08 - Added gzip compression support to Mojo::UserAgent. - Added is_compressed method to Mojo::Content. - Fixed bug that prevented around_dispatch hooks from working correctly in embedded applications. - Fixed small bug where "chunked" would not always be the default transfer encoding. 3.54 2012-11-01 - Added next and previous methods to Mojo::DOM. 3.53 2012-10-31 - Replaced Mojolicious::Guides::CodingGuidelines with Mojolicious::Guides::Contributing. 3.52 2012-10-26 - Added boolean shortcut support to Mojo::JSON. - Added escape attribute to Mojo::Template. (jberger) - Added max_buffer_size attribute to Mojo::Content. - Added is_limit_exceeded method to Mojo::Content. 3.51 2012-10-23 - Fixed multiple small context bugs. 3.50 2012-10-20 - Improved option handling of all commands. 3.49 2012-10-19 - Fixed % escaping bug in Mojo::Parameters. (dmw397) 3.48 2012-10-16 - Improved Mojo::Content performance slightly. - Fixed memory leak in Mojo::Headers. 3.47 2012-10-13 - Added all method to Mojo::UserAgent::CookieJar. - Fixed WebSocket bug in Mojo::Content. 3.46 2012-10-11 - Improved router and renderer to allow CamelCase controllers. 3.45 2012-10-10 - Added multi_accept attribute to Mojo::IOLoop. - Added multi_accept attribute to Mojo::IOLoop::Server. - Added multi_accept setting to Hypnotoad. - Relaxed comment handling in Mojo::DOM::HTML a little. (jberger) - Improved accept performance of all built-in web servers significantly. - Improved responsiveness of documentation browser. - Improved documentation browser CSS. (tempire) 3.44 2012-09-29 - Improved html_escape to favor lowercase entities. (judofyr) - Improved javascript and stylesheet helpers to not generate type attributes. 3.43 2012-09-22 - Updated jQuery to version 1.8.2. - Improved Hypnotoad to clean up old PID files containing a 0. (coffeemonster) 3.42 2012-09-16 - Improved Hypnotoad to clean up old PID files. 3.41 2012-09-13 - Improved Mojo::EventEmitter to warn about failed error events. - Improved resilience of Mojo::IOLoop exception handling. - Fixed small CGI bug. 3.40 2012-09-11 - Fixed Perl 5.10.1 compatibility. - Fixed FindBin support in Mojolicious applications. - Fixed a few multipart bugs. 3.39 2012-09-10 - Improved Mojo::URL and Mojo::Parameters performance. - Fixed support for query parameters in Mojolicious::Plugin::Charset. 3.38 2012-09-07 - Added xor_encode method to Mojo::ByteStream. - Added xor_encode function to Mojo::Util. - Fixed small xor_encode bug. (dod, crab) 3.37 2012-09-04 - Added finish method to Mojo::Message. - Updated jQuery to version 1.8.1. - Fixed Mojo::Transaction to propagate connection close to Mojo::Message. - Fixed small state bug in Mojo::Transaction. 3.36 2012-08-30 - Fixed small multipart bug. 3.35 2012-08-28 - Deprecated Mojolicious::Controller::render_content in favor of content helper. - Improved Mojolicious::Plugin::Config to accept mode specific configuration files without a normal configuration file. (alexbyk, sri) 3.34 2012-08-24 - Improved documentation. 3.33 2012-08-23 - Improved Mojo::DOM::HTML to handle bad charsets more gracefully. 3.32 2012-08-20 - Added event sequentialization support to delay method in Mojo::IOLoop. (judofyr, marcus, sri) - Added support for expiration session value to Mojolicious::Sessions. - Added steps method to Mojo::IOLoop::Delay. (judofyr, marcus, sri) - Added tap method to Mojo::Base. - Added squish method to Mojo::ByteStream. - Added squish function to Mojo::Util. - Fixed json_has method in Test::Mojo. - Fixed bug in Mojo::Log that prevented some message events from being emitted. - Fixed get command to allow ":" character in header values. - Fixed small class_to_file bug. - Fixed a few small namespace handling bugs. 3.31 2012-08-15 - Added accept_charset, accept_encoding, content_encoding, origin and sec_websocket_extensions methods to Mojo::Headers. 3.30 2012-08-14 - Added te method to Mojo::Headers. - Fixed small content encoding bug in Mojo::Message. 3.29 2012-08-13 - Fixed small timing bugs in WebSocket and TLS tests. 3.28 2012-08-10 - Added skip_body attribute to Mojo::Content. - Added is_empty method to Mojo::Message::Response. - Updated jQuery to version 1.8. - Improved Mojo::Base to assign names to generated subroutines. - Improved message parser performance slightly. - Fixed 1xx, 204 and 304 response support. 3.27 2012-08-09 - Improved tests. 3.26 2012-08-09 - Improved tests. 3.25 2012-08-08 - Fixed cleanup bugs in Mojo::Server::Daemon and Mojo::UserAgent. 3.24 2012-08-08 - Improved tests. 3.23 2012-08-07 - Added appcache MIME type. 3.22 2012-08-06 - Added mp4, ogg, ogv and webm MIME types. - Removed x- prefix from js and woff MIME types. - Fixed gz and xml MIME types. 3.21 2012-08-05 - Fixed Perl 5.17.3+ compatibility. - Fixed small AUTOLOAD bug in Mojolicious::Lite. 3.20 2012-08-04 - Added extract_start_line methods to Mojo::Message, Mojo::Message::Request and Mojo::Message::Response. - Added get_start_line_chunk methods to Mojo::Message::Request and Mojo::Message::Request. - Improved end method in Mojo::IOLoop::Delay to return the number of remaining events. 3.19 2012-08-03 - Fixed dynamic content generation bug in Mojo::Message. - Fixed bug that prevented multiple anchors with the same name in Mojolicious::Plugin::PODRenderer. 3.18 2012-08-02 - Fixed chunked transfer encoding bug in Mojo::Content. 3.17 2012-08-01 - Fixed bug in after_static_dispatch hook that prevented custom responses. - Fixed bug that prevented conditions from generating responses. 3.16 2012-07-31 - Fixed small memory leak in Mojolicious::Plugin::TagHelpers. 3.15 2012-07-28 - Improved Mojo::Base to load IO::Handle. 3.14 2012-07-27 - Improved documentation. 3.13 2012-07-24 - Added multi-name support to param method in Mojolicious::Controller. - Added remove method to Mojo::DOM. - Improved RFC 3986 compliance of Mojo::Parameters. - Improved Mojolicious::Plugin::Config log messages. (jberger) - Fixed selector bug in dom method of Mojo::Message. - Fixed small charset bug in get command. 3.12 2012-07-20 - Deprecated Mojo::Home::app_class. - Deprecated Mojo::IOLoop::client_class. - Deprecated Mojo::IOLoop::server_class. - Deprecated Mojo::IOLoop::stream_class. - Deprecated Mojo::Message::dom_class. - Deprecated Mojo::Message::json_class. - Added json method to Mojo::UserAgent::Transactor. - Added build_json_tx and post_json methods to Mojo::UserAgent. - Added post_json_ok method to Test::Mojo. - Added n function to ojo. - Improved text_field helper to always set the type attribute. (marty, sri) - Fixed file and content type detection bugs in Mojolicious::Static. (marty, sri) 3.11 2012-07-19 - Added or method to Test::Mojo. (moritz, sri) - Added file and serve_asset methods to Mojolicious::Static. - Improved default descriptions for many methods in Test::Mojo. - Improved Mojo::Cache performance. (nic) - Fixed a few small encoding bugs in Test::Mojo. 3.10 2012-07-17 - Fixed small bug in Mojo::Asset::File. 3.09 2012-07-16 - Added spurt function to Mojo::Util. - Added spurt method to Mojo::ByteStream. 3.08 2012-07-14 - Fixed small Mojo::Template bug. 3.07 2012-07-13 - Improved template error messages for generator commands and configuration files. - Fixed small bug in Mojolicious::Plugin::EPRenderer that prevented code to be added to templates. - Fixed small bug in Mojolicious::Plugin::JSONConfig that prevented code to be added to configuration files. 3.06 2012-07-11 - Added tls_verify option to Mojo::IOLoop::Server::listen. (scottw) - Added verify parameter to Mojo::Server::Daemon::listen. (scottw) - Fixed small bug in Mojo::UserAgent that prevented port reuse. 3.05 2012-07-08 - Reduced default graceful_timeout from 30 to 20 seconds in Mojo::Server::Hypnotoad. - Fixed small initialization bug in Mojo::IOLoop::Stream. 3.04 2012-07-07 - Improved Mojo::IOLoop performance by reducing stream timeout precision from 0.025 to 0.5 seconds. 3.03 2012-07-06 - Improved load balancing between Hypnotoad worker processes. - Improved Hypnotoad log messages. - Fixed default format handling bug in render_exception and render_not_found. - Fixed small namespace detection bug in Mojo::DOM. - Fixed small session reset bug in Test::Mojo. 3.02 2012-07-03 - Added pluck and uniq methods to Mojo::Collection. - Added regular expression support to first and grep methods in Mojo::Collection. - Fixed JSON Pointer escaping. - Fixed small text and attribute extraction bugs in Mojo::DOM. - Fixed small inconsistency between routes and static dispatchers. 3.01 2012-07-01 - Improved CSS of built-in templates. 3.0 2012-06-25 - Code name "Rainbow", this is a major release. - Removed Mojolicious::Plugin::I18N so it can be maintained as a separate distribution. - Removed app_class attribute from Mojo::Server. - Removed qp_decode and qp_encode methods from Mojo::ByteStream. - Removed qp_decode and qp_encode functions from Mojo::Util. - Removed render_to_file and render_file_to_file methods from Mojo::Template. - Renamed Mojo::CookieJar to Mojo::UserAgent::CookieJar. - Renamed Mojo::Command to Mojolicious::Command. - Renamed format, reqs, symbol_start and symbols attributes in Mojolicious::Routes::Pattern to format_regex, constraints, placeholder_start and placeholders. - Merged get_all_data and get_data methods from Mojo::Command into data method in Mojo::Loader. - Moved class_to_file and class_to_path methods from Mojo::Command to Mojo::Util. - Updated IO::Socket::SSL requirement to 1.75 for IO::Socket::IP support. - Switched back from IO::Socket::INET6 to IO::Socket::IP for IPv6 support. - Switched from HMAC-MD5 to HMAC-SHA1 for signed cookies. - Added slurp function to Mojo::Util. - Added slurp method to Mojo::ByteStream. - Added j and r functions to ojo. (sharifulin, sri) - Added accept_interval attribute to Mojo::IOLoop. - Added support for new HTTP status code. - Modernized ".perltidyrc". - Improved Mojo::IOLoop::Server to prioritize RC4 cipher, which mitigates the BEAST attack. (Danny Thomas) - Improved not found page to highlight custom route names. - Improved to method in Mojolicious::Routes::Route to give easier access to default parameters. - Improved message parser performance slightly. - Fixed bug that prevented sessions from working in embedded applications. - Fixed JSON Pointer escaping. - Fixed small JSON Pointer bug in get command. (avkhozov) - Fixed small application initialization bug in Mojo::Server. 2.98 2012-05-30 - Switched from IO::Socket::IP to IO::Socket::INET6 for IPv6 support. - Improved IPv6 exception handling in Mojo::IOLoop::Client. - Fixed array appending bug in Mojo::Parameters. 2.97 2012-05-28 - Added workaround to make IO::Socket::SSL work with IO::Socket::IP. - Removed Bonjour support. - Fixed bug that prevented Test::Mojo from working with normal Mojolicious applications that use Mojolicious::Plugin::Config. - Fixed a few small Unicode bugs in documentation. 2.96 2012-05-21 - Added merge method to Mojo::Path. - Fixed small memory leak in Mojolicious. - Fixed small bug that prevented already prepared IO::Socket::SSL handles to be used by Mojo::UserAgent. - Fixed small Mojo::URL and Mojo::Path stringification bugs. 2.95 2012-05-10 - Fixed bug that caused inactivity timeouts to be logged too often. 2.94 2012-05-09 - Added support for 308 redirects to Mojo::UserAgent. - Added support for new HTTP status codes. - Improved exception handling of all scripts. - Improved built-in web servers to log inactivity timeouts as debug messages instead of errors. - Fixed html_escape to always use entities with semicolon. (OlegG, crab) - Fixed typo in 414 status message. - Fixed small cookie formatting bug. - Fixed small bug in cookie parser. - Fixed small backlog bug in Mojo::Server::Daemon. 2.93 2012-05-05 - Added remove method to Mojolicious::Routes::Route. - Improved 32-bit Perl support of Mojo::Transaction::WebSocket. (mikemagowan, sri) - Improved exception handling of application and configuration file loaders. - Improved exception handling of Mojolicious::Plugin::I18N. - Improved renderer log messages. - Fixed bug that prevented helper names from starting with "end". (Akron) - Fixed bug that prevented helper names from ending with "begin". - Fixed empty frame handling in Mojo::Transaction::WebSocket. - Fixed small rendering bug in Mojolicious::Plugin::PODRenderer. - Fixed small code generation bug in Mojolicious::Plugin::I18N. - Fixed small escaping bug in Mojo::URL. 2.92 2012-04-30 - Added commands attribute to Mojolicious. - Fixed attribute namespace selector bugs in Mojo::DOM::CSS. 2.91 2012-04-26 - Added cookies method to Mojo::Message. - Updated HTML5 entities in Mojo::Util. 2.90 2012-04-25 - Fixed small JavaScript bug in Mojolicious::Plugin::PODRenderer. 2.89 2012-04-24 - Made logo on built-in templates smaller. - Improved CSS of built-in templates. 2.88 2012-04-24 - Improved documentation. 2.87 2012-04-23 - Improved html_escape performance and added pattern support. - Fixed small escaping bug. 2.86 2012-04-23 - Added support for TO_JSON method to Mojo::JSON. - Updated HTML5 entities in Mojo::Util. - Increased default heartbeat_timeout from 10 to 20 seconds in Mojo::Server::Hypnotoad. - Improved Mojo::Template exception handling. - Improved ojo exception handling. - Fixed a few HTML5 unescaping bugs. 2.85 2012-04-19 - Modernized ".perltidyrc". - Fixed bug in "user_agent.t". 2.84 2012-04-19 - Fixed flash. 2.83 2012-04-18 - Added hostname verification support to Mojo::IOLoop::Client and Mojo::UserAgent. - Added SNI support to Mojo::IOLoop::Client and Mojo::UserAgent. - Fixed bug that prevented conditions to work in embedded applications. - Fixed bug that changed default values in embedded applications. - Fixed small bug in cpanify command. 2.82 2012-04-16 - Deprecated relaxed placeholders "/(.foo)" in favor of "/#foo". - Deprecated Mojolicious::Routes::Route::waypoint. - Deprecated Mojolicious::Routes::Route::block. - Improved Mojolicious::Routes::Pattern to render formats. - Improved regex formatting in routes command. 2.81 2012-04-15 - Improved router to allow disabled format detection to be inheritable by nested routes. - Improved error handling in Mojolicious::Plugin::JSONConfig. - Improved match method in Mojolicious::Routes::Pattern to support format detection. - Improved router log messages. - Improved all debug messages. - Fixed format detection bugs in Mojolicious::Routes::Pattern. - Fixed format handling in routes command. 2.80 2012-04-10 - Added support for alternative MIME types to Mojolicious::Types. - Added endpoint method to Mojo::UserAgent::Transactor. - Fixed HTTPS proxy keep-alive bug in Mojo::UserAgent. 2.79 2012-04-10 - Improved makefile and plugin generators to always use the latest Mojolicious version. - Fixed HTTPS proxy support in Mojo::UserAgent. - Fixed multiple Mojo::UserAgent::Transactor bugs. 2.78 2012-04-09 - Improved Mojolicious::Routes to allow redispatching controllers. - Improved Mojolicious::Routes logging. 2.77 2012-04-09 - Improved Mojo::Transaction::WebSocket to allow custom message parsers. - Improved help command to be less strict. - Fixed bug that prevented -h and --help options from working for generator commands. - Fixed small bug that prevented non-string secrets in Mojolicious. 2.76 2012-04-05 - Improved documentation. 2.75 2012-04-05 - Fixed small bug in params method of Mojo::Parameters. 2.74 2012-04-04 - Fixed multiple small bugs in form method of Mojo::UserAgent::Transactor. 2.73 2012-04-03 - Fixed multiple progress event bugs in Mojo::Message. 2.72 2012-04-03 - Added kept_alive method to Mojo::Transaction::WebSocket. 2.71 2012-04-03 - Improved Hypnotoad error handling. - Improved version command to detect proxy servers automatically. - Fixed small argument bug in to_hash method of Mojo::Headers. 2.70 2012-03-30 - Improved speed of version command by switching to the MetaCPAN API. - Improved all bundled TLS test certificates to expire at the same time. - Fixed handler detection precedence bug in Mojolicious::Renderer. - Fixed ability to disable inactivity timeout in Hypnotoad. - Fixed ability to disable accepts limit in Hypnotoad. - Fixed small bug in get_all_data method of Mojo::Command. - Fixed small bug in inflate command. (memowe) 2.69 2012-03-26 - Removed X-Forwarded-Host support since it is redundant for well configured reverse proxies. - Changed number of redirects ojo and the get command will follow to 10. - Improved ojo to detect proxy servers automatically. - Improved Mojo::DOM::CSS performance. - Improved Mojo::Reactor tests to be less strict. - Fixed a bug where paths and classes in Mojolicious::Static and Mojolicious::Renderer would have the wrong precedence. - Fixed small bug where Hypnotoad would ignore the MOJO_REVERSE_PROXY environment variable. 2.68 2012-03-24 - Fixed generate command. 2.67 2012-03-24 - Added start_app method to Mojo::Command. - Fixed small bugs in Mojo::Command and Mojolicious::Commands. 2.66 2012-03-23 - Reformatted "Changes". - Improved Mojo::Reactor::Poll performance. - Fixed one_tick semantics to be equal in Mojo::Reactor::Poll and Mojo::Reactor::EV. 2.65 2012-03-22 - Deprecated Mojo::IOLoop::drop in favor of Mojo::IOLoop::remove. - Renamed Mojo::Reactor::drop to Mojo::Reactor::remove. - Added module Mojo::Reactor::Poll. - Added one_tick methods to Mojo::Reactor and Mojo::Reactor::EV. - Removed experimental status from Mojo::IOLoop::Client. - Removed experimental status from Mojo::IOLoop::Server. - Removed experimental status from Mojo::IOLoop::Stream. - Removed experimental status from Mojo::Reactor. - Removed experimental status from Mojo::Reactor::EV. - Removed experimental status from client_class, max_accepts, reactor, server_class and stream_class attributes in Mojo::IOLoop. - Removed experimental status from client server and stream methods in Mojo::IOLoop. - Updated jQuery to version 1.7.2. 2.64 2012-03-21 - Deprecated Mojolicious::Routes::controller_base_class in favor of Mojolicious::Routes::base_classes. - Removed handle argument from io watchers in Mojo::Reactor. 2.63 2012-03-20 - Renamed Mojo::IOWatcher to Mojo::Reactor. - Added module Mojolicious::Routes::Route. - Added find and root methods to Mojolicious::Routes::Route. - Improved form_for helper to automatically add method="POST" attributes when necessary. - Improved memory usage of Mojolicious::Routes. - Improved Mojolicious::Renderer performance. - Fixed bug that slowed down Mojolicious::Renderer. - Fixed small newline capture bug in Mojolicious::Routes::Match. 2.62 2012-03-17 - Deprecated Mojolicious::Renderer::default_template_class in favor of Mojolicious::Renderer::classes. - Deprecated Mojolicious::Static::default_static_class in favor of Mojolicious::Static::classes. - Added options function to Mojolicious::Lite. - Added options method to Mojolicious::Routes. - Added options method to Mojo::UserAgent. - Added options_ok method to Test::Mojo. - Added o function to ojo. - Removed experimental status from Mojo::Cache. - Removed experimental status from Mojo::DOM::CSS. - Removed experimental status from Mojo::DOM::HTML. - Removed experimental status from Mojo::Server::Morbo. - Removed experimental status from Mojo::Transaction::WebSocket. - Removed experimental status from Mojo::UserAgent::Transactor. - Removed experimental status from Mojolicious::Command::cpanify. - Removed experimental status from upgrade event in Mojo::Transaction::HTTP. - Removed experimental status from t helper in Mojolicious::Plugin::TagHelpers. - Removed experimental status from current_route and url_with helpers in Mojolicious::Plugin::DefaultHelpers. - Removed experimental status from websocket function in Mojolicious::Lite. - Removed experimental status from cache attribute in Mojolicious::Renderer. - Removed experimental status from format attribute in Mojolicious::Routes::Pattern. - Removed experimental status from ca and local_address, request_timeout and transactor attributes in Mojo::UserAgent. - Removed experimental status from cache attribute in Mojolicious::Routes. - Removed experimental status from send method in Mojolicious::Controller. - Removed experimental status from finish_ok, message_is, message_isnt, message_like, message_unlike, send_ok and websocket_ok methods in Test::Mojo. - Removed experimental status from detect method in Mojolicious::Types. - Removed experimental status from app_url, build_websocket_tx and websocket methods in Mojo::UserAgent. - Removed experimental status from emit_safe method in Mojo::EventEmitter. - Removed experimental status from to_psgi_app method in Mojo::Server::PSGI. - Removed experimental status from clone method in Mojo::Message::Request. - Removed experimental status from has_conditions, has_custom_name, has_websocket, is_websocket and websocket methods in Mojolicious::Routes. - Removed experimental status from clone, is_limit_exceeded and max_line_size methods in Mojo::Headers. - Removed experimental status from text_after, text_before and xml methods, as well as trim arguments in Mojo::DOM. - Removed experimental status from boundary, charset, clone, is_dynamic, progress and max_leftover_size methods in Mojo::Content. - Removed experimental status from clone method in Mojo::Content::MultiPart. - Removed experimental status from clone method in Mojo::Content::Single. - Removed experimental status from is_dynamic, is_limit_exceeded and max_line_size methods in Mojo::Message. - Improved Mojo::IOWatcher exception handling a little. - Improved Mojolicious::Routes logging. - Fixed port generation bug. (xaka) - Fixed IPv6 listen value bug in Mojo::Server::Daemon. 2.61 2012-03-14 - Merged Mojolicious exception handling into the around_dispatch hook, this will allow a whole new category of exception handling plugins. 2.60 2012-03-13 - Added EXPERIMENTAL current_route helper to Mojolicious::Plugin::DefaultHelpers. - Made text_area helper a little smarter. (sshaw, sri) - Improved inactivity timeout logging for WebSockets. - Fixed escaping bug in select_field and text_area helpers. - Fixed Windows bug in "asset.t". 2.59 2012-03-09 - Removed duplicate 2.58 directory. 2.58 2012-03-09 - Added support for MOJO_LISTEN environment variable. - Removed listen attribute from Mojo::Server::Morbo. - Improved event loop compatibility of Mojo::Server::PSGI. - Fixed Mojo::URL object handling bug in url_for. - Fixed bug in Hypnotoad that prevented disabling of reverse proxy support between zero downtime software upgrades. - Fixed small caching bug in Morbo file watcher. - Fixed Windows bug in "asset.t". 2.57 2012-03-03 - Replaced protection from excessively large form values in Mojo::Message with documentation. 2.56 2012-03-01 - Deprecated custom HTTPS listen values in favor of URLs for all built-in web servers. https://*:3000:/x/server.crt:/y/server.key:/z/ca.crt becomes https://*:3000?cert=/x/server.crt&key=/y/server.key&ca=/z/ca.crt - Removed experimental status from patch function in Mojolicious::Lite. - Removed experimental status from patch method in Mojolicious::Routes. - Removed experimental status from patch method in Mojo::UserAgent. - Removed experimental status from patch_ok method in Test::Mojo. - Removed experimental status from t function in ojo. - Fixed small inconsistency between Mojo::IOWatcher and Mojo::IOWatcher::EV where Mojo::IOWatcher wouldn't stop automatically when not watching for events anymore. - Fixed Mojo::IOLoop to clean up after itself. 2.55 2012-02-28 - Combined WebSocket timeout with normal inactivity timeout. 2.54 2012-02-27 - Deprecated class and method stash values in favor of controller and action. - Added EXPERIMENTAL patch function to Mojolicious::Lite. - Added EXPERIMENTAL patch method to Mojolicious::Routes. - Added EXPERIMENTAL patch method to Mojo::UserAgent. - Added EXPERIMENTAL patch_ok method to Test::Mojo. - Added EXPERIMENTAL t function to ojo. - Added support for MOJO_CONNECT_TIMEOUT, MOJO_INACTIVITY_TIMEOUT, MOJO_REQUEST_TIMEOUT and MOJO_WEBSOCKET_TIMEOUT environment variables. - Split up Mojolicious::Guides::Cheatsheet into more reference documentation. - Increased default connect timeout from 3 to 10 seconds in Mojo::UserAgent and Mojo::IOLoop::Client. - Improved resilience of Mojo::IOLoop::Stream. - Improved test command to colorize by default. - Fixed small rendering bug in Mojolicious::Plugin::PODRenderer. 2.53 2012-02-25 - Improved Hypnotoad with many info level log messages. - Improved resilience of Mojo::IOLoop::Stream. - Fixed Hypnotoad upgrade timeout bug. 2.52 2012-02-24 - Removed experimental status from config method in Mojo. - Renamed send_message method in Mojolicious::Controller to send. - Renamed send_message_ok method in Test::mojo to send_ok. - Renamed to_psgi method in Mojo::Server::PSGI to to_psgi_app. - Combined send_message and send_frame methods in Mojo::Transaction::WebSocket to send. - Improved emit_chain method in Mojolicious::Plugins to allow reforwarding. (jamadam) - Fixed bug that prevented Mojo::IOLoop from dying when started twice. - Fixed a cookie jar path parsing bug. (marcus) - Fixed multiple value bug in param method of Mojolicious::Controller. 2.51 2012-02-19 - Added EXPERIMENTAL to_psgi method to Mojo::Server::PSGI. - Removed experimental status from around_dispatch hook. - Removed experimental status from emit_chain method in Mojolicious::Plugins. - Removed experimental status from drain event in Mojo::Content. - Improved portability of scripts. - Fixed bug that can prevent foreign event loops from being able to control Mojo::IOLoop. 2.50 2012-02-18 - Added EXPERIMENTAL is_running methods to Mojo::IOWatcher and Mojo::IOWatcher::EV. - Added file upload support to param method in Mojolicious::Controller. - Removed gitignore command. - Improved Mojo::IOLoop to be controllable from foreign event loops. - Improved protection from excessively large form values in Mojo::Message. - Improved resilience of Mojo::IOLoop::Client. - Fixed Mojo::Template expressions and escaped expressions to consistently enforce scalar context. - Fixed small bugs in makefile command. (tempire, marcus, sri) 2.49 2012-02-13 - Deprecated Mojolicious::Renderer::root in favor of Mojolicious::Renderer::paths. (memowe, sri) - Deprecated Mojolicious::Static::root in favor of Mojolicious::Static::paths. (memowe, sri) - Added support for multiple "templates" and "public" directories to Mojolicious. (memowe, sri) - Improved version command to be more responsive. (crab) - Improved resilience of Mojo::IOLoop::Client. - Fixed parent combinator bug in Mojo::DOM::CSS. (sharifulin, sri) 2.48 2012-02-09 - Fixed Hypnotoad HTTPS bug. - Fixed small URL escaping bug in Mojo::UserAgent::Transactor. - Fixed small MIME::Base64 and MIME::QuotedPrint related bugs in Mojo::Util. (sestegra, sri) 2.47 2012-02-06 - Deprecated Hypnotoad configuration files in favor of more powerful application configuration files. - Deprecated Mojo::Server::Daemon::prepare_ioloop in favor of Mojo::Server::Daemon::start. - Deprecated Mojo::Headers::x_forwarded_for. - Added EXPERIMENTAL config method to Mojo. - Added EXPERIMENTAL ca attribute to Mojo::UserAgent. - Added EXPERIMENTAL drain event to Mojo::Content. - Added EXPERIMENTAL drain event to Mojo::Transaction::WebSocket. - Added EXPERIMENTAL support for RSV1-3 flags to Mojo::Transaction::WebSocket. - Added EXPERIMENTAL tls_ca option to Mojo::IOLoop::Client::connect. - Added lock_timeout setting to Hypnotoad. - Removed experimental status from JSON Pointer support. - Removed Cygwin exception from Hypnotoad. - Replaced drop_handle and drop_timer methods in Mojo::IOWatcher with drop method. - Renamed change and watch methods in Mojo::IOWatcher to watch and io. - Renamed resume and pause methods in Mojo::IOLoop::Server to start and stop. - Renamed resume and pause methods in Mojo::IOLoop::Stream to start and stop. - Added pdf MIME type. (bfaist) - Improved CSS of some built-in templates. - Fixed bug that prevented newer dual-life modules to be loaded. - Fixed small bug in Mojo::IOLoop::Stream that caused close events to fail sometimes. - Fixed small relative URL detection bug in get command. 2.46 2012-01-25 - Added EXPERIMENTAL request_timeout attribute to Mojo::UserAgent. - Added EXPERIMENTAL text_after and text_before methods to Mojo::DOM. - Improved all uses of syswrite to be more defensive. (bduggan, sri) - Fixed small parser bug in Mojo::Message::Response. - Fixed small partial rendering bug. - Fixed small HTML5 parser bug in Mojo::DOM::HTML. (dougwilson) 2.45 2012-01-18 - Removed T-Shirt link. - Fixed small caching bug in Mojolicious::Plugin::EPRenderer. - Fixed typo in exception template. 2.44 2012-01-18 - Added new not found page for development mode. - Added EXPERIMENTAL url_with helper to Mojolicious::Plugin::DefaultHelpers. (diegok, marcus, judofyr, sri) - Added EXPERIMENTAL support for removing query parameters while merging to query method of Mojo::URL. (marcus, judofyr, sri) - Removed experimental status from Mojo::IOLoop::Delay. - Removed defer method from Mojo::IOLoop. - Improved exception page for development mode. - Improved syntax highlighting in documentation browser slightly. - Fixed Mojo::Command::app to be an attribute and not a method. - Fixed Mojo::ByteStream, Mojo::Collection and Mojo::DOM to not be subclasses of Mojo::Base. 2.43 2012-01-08 - Improved most commands with shortcut options. - Improved get command to automatically enable verbose mode for HEAD requests. (simotrone) 2.42 2012-01-02 - Deprecated Test::Mojo::max_redirects. - Removed exprimental status from respond_to method in Mojolicious::Controller. - Removed experimental status from error event in Mojo::UserAgent. - Removed experimental status from connect_timeout attribute in Mojo::UserAgent. - Removed experimental status from connection event in Mojo::Transaction. - Removed experimental status from upgrade event in Mojo::Asset::Memory. - Removed experimental status from auto_upgrade and max_memory_size attributes in Mojo::Asset::Memory. - Removed experimental status from part event in Mojo::Content::MultiPart. - Removed experimental status from upgrade event in Mojo::Content::Single. - Removed experimental status from auto_upgrade attribute in Mojo::Content::Single. - Removed experimental status from body event in Mojo::Content. - Removed experimental status from mojo_lib_dir and slurp_rel_file methods in Mojo::Home. - Removed experimental status from message event in Mojo::Log. - Removed experimental status from contains method in Mojo::Path. - Removed test_server method from Test::Mojo. - Renamed test_server method in Mojo::UserAgent to app_url. - Improved RFC 6265 compliance of generated request headers. - Fixed bug that prevented sessions without expiration. 2.41 2011-12-28 - Deprecated Mojo::Cookie::version. - Deprecated Mojo::Cookie::Response::comment and Mojo::Cookie::Response::port. - Removed experimental status from group feature of Mojolicious::Lite. - Removed experimental status from Mojo::Collection. - Removed experimental status from Mojolicious::Plugin::Mount. - Removed experimental status from dnt and etag methods in Mojo::Headers. - Improved session expiration by allowing it to be disabled. (nwatkiss, sri) - Improved session cookies to always enable the HttpOnly flag. (nwatkiss, sri) - Improved RFC 6265 compliance of cookie implementation. 2.40 2011-12-24 - Added EXPERIMENTAL JSON Pointer support. (crab) - Improved inactivity timeouts by allowing them to be disabled. - Improved class detection of inflate command. - Fixed small bug in Mojo::IOLoop::Server that prevented TLS tests from running parallel. (nwatkiss) - Fixed repository to not favor specific editors. 2.39 2011-12-22 - Deprecated all keep_alive_timeout attributes and parameters in favor of inactivity_timeout. - Added EXPERIMENTAL error event to Mojo::UserAgent. - Added EXPERIMENTAL local_address attribute to Mojo::UserAgent. - Added EXPERIMENTAL local_address option to Mojo::IOLoop::Client::connect. - Added EXPERIMENTAL close method to Mojo::IOLoop::Stream. - Added "hello.pl" and "fast.pl" to example scripts. - Removed log attribute from Mojo::UserAgent. - Removed MOJO_STATIC_CLASS and MOJO_TEMPLATE_CLASS environment variables. - Improved tests for many environment variables. - Fixed Morbo to ignore hidden directories. - Fixed small argument bug in client method of Mojo::IOLoop. - Fixed small memory leak in Mojo::IOLoop::Stream. - Fixed multiple small error reporting bugs in Mojo::UserAgent. - Fixed online tests to not be affected by geographical location. (marcus) 2.38 2011-12-17 - Changed Mojo::IOLoop::client arguments from ($loop, $stream, $err) to ($loop, $err, $stream). - Improved resilience of Mojo::IOLoop::Stream. - Fixed memory leaks caused by named capture groups bug in Perl. (plu, sri) - Fixed small cleanup bug in Mojo::Asset::File. - Fixed small multipart bug in Mojo::Message. (augensalat) - Fixed missing status method in Mojo::Headers. (crab) - Fixed small Mojo::IOLoop::Stream timeout bug. 2.37 2011-12-10 - Welcome to the Mojolicious core team Marcus Ramberg, Glen Hinkle and Abhijit Menon-Sen. - Removed cleanup_interval attribute from Mojo::IOLoop. - Deprecated Mojo::IOLoop::timeout in favor of Mojo::IOLoop::Stream::timeout. - Added EXPERIMENTAL timeout event to Mojo::IOLoop::Stream. - Added EXPERIMENTAL timeout attribute to Mojo::IOLoop::Stream. - Changed default keep-alive timeout of Mojo::UserAgent from 15 to 20 seconds. - Fixed inline template double encoding bug. 2.36 2011-12-05 - Changed default heartbeat timeout of Hypnotoad from 5 to 10 seconds. - Fixed default keep-alive timeout of Hypnotoad. 2.35 2011-12-01 - Added EXPERIMENTAL etag method to Mojo::Headers. - Fixed one-byte payload bug in Mojo::Transaction::WebSocket. (tinx) - Fixed body event in Mojo::Content to work more reliably in CGI environments. - Fixed small portability issue in loader test. 2.34 2011-11-28 - Added "websocket.pl" to example scripts. - Fixed small bugs in example scripts. 2.33 2011-11-28 - Improved Mojo::EventEmitter performance slightly. - Fixed a few small inline template issues. - Fixed small WebSocket handshake bug. 2.32 2011-11-24 - Added EXPERIMENTAL error event to Mojo::IOWatcher. - Updated jQuery to version 1.7.1. - Improved Mojo::IOLoop performance by changing the default cleanup interval from 0 to 0.025 seconds. 2.31 2011-11-21 - Improved stack traces by making them a lot simpler. 2.30 2011-11-20 - Deprecated Mojo::IOLoop::on_lock in favor of Mojo::IOLoop::lock. - Deprecated Mojo::IOLoop::on_unlock in favor of Mojo::IOLoop::unlock. 2.29 2011-11-19 - Deprecated Mojolicious::on_process in favor of around_dispatch hook. - Added EXPERIMENTAL emit_chain method to Mojolicious::Plugins. (Akron, sri) - Added EXPERIMENTAL around_dispatch hook. - Fixed small bug in boundary and charset methods of Mojo::Content. 2.28 2011-11-18 - Fixed small IPv6 portabilty issue in Mojo::IOLoop::Client. 2.27 2011-11-16 - Deprecated Mojo::IOLoop::connect in favor of Mojo::IOLoop::client. - Deprecated Mojo::IOLoop::listen in favor of Mojo::IOLoop::server. - Deprecated Mojo::IOLoop::connection_timeout in favor of Mojo::IOLoop::timeout. - Deprecated Mojo::IOLoop::write in favor of Mojo::IOLoop::Stream::write. - Deprecated Mojo::IOLoop::connect_timeout in favor of timeout argument. - Deprecated on_* methods in Mojo::IOLoop. - Removed Mojo::IOLoop::Resolver. - Added EXPERIMENTAL connect_timeout attribute to Mojo::UserAgent. - Added EXPERIMENTAL is_readable method to Mojo::IOLoop::Stream. - Added EXPERIMENTAL charset method to Mojo::Content. - Added EXPERIMENTAL write event to Mojo::IOLoop::Stream. - Added EXPERIMENTAL connection event to Mojo::Transaction. - Improved CSS of some built-in templates. - Fixed many small memory leaks. - Fixed multiple drain callback bugs. - Fixed small attribute selector bug in Mojo::DOM::CSS. (tladesignz) 2.26 2011-11-10 - Added EXPERIMENTAL upgrade event to Mojo::Asset::Memory. - Added EXPERIMENTAL upgrade event to Mojo::Transaction::HTTP. - Added EXPERIMENTAL auto_upgrade attribute to Mojo::Asset::Memory. - Improved Mojo::Content::Single and Mojo::Content::MultiPart parsers to reuse events. - Fixed small route caching bug. 2.25 2011-11-08 - Removed canonicalize method from Mojo::URL. - Fixed URL without scheme handling in Mojo::URL. - Fixed a few small bugs in Mojo::URL. 2.24 2011-11-05 - Added EXPERIMENTAL canonicalize method to Mojo::URL. - Fixed small path canonicalization bug in Mojo::URL. - Fixed small trailing slash bug in Mojo::Path. 2.23 2011-11-04 - Changed semantics of get_line function in Mojo::Util. - Removed experimental status from Mojo::Util. - Updated jQuery to version 1.7. - Improved empty path element handling in Mojo::URL. - Fixed empty path element bug in Mojo::Path. 2.22 2011-11-03 - Added EXPERIMENTAL --verbose option to routes command. - Fixed a few attribute without value selector bugs in Mojo::DOM::CSS. - Fixed template inheritance bug in Mojolicious::Renderer. 2.21 2011-11-02 - Removed profile helper. - Removed CSS4 selector subject support from Mojo::DOM::CSS until we actually know the exact semantics. - Improved Mojo::ByteStream to generate most Mojo::Util-based methods automatically. - Fixed route pattern bug. - Fixed bug in "user_agent.t". 2.20 2011-11-01 - Changed semantics of almost all functions in Mojo::Util. 2.19 2011-10-31 - Deprecated Mojolicious::Plugins::add_hook in favor of Mojolicious::Plugins::on. - Deprecated Mojolicious::Plugins::run_hook in favor of Mojolicious::Plugins::emit_hook. - Deprecated Mojolicious::Plugins::run_hook_reverse in favor of Mojolicious::Plugins::emit_hook_reverse. 2.18 2011-10-30 - Fixed small rendering bug. 2.17 2011-10-30 - Fixed bug in "user_agent.t". 2.16 2011-10-30 - Removed experimental status from Mojo::EventEmitter. - Merged unsubscribe and unsubscribe_all methods in Mojo::EventEmitter. 2.15 2011-10-29 - Deprecated Mojolicious::Controller::on_finish in favor of Mojolicious::Controller::on. - Removed Mojolicious::Controller::on_message, you can now use Mojolicious::Controller::on instead. $c->on(message => sub {...}); - Added EXPERIMENTAL message event to Mojo::Log. 2.14 2011-10-29 - Deprecated Mojo::DOM::new with arguments. - Renamed Mojo::IOLoop::Trigger to Mojo::IOLoop::Delay. - Renamed watch method in Mojo::IOWatcher to change. - Renamed io method in Mojo::IOWatcher to watch. - Renamed cancel method in Mojo::IOWatcher to drop_timer. - Renamed remove method in Mojo::IOWatcher to drop_handle. - Added EXPERIMENTAL --verbose option to test command. 2.13 2011-10-28 - Removed experimental status from many classes, methods, attributes and functions. - Removed before_render hook. - Removed Mojolicious::Plugin::CallbackCondition. 2.12 2011-10-27 - Added EXPERIMENTAL cleanup_interval attribute to Mojo::IOLoop. - Added EXPERIMENTAL max_leftover_size attribute to Mojo::Content. - Replaced handle method in Mojo::IOLoop with stream method. - Replaced writing and not_writing methods in Mojo::IOWatcher with watch method. - Replaced is_finished method in Mojo::IOLoop::Stream with is_writing method. - Replaced add method in Mojo::IOWatcher with io method. - Reduced memory usage of Mojo::Headers significantly. - Fixed finish event timing in Mojo::Server::Daemon. 2.11 2011-10-26 - Improved Mojo::IOLoop::Stream to only emit close events once. 2.10 2011-10-25 - Added EXPERIMENTAL send_frame method to Mojo::Transaction::WebSocket. - Added EXPERIMENTAL frame event to Mojo::Transaction::WebSocket. - Changed syntax for binary messages in Mojo::Transaction::WebSocket. [$bytes] becomes [binary => $bytes] 2.09 2011-10-23 - Fixed small environment cleanup bug in Mojo::IOLoop::Server. 2.08 2011-10-23 - Fixed a few more small test bugs. 2.07 2011-10-23 - Fixed a few small test bugs. 2.06 2011-10-23 - Improved documentation. 2.05 2011-10-22 - Added EXPERIMENTAL max_memory_size attribute to Mojo::Asset::Memory. - Added EXPERIMENTAL is_file methods to Mojo::Asset and Mojo::Asset::File. - Improved start_tls method in Mojo::IOLoop by allowing it to accept more options. - Improved MOJO_MAX_MEMORY_SIZE handling by moving it from Mojo::Content::Single to Mojo::Asset::Memory. - Fixed HTTPS proxy bug in Mojo::UserAgent. 2.04 2011-10-21 - Fixed small HTTP response parser bug. - Fixed Windows portability issue in "upload_lite_app.t". 2.03 2011-10-20 - Deprecated all is_done methods in favor of is_finished. - Renamed done event in Mojo::IOLoop::Trigger to finish. - Added EXPERIMENTAL support for new HTTP status codes from draft-nottingham-http-new-status. - Fixed small bug in "upload_lite_app.t". 2.02 2011-10-20 - Merged request and upgrade events in Mojo::Transaction::HTTP. - Improved Mojolicious::Controller attribute default values. 2.01 2011-10-19 - Added EXPERIMENTAL upgrade event to Mojo::Content::Single. - Added EXPERIMENTAL part event to Mojo::Content::MultiPart. - Fixed arguments of upgrade event in Mojo::Transaction::HTTP. - Fixed small WebSocket upgrade bug in Mojo::Server::Daemon. 2.0 2011-10-17 - Code name "Leaf Fluttering In Wind", this is a major release. - Increased Perl version requirement to 5.10.1. - Renamed Mojo::IOLoop::EventEmitter to Mojo::EventEmitter. - Replaced one_tick method in Mojo::IOWatcher with start and stop methods. - Added EXPERIMENTAL contains method to Mojo::Path. - Added EXPERIMENTAL auto_upgrade attribute to Mojo::Content::Single. - Added EXPERIMENTAL boundary method to Mojo::Content. - Added EXPERIMENTAL slice method to Mojo::Collection. - Added EXPERIMENTAL build and parse methods to Mojo::IOLoop::Resolver. - Updated WebSocket implementation to ietf-17. - Improved many modules to use events instead of callbacks. - Improved message parser performance slightly. - Improved Mojo::IOLoop to die if started twice. - Improved setuidgid in Mojo::Server::Daemon. - Improved Mojo::IOWatcher backend detection. - Improved Mojo::IOLoop::Stream to handle unexpected connection close more gracefully. - Fixed many portability issues. - Fixed on_finish callback to work consistently with all servers. - Fixed on_finish callback to work consistently with the user agent. - Fixed big memory and file descriptor leak in the TLS code of Mojo::IOLoop::Server. - Fixed small memory leak in Mojolicious. - Fixed small memory leak in Mojo::DOM. - Fixed small memory leak in Mojo::Message. - Fixed small boundary bug in Mojo::Content::MultiPart. - Fixed small formatting bug in Mojo::Headers. - Fixed small proxy message generation bug. - Fixed small detection bug in Mojolicious::Types. 1.99 2011-09-29 - Deprecated direct hash access to the flash in Mojolicious::Controller. - Added EXPERIMENTAL group function to Mojolicious::Lite. - Added EXPERIMENTAL build_frame and parse_frame methods to Mojo::Transaction::WebSocket. - Added EXPERIMENTAL accepts attribute to Mojo::IOLoop::Server. - Added EXPERIMENTAL profile helper. - Added EXPERIMENTAL binary support to Mojo::Transaction::WebSocket. - Updated WebSocket implementation to ietf-16. - Changed default upgrade timeout of Hypnotoad from 30 to 60 seconds. - Improved accept performance of all built-in web servers by up to 1000% with the EV backend. - Improved connection_timeout method in Mojo::IOLoop by allowing it to be called as a class method. - Improved CSS of some built-in templates. - Improved resilience of HTTP parser. - Fixed CSS of built-in exception template. - Fixed close event bug in Mojo::IOLoop. - Fixed small redirect_to bug. (judofyr, sri) - Fixed small attribute selector bug in Mojo::DOM::CSS. - Fixed small Unicode bug in Mojolicious::Plugin::EPRenderer. - Fixed a few small route bugs. - Fixed Perl 5.8.7 compatibility. 1.98 2011-09-14 - Removed Mojo::Server::FastCGI so it can be maintained as a separate distribution. - Added EXPERIMENTAL mojo_lib_dir and slurp_rel_file methods to Mojo::Home. - Improved host condition to work in more environments. - Improved CSS of all built-in templates. - Improved test command to run tests in alphabetical order. (viliampucik) - Improved non-blocking resolver by allowing it to be disabled. - Improved DATA templates by removing a whitespace requirement. - Fixed small name generation bug in Mojolicious::Plugin::Config. - Fixed small bug in cookie jar. - Fixed small plugin loader bug. - Fixed Hypnotoad to clean up lock files. - Fixed small bug that caused exceptions to be logged twice. 1.97 2011-09-03 - Improved Unicode handling to be more correct and less forgiving. 1.96 2011-09-02 - Updated jQuery to version 1.6.3. - Fixed Mojo::IOLoop to ignore SIGPIPE. 1.95 2011-09-01 - Improved cookie generation slightly. (cosimo, sri) - Fixed Mojo::IOLoop to not ignore SIGPIPE. 1.94 2011-08-27 - Fixed lite_app and plugin generators. 1.93 2011-08-27 - Added EXPERIMENTAL support for escaped tags to Mojo::Template. - Improved Morbo to ignore dotfiles. - Fixed trimming bug in Mojo::Template. - Fixed a few small bugs in Mojo::Template. - Fixed small version detection bug in Mojo::Cookie. 1.92 2011-08-26 - Fixed quoting bug in Mojo::Cookie. 1.91 2011-08-25 - Added EXPERIMENTAL support for cloning Mojo::Message::Request objects. - Improved redirect support in Mojo::UserAgent to be closer to commonly used browsers. 1.90 2011-08-24 - Improved respond_to to automatically render an empty 204 response for unknown formats. - Improved render_exception and render_not_found to use the current format if available. (alnewkirk) 1.89 2011-08-23 - Improved Mojo::Home portability. (omega) 1.88 2011-08-23 - Added EXPERIMENTAL split method to Mojo::ByteStream. - Fixed small bug in Mojo::JSON. 1.87 2011-08-23 - Added EXPERIMENTAL app method to Mojo::Command. - Added EXPERIMENTAL t helper to Mojolicious::Plugin::TagHelpers. - Made tag helper a little smarter. - Made camelize a little smarter. - Fixed small route rendering bug. 1.86 2011-08-21 - Deprecated CamelCase command modules and lowercased all the built-in ones. - Added EXPERIMENTAL support for testing WebSockets with Test::Mojo. - Added GET/POST parameter support to respond_to. - Made class_to_file slightly smarter. 1.85 2011-08-20 - Fixed a url_for bug where captures would be ignored. 1.84 2011-08-19 - Added EXPERIMENTAL first, reverse, shuffle and sort methods to Mojo::Collection. - Fixed small test portablity bug. 1.83 2011-08-19 - Renamed filter method in Mojo::Collection to grep. 1.82 2011-08-19 - Added EXPERIMENTAL filter method to Mojo::Collection. - Removed while and until methods from Mojo::Collection. 1.81 2011-08-19 - Renamed Mojo::DOM::Collection to Mojo::Collection and added a few new methods. - Made Mojolicious::Plugins loader quite a bit smarter. - Improved Test::Mojo diagnostics. 1.80 2011-08-17 - Deprecated Mojolicious::Plugin::EpRenderer in favor of Mojolicious::Plugin::EPRenderer. - Deprecated Mojolicious::Plugin::EplRenderer in favor of Mojolicious::Plugin::EPLRenderer. - Deprecated Mojolicious::Plugin::I18n in favor of Mojolicious::Plugin::I18N. - Deprecated Mojolicious::Plugin::JsonConfig in favor of Mojolicious::Plugin::JSONConfig. - Deprecated Mojolicious::Plugin::PodRenderer in favor of Mojolicious::Plugin::PODRenderer. 1.79 2011-08-17 - Added support for uppercase relative plugin names. (lammel) 1.78 2011-08-16 - Added EXPERIMENTAL modules Mojolicious::Command::Cpanify and Mojolicious::Command::Generate::Plugin. (sri, yko, tempire) - Fixed "websocket_lite_app.t" to require Perl 5.10+. - Fixed small empty cookie bug. - Fixed small command bug. 1.77 2011-08-14 - Deprecated Mojo::Path::append in favor of using Mojo::Path::parts directly. - Improved handling of preformatted text in Mojo::DOM. - Improved Mojo::DOM to allow smart whitespace trimming to be disabled. (Akron) - Fixed small Unicode bug in get command. 1.76 2011-08-12 - Fixed small Mojo::URL escaping bug. 1.75 2011-08-12 - Added secure_compare function to Mojo::Util as a precaution against timing attacks in the future. (judofyr) - Added EXPERIMENTAL CSS4 selector subject support to Mojo::DOM::CSS. 1.74 2011-08-09 - Added EXPERIMENTAL --verbose option to Morbo. 1.73 2011-08-09 - Added EXPERIMENTAL -strict flag to Mojo::Base. - Added EXPERIMENTAL respond_to method to Mojolicious::Controller. - Added EXPERIMENTAL detect method to Mojolicious::Types. - Added accept method to Mojo::Headers. - Made Mojo::UserAgent slightly more efficient. - Improved get command to autoflush STDOUT. 1.72 2011-08-05 - Changed default keep-alive timeout in Mojo::Server::Daemon from 5 to 15 seconds. - Fixed small alternative placeholder value bug in routes. - Fixed small bug in Mojo::IOWatcher. - Fixed small bug in Mojo::IOLoop::Client. 1.71 2011-08-05 - Improved Mojo::IOWatcher to use higher resolution timers. 1.70 2011-08-04 - Added EXPERIMENTAL defer method to Mojo::IOLoop. - Added extended callback support to Mojo::IOLoop::Trigger. - Fixed a few small bugs in Mojo::URL. (sshaw) 1.69 2011-08-03 - Added EXPERIMENTAL module Mojo::IOLoop::Trigger. - Modernized Mojo::HelloWorld. - Improved HTML healing capabilities of Mojo::DOM::HTML. - Improved HTML rendering in Mojo::DOM::HTML. - Improved 64-bit support in Mojo::Transaction::WebSocket. - Fixed memory leak in Mojo::IOLoop::Client. - Fixed memory leak in Mojolicious. - Fixed small bug in Mojo::IOLoop::Server. 1.68 2011-07-29 - Moved is_ipv4 and is_ipv6 methods from Mojo::URL to Mojo::IOLoop::Resolver. 1.67 2011-07-27 - Fixed version command. - Fixed small Mojo::DOM bug. (Akron) 1.66 2011-07-27 - Added EXPERIMENTAL detect method to Mojo::IOWatcher. - Improved Mojo::IOLoop::Resolver efficiency. 1.65 2011-07-25 - Added EXPERIMENTAL modules Mojo::IOLoop::Client, Mojo::IOLoop::EventEmitter, Mojo::IOLoop::Server and Mojo::IOLoop::Stream, which contain extracted functionality from Mojo::IOLoop. - Added EXPERIMENTAL module Mojo::IOWatcher::EV. (xantus) - Removed modules Mojo::IOWatcher::Epoll and Mojo::IOWatcher::KQueue, since Mojo::IOWatcher::EV is a much better alternative. - Renamed Mojo::Resolver to Mojo::IOLoop::Resolver. - Improved Mojolicious::Routes to automatically disable the routing cache if conditions are used. - Improved route constraint alternatives. - Improved documentation browser CSS. (judofyr) - Fixed small bug in get command. 1.64 2011-07-10 - Added EXPERIMENTAL module Mojo::DOM::HTML. 1.63 2011-07-10 - Added EXPERIMENTAL modules Mojo::DOM::CSS and Mojo::DOM::Collection. - Renamed Mojo::Transactor to Mojo::UserAgent::Transactor. 1.62 2011-07-10 - Merged Mojo::HTML into Mojo::DOM again. 1.61 2011-07-09 - Added module Mojo::HTML, which contains extracted functionality from Mojo::DOM. 1.60 2011-07-08 - Added xsl MIME type. (shiftycow) - Fixed Windows portability issue. 1.59 2011-07-08 - Added peer method to Mojo::Transactor. - Deprecated Test::Mojo->new(app => 'MyApp') in favor of Test::Mojo->new('MyApp'). - Made $t->app always return the application instance in tests. 1.58 2011-07-07 - Fixed fork bug in Mojo::IOLoop. - Fixed small Hypnotoad issues. 1.57 2011-07-07 - Added --stop option to Hypnotoad. - Made hot deployment with Hypnotoad even easier. 1.56 2011-07-04 - Fixed small memory leaks in Hypnotoad and Mojo::IOLoop. 1.55 2011-07-04 - Fixed some portability issues in tests. 1.54 2011-07-03 - Fixed small Windows issue. 1.53 2011-07-02 - Added EXPERIMENTAL format method to Mojo::Log and simplified the default log file format. - Improved include helper argument localization. (miyagawa) 1.52 2011-07-01 - Fixed small static file in DATA section bug. 1.51 2011-07-01 - Renamed build_url method in Test::Mojo to test_server. - Improved test_server method in Mojo::UserAgent. - Fixed small timing issue in "morbo.t". 1.50 2011-07-01 - Removed idle event from Mojo::IOLoop. - Updated jQuery to version 1.6.2. - Fixed small routes bug that prevented some false values from disabling format detection. 1.49 2011-06-30 - Added EXPERIMENTAL modules Mojo::IOWatcher and Mojo::Resolver, which contain extracted functionality from Mojo::IOLoop. - Added EXPERIMENTAL module Mojo::Transactor, which contains extracted functionality from Mojo::UserAgent. - Added EXPERIMENTAL support for simple alternative placeholder values to routes. - Improved Morbo restarter to also check for changed file size in addition to mtime. - Fixed many small routes bugs. - Fixed small reparse bug in Mojo::Parameters. (dmw397) - Fixed url_for to incorporate trailing slash for current route. - Fixed a few small error reporting bugs around Mojo::UserAgent. - Fixed portability issue in "command.t". 1.48 2011-06-24 - Added debug log message for missing action to router. - Improved Mojo::Command tests. - Fixed support for multiple checkboxes with same name in Mojolicious::Plugin::TagHelper. (sri, kimoto) - Fixed portability issue in "lite_app.t". (marcus) 1.47 2011-06-22 - Added EXPERIMENTAL callback condition plugin. - Added EXPERIMENTAL host condition to Mojolicious::Plugin::HeaderCondition. - Added host support to Mojolicious::Plugin::Mount. (sri, alnewkirk) - Removed Mojolicious::Plugin::AgentCondition and added its functionality to Mojolicious::Plugin::HeaderCondition. - Improved overall performance slightly. - Fixed render_static return value. - Fixed dispatcher return values. 1.46 2011-06-21 - Improved Morbo to only attempt restarting applications after a file change has been detected. - Improved overall performance by about 3% with many small optimizations. - Improved query string support in Mojo::Parameters. - Fixed Windows restart issues in Morbo. (lammel) - Fixed missing plugin error message. 1.45 2011-06-20 - Fixed an exception with layout rendering bug. - Fixed small Mojo::Parameters bug. 1.44 2011-06-18 - Added EXPERIMENTAL self-restarting Morbo development web server and removed old "--reload" support since there have been too many negative side effects. This also improves overall performance by about 5-10% and reduces memory usage by about 10%. - Added EXPERIMENTAL application mount plugin. - Added EXPERIMENTAL --help support for all commands. - Updated prettify.js to version 1-Jun-2011. - Updated WebSocket diagnostics test in Mojo::HelloWorld for latest Firefox Aurora. - Improved inline template and static file performance. - Improved whitespace trimming in Mojo::DOM. (sri, DaTa) - Fixed Morbo file discovery bug. (crab) - Fixed a few application embedding bugs. - Fixed link generation bug in Mojolicious::Plugin::PodRenderer. - Fixed small embedding bug in Mojolicious::Plugin::RequestTimer. 1.43 2011-06-13 - Improved after_dispatch hook by allowing it to change session data. - Fixed a bug in Mojo::Template that caused template blocks to be auto escaped. 1.42 2011-06-09 - Added EXPERIMENTAL support for unquoted wildcard placeholders in Mojolicious::Routes::Pattern. - Added EXPERIMENTAL status code support to rendred method in Mojolicious::Controller. - Updated WebSocket implementation to ietf-08. - Fixed a bug that prevented Mojo::Base subclasses from using the "-base" flag. - Fixed a few small default status code bugs. - Fixed route suggestion bug in "not_found.development.html.ep". 1.41 2011-06-03 - Fixed param list bug in Mojolicious::Controller. - Fixed overload bug in Mojo::DOM. (yko) 1.40 2011-06-02 - Deprecated Mojo::DOM add_after method in favor of the append method. - Deprecated Mojo::DOM add_before method in favor of the prepend method. - Deprecated all methods containing the word "inner" in favor of ones containing the word "content". - Added EXPERIMENTAL direct hash access for attributes and child element accessor support to Mojo::DOM. - Added EXPERIMENTAL support for collections to children method and element accessors in Mojo::DOM. - Added EXPERIMENTAL to_xml method to Mojo::DOM collections. - Added EXPERIMENTAL eval command. - Added EXPERIMENTAL load_app method to Mojo::Server. - Added append_content and prepend_content methods to Mojo::DOM. - Added HTTP method support to routes command. (trone) - Improved long poll support. - Improved compatibility with Feersum PSGI web servers. (audreyt) - Switched from Storable to JSON serialization for Mojolicious sessions to increase efficiency. - Reduced memory usage of Hypnotoad workers by at least 1MB (each). - Fixed a small Mojo::Loader bug. - Fixed small Windows line ending problem in Mojo::Command. (Akron) - Fixed a UTF-8 bug in Mojo::Exception. (jamadam) - Fixed "Can't locate object method x via package y" error messages. - Fixed woff MIME type. 1.34 2011-05-22 - Fixed nested selector bug in Mojo::DOM. - Fixed small Mojo::DOM HTML5 bug. 1.33 2011-05-20 - Added EXPERIMENTAL helper function to Mojolicious::Lite. - Updated jQuery to version 1.6.1. - Improved Mojo::JSON string escaping to make JSONP easier. - Improved reloader slightly. - Moved all bundled templates to "lib/Mojolicious/templates". - Fixed reserved GET/POST param handling in Mojolicious::Controller. - Fixed small XML semantics bug in Mojo::DOM. - Fixed all blocking server bindings to default to a 404 status code. 1.32 2011-05-11 - Added EXPERIMENTAL name support for template exceptions. - Updated IO::Socket::SSL requirement to 1.43 due to bugs in older versions. Note that the version requirement will keep getting updated until we encounter a version that is not broken most of the time. - Improved reloading slightly by allowing it to clean up the main namespace. - Fixed enabling of Perl 5.10 features in Mojo::Base and Mojolicious::Lite. (garu, sri) - Fixed render_later to prevent delayed rendering warning. 1.31 2011-05-08 - Reverted deprecation of Perl 5.8.x support, by popular demand. - Added FAQ entry to clarify the Perl 5.8.x situation. - Fixed case-sensitivity of Mojo::DOM in XML mode. - Fixed pseudo-class case handling in Mojo::DOM. (Akron) 1.30 2011-05-05 - Deprecated Perl 5.8.x support. - Deprecated Mojolicious::Renderer get_inline_template method in favor of the get_data_template method. - Added EXPERIMENTAL before_render hook. - Added EXPERIMENTAL hook function to Mojolicious::Lite. - Added workaround for uWSGI bug. (miyagawa) - Improved Mojo::Template and Mojolicious::Routes exception handling. - Improved debug log messages for template rendering. - Updated Mojo::Base and Mojolicious::Lite to enable Perl 5.10 features if available. - Updated jQuery to version 1.6. - Fixed PSGI read error handling. - Fixed 64-bit WebSocket message bug. - Fixed small Windows bug. 1.22 2011-05-02 - Added opposite tests to Test::Mojo. - Deprecated Mojo::IOLoop on_tick method in favor of the recurring method. (sbertrang) - Deprecated Mojo::IOLoop on_hup method in favor of the on_close method. - Deprecated on_build_tx methods in favor of on_transaction methods. - Deprecated on_handler methods in favor of on_request methods. - Updated WebSocket implementation to ietf-07. - Renamed on_idle method in Mojo::IOLoop to idle. - Reduced memory requirements of cached templates by up to 50%. - Fixed controller specific render_exception and render_not_found methods. - Fixed Mojo::JSON string size limit. (henryykt) - Fixed Windows bug in Mojo::Asset::File. (kimoto) - Fixed small memory leak. - Fixed small stack localization bug. - Fixed small tag helper escaping bug. (cheese) 1.21 2011-04-20 - Improved temporary file handling to avoid a very unlikely race condition. (crab) - Fixed "multipart/form-data" generation bug in Mojo::UserAgent. (sugar, sharifulin, sri) 1.20 2011-04-20 - Improved size limit handling. 1.19 2011-04-20 - Fixed size limits in message parser. 1.18 2011-04-19 - Added support for X-Forwarded-HTTPS and X-Forwarded-Host headers. - Added argument localization to the include helper. (crab, moritz, sri) - Fixed test case. 1.17 2011-04-18 - Deprecated Mojolicious process method in favor of the on_process attribute. - Added Failraptor. - Added support for MOJO_CERT_FILE and MOJO_KEY_FILE environment variables. - Added EXPERIMENTAL xml attribute to Mojo::DOM. - Added EXPERIMENTAL build_url method to Test::Mojo. - Added EXPERIMENTAL dnt (Do Not Track) method to Mojo::Headers. - Added WOFF MIME type. (reezer) - Updated WebSocket implementation to ietf-06. (sri, crab) - Updated jQuery to version 1.5.2. - Improved HTML healing capabilities of Mojo::DOM. - Improved Mojo::DOM to ignore useless end tags. - Improved Mojo::DOM inline DTD support. (Akron) - Improved Mojo::DOM text extraction. - Improved Mojolicious::Plugin::I18n default lexicon handling. (yko) - Improved a Mojo::IOLoop workaround. - Moved all bundled static files to "lib/Mojolicious/public". - Made Test::Mojo a little more user-friendly. - Fixed small CGI/FastCGI header generation bug. - Fixed readonly handle support in Mojo::IOLoop. - Fixed a Mojo::IOLoop resolver bug. (Charlie Brady) - Fixed small Mojo::Asset::File bug. (crab) - Fixed small Mojo::DOM selector bug. (tempire) - Fixed small Mojo::DOM namespace detection bug. (Akron) - Fixed small route pattern escaping bug. - Fixed small reload bug. - Fixed small documentation browser bug. (kberov) - Fixed cookbook recipe. (moritz) 1.16 2011-04-15 - Emergency release for a critical security issue that can expose files on your system, everybody should update! (perlninja, sri) 1.15 2011-03-18 - Changed default log level in "production" mode from "error" to "info". - Improved lookup method in Mojo::IOLoop. - Fixed small Mojo::Util bug. - Fixed a serious Mojo::DOM bug. (moritz) 1.14 2011-03-17 - Added support for multiple DNS servers to Mojo::IOLoop. - Added config helper to Mojolicious::Plugin::Config. - Changed resolv.conf parser in Mojo::IOLoop to use the first nameserver. - Changed lookup method in Mojo::IOLoop to pick records randomly. - Fixed small optional tag bugs in Mojo::DOM. - Fixed JavaScript/CSS bug in Mojo::DOM. - Fixed Windows home directory detection bug. (Akron) - Fixed a few warnings. 1.13 2011-03-14 - Deprecated Mojo::Client in favor of the much sleeker Mojo::UserAgent. - Made the most common Mojo::IOLoop methods easier to access for the singleton instance. 1.12 2011-03-10 - Relicensed all artwork to CC-SA, so the whole distribution can be considered "open" again. - Deprecated MOJO_JSON_CONFIG environment variable in favor of MOJO_CONFIG. (crab) - Added EXPERIMENTAL support for IPv6. - Added more Perl-ish configuration plugin. - Added drain callback support for WebSockets. - Added line numbers to Mojo::JSON error messages. (marcus) - Removed experimental status from Hypnotoad and Mojolicious::Plugin::TagHelpers. - Removed experimental status from many attributes and methods all over Mojolicious. - Improved attribute support of the select_field tag helper. (yko) - Improved text_field tag helper. - Improved tag helper attribute escaping. - Improved attrs method in Mojo::DOM. - Updated jQuery to version 1.5.1. - Fixed XSS issue in link_to helper. - Fixed route unescaping bug. - Fixed small Mojo::DOM bug. (yko) - Fixed small documentation bug. 1.11 2011-02-18 - Deprecated Mojo::Client async method in favor of the managed attribute. - Added TTL support to resolve in Mojo::IOLoop. (und3f) - Relaxed charset handling in and around Mojo::DOM a bit. - Fixed Mojo::Client async mode. - Fixed session cookie encoding bug. - Fixed small route bug. - Fixed small Hypnotoad bug. (bduggan) 1.10 2011-02-14 - Deprecated wildcard route names in favor of automatically generated default names for all routes. - Removed native IIS support since it has become unmaintainable. - Added EXPERIMENTAL much prettier attribute generator to Mojo::Base. - Added EXPERIMENTAL on_start attribute to Mojo::Client. - Added EXPERIMENTAL support for route shortcuts. - Added EXPERIMENTAL support for NO_PROXY. (l0b0) - Added EXPERIMENTAL user_agent attribute to Mojo::Client. - Added EXPERIMENTAL support for mode specific not found and exception templates. - Added EXPERIMENTAL support for route caching. - Added EXPERIMENTAL support for CSS3 selectors to the get command. - Added image helper to Mojolicious::Plugin::TagHelpers. - Added support for secure session cookies. (crab) - Improved HTML5 compatibility of Mojo::DOM. - Replaced Mojo::JSON parser with a much faster and stricter implementation. (chansen) - Improved Mojo::JSON string encoding. (chansen) - Updated to jQuery to version 1.5. - Removed experimental status from Mojo::DOM and ojo. - Removed experimental status from many attributes and methods all over Mojolicious. - Renamed after and before in Mojo::DOM to add_after and add_before. - Improved documentation browser slightly. - Improved CSS3 support in Mojo::DOM. - Changed Mojolicious::Plugin::EplRenderer to not render 404 errors for missing templates. - Changed exception template to use pre instead of h1 tags for error messages. (vaneska) - Made Simpsons and Futurama quotes easier to distinguish from normal comments. - Made routes reusable outside of Mojolicious. (forwardever) - Fixed a few home detection bugs. - Fixed a complicated application embedding bug. - Fixed a Apache mod_rewrite compatibility bug in Mojo::Message::Request. (dekimsey) - Fixed a small bug in the relaxed HTTP parser. - Fixed a small bug in Mojolicious::Command::Get. - Fixed a small bug in Mojolicious::Plugin::JsonConfig. - Fixed support for broken redirects. - Fixed --reload delay problem. - Fixed shagadelic function of Mojolicious::Lite. - Fixed optgroup support in select_field helper. - Fixed tests that can't run on Windows. - Fixed delayed rendering bug. (yko) - Fixed nested route bug. - Fixed a small multipart parser bug. - Fixed small any route bug. - Fixed small empty route bug. - Fixed URL merging in Mojo::URL. - Fixed version detection in Mojolicious::Command::Version. - Fixed Mojo::Client cloning. 1.01 2011-01-06 - Relicensed some of the images to make sure Mojolicious can be shipped with commercial products. - Updated IO::Socket::SSL requirement to 1.37 due to bugs in older versions. - Added EXPERIMENTAL TLS certificate authentication support. (tempire) - Added EXPERIMENTAL title helper. - Added EXPERIMENTAL render_later method to Mojolicious::Controller. - Improved test. (Charlie Brady) - Improved charset handling in Mojolicious slightly. - Updated application generators with base tags. - Fixed relative path handling in Mojo::URL. - Fixed punycode bug. (kits) - Fixed a bug where the static dispatcher would eat the flash. 1.0 2010-12-26 - Code name "Snowflake", this is a major release. Mojolicious-7.59/MANIFEST000644 000765 000024 00000025032 13215530107 015042 0ustar00sristaff000000 000000 .perltidyrc Changes examples/chat.pl examples/connect-proxy.pl examples/entities.pl examples/fast.pl examples/hello-template.pl examples/hello.pl examples/microhttpd.pl lib/Mojo.pm lib/Mojo/Asset.pm lib/Mojo/Asset/File.pm lib/Mojo/Asset/Memory.pm lib/Mojo/Base.pm lib/Mojo/ByteStream.pm lib/Mojo/Cache.pm lib/Mojo/Collection.pm lib/Mojo/Content.pm lib/Mojo/Content/MultiPart.pm lib/Mojo/Content/Single.pm lib/Mojo/Cookie.pm lib/Mojo/Cookie/Request.pm lib/Mojo/Cookie/Response.pm lib/Mojo/Date.pm lib/Mojo/DOM.pm lib/Mojo/DOM/CSS.pm lib/Mojo/DOM/HTML.pm lib/Mojo/EventEmitter.pm lib/Mojo/Exception.pm lib/Mojo/File.pm lib/Mojo/Headers.pm lib/Mojo/HelloWorld.pm lib/Mojo/Home.pm lib/Mojo/IOLoop.pm lib/Mojo/IOLoop/Client.pm lib/Mojo/IOLoop/Delay.pm lib/Mojo/IOLoop/resources/server.crt lib/Mojo/IOLoop/resources/server.key lib/Mojo/IOLoop/Server.pm lib/Mojo/IOLoop/Stream.pm lib/Mojo/IOLoop/Subprocess.pm lib/Mojo/IOLoop/TLS.pm lib/Mojo/JSON.pm lib/Mojo/JSON/Pointer.pm lib/Mojo/Loader.pm lib/Mojo/Log.pm lib/Mojo/Message.pm lib/Mojo/Message/Request.pm lib/Mojo/Message/Response.pm lib/Mojo/Parameters.pm lib/Mojo/Path.pm lib/Mojo/Promise.pm lib/Mojo/Reactor.pm lib/Mojo/Reactor/EV.pm lib/Mojo/Reactor/Poll.pm lib/Mojo/Server.pm lib/Mojo/Server/CGI.pm lib/Mojo/Server/Daemon.pm lib/Mojo/Server/Hypnotoad.pm lib/Mojo/Server/Morbo.pm lib/Mojo/Server/Morbo/Backend.pm lib/Mojo/Server/Morbo/Backend/Poll.pm lib/Mojo/Server/Prefork.pm lib/Mojo/Server/PSGI.pm lib/Mojo/Template.pm lib/Mojo/Transaction.pm lib/Mojo/Transaction/HTTP.pm lib/Mojo/Transaction/WebSocket.pm lib/Mojo/Upload.pm lib/Mojo/URL.pm lib/Mojo/UserAgent.pm lib/Mojo/UserAgent/CookieJar.pm lib/Mojo/UserAgent/Proxy.pm lib/Mojo/UserAgent/Server.pm lib/Mojo/UserAgent/Transactor.pm lib/Mojo/Util.pm lib/Mojo/WebSocket.pm lib/Mojolicious.pm lib/Mojolicious/Command.pm lib/Mojolicious/Command/cgi.pm lib/Mojolicious/Command/cpanify.pm lib/Mojolicious/Command/daemon.pm lib/Mojolicious/Command/eval.pm lib/Mojolicious/Command/generate.pm lib/Mojolicious/Command/generate/app.pm lib/Mojolicious/Command/generate/lite_app.pm lib/Mojolicious/Command/generate/makefile.pm lib/Mojolicious/Command/generate/plugin.pm lib/Mojolicious/Command/get.pm lib/Mojolicious/Command/inflate.pm lib/Mojolicious/Command/prefork.pm lib/Mojolicious/Command/psgi.pm lib/Mojolicious/Command/routes.pm lib/Mojolicious/Command/test.pm lib/Mojolicious/Command/version.pm lib/Mojolicious/Commands.pm lib/Mojolicious/Controller.pm lib/Mojolicious/Guides.pod lib/Mojolicious/Guides/Contributing.pod lib/Mojolicious/Guides/Cookbook.pod lib/Mojolicious/Guides/FAQ.pod lib/Mojolicious/Guides/Growing.pod lib/Mojolicious/Guides/Rendering.pod lib/Mojolicious/Guides/Routing.pod lib/Mojolicious/Guides/Testing.pod lib/Mojolicious/Guides/Tutorial.pod lib/Mojolicious/Lite.pm lib/Mojolicious/Plugin.pm lib/Mojolicious/Plugin/Config.pm lib/Mojolicious/Plugin/DefaultHelpers.pm lib/Mojolicious/Plugin/EPLRenderer.pm lib/Mojolicious/Plugin/EPRenderer.pm lib/Mojolicious/Plugin/HeaderCondition.pm lib/Mojolicious/Plugin/JSONConfig.pm lib/Mojolicious/Plugin/Mount.pm lib/Mojolicious/Plugin/PODRenderer.pm lib/Mojolicious/Plugin/TagHelpers.pm lib/Mojolicious/Plugins.pm lib/Mojolicious/Renderer.pm lib/Mojolicious/resources/public/favicon.ico lib/Mojolicious/resources/public/mojo/failraptor.png lib/Mojolicious/resources/public/mojo/jquery/jquery.js lib/Mojolicious/resources/public/mojo/logo-black-2x.png lib/Mojolicious/resources/public/mojo/logo-black.png lib/Mojolicious/resources/public/mojo/logo-white-2x.png lib/Mojolicious/resources/public/mojo/logo-white.png lib/Mojolicious/resources/public/mojo/noraptor.png lib/Mojolicious/resources/public/mojo/notfound.png lib/Mojolicious/resources/public/mojo/pinstripe-dark.png lib/Mojolicious/resources/public/mojo/pinstripe-light.png lib/Mojolicious/resources/public/mojo/prettify/prettify-mojo-dark.css lib/Mojolicious/resources/public/mojo/prettify/prettify-mojo-light.css lib/Mojolicious/resources/public/mojo/prettify/run_prettify.js lib/Mojolicious/resources/templates/mojo/debug.html.ep lib/Mojolicious/resources/templates/mojo/exception.html.ep lib/Mojolicious/resources/templates/mojo/menubar.html.ep lib/Mojolicious/resources/templates/mojo/not_found.html.ep lib/Mojolicious/resources/templates/mojo/perldoc.html.ep lib/Mojolicious/Routes.pm lib/Mojolicious/Routes/Match.pm lib/Mojolicious/Routes/Pattern.pm lib/Mojolicious/Routes/Route.pm lib/Mojolicious/Sessions.pm lib/Mojolicious/Static.pm lib/Mojolicious/Types.pm lib/Mojolicious/Validator.pm lib/Mojolicious/Validator/Validation.pm lib/ojo.pm lib/Test/Mojo.pm LICENSE Makefile.PL MANIFEST This list of files MANIFEST.SKIP README.md script/hypnotoad script/mojo script/morbo t/mojo/asset.t t/mojo/base.t t/mojo/bytestream.t t/mojo/cache.t t/mojo/certs/bad.crt t/mojo/certs/bad.key t/mojo/certs/ca.crt t/mojo/certs/ca.key t/mojo/certs/client.crt t/mojo/certs/client.key t/mojo/certs/domain.crt t/mojo/certs/domain.key t/mojo/certs/server.crt t/mojo/certs/server.key t/mojo/cgi.t t/mojo/collection.t t/mojo/content.t t/mojo/cookie.t t/mojo/cookiejar.t t/mojo/daemon.t t/mojo/daemon_ipv6_tls.t t/mojo/date.t t/mojo/delay.t t/mojo/dom.t t/mojo/eventemitter.t t/mojo/exception.t t/mojo/file.t t/mojo/headers.t t/mojo/home.t t/mojo/hypnotoad.t t/mojo/ioloop.t t/mojo/ioloop_ipv6.t t/mojo/ioloop_tls.t t/mojo/json.t t/mojo/json_pointer.t t/mojo/lib/Mojo/.hidden.txt t/mojo/lib/Mojo/.test/hidden.txt t/mojo/lib/Mojo/BaseTest/Base1.pm t/mojo/lib/Mojo/BaseTest/Base2.pm t/mojo/lib/Mojo/BaseTest/Base3.pm t/mojo/lib/Mojo/DeprecationTest.pm t/mojo/lib/Mojo/LoaderException.pm t/mojo/lib/Mojo/LoaderException2.pm t/mojo/lib/Mojo/LoaderTest/A.pm t/mojo/lib/Mojo/LoaderTest/B.pm t/mojo/lib/Mojo/LoaderTest/C.pm t/mojo/lib/Mojo/Server/Morbo/Backend/TestBackend.pm t/mojo/lib/Mojo/TestConnectProxy.pm t/mojo/lib/myapp.pl t/mojo/loader.t t/mojo/log.t t/mojo/morbo.t t/mojo/parameters.t t/mojo/path.t t/mojo/prefork.t t/mojo/promise.t t/mojo/proxy.t t/mojo/psgi.t t/mojo/reactor_detect.t t/mojo/reactor_ev.t t/mojo/reactor_poll.t t/mojo/request.t t/mojo/request_cgi.t t/mojo/response.t t/mojo/roles.t t/mojo/signatures.t t/mojo/subprocess.t t/mojo/template.t t/mojo/templates/exception.mt t/mojo/templates/test.mt t/mojo/templates/utf8_exception.mt t/mojo/tls.t t/mojo/transactor.t t/mojo/url.t t/mojo/user_agent.t t/mojo/user_agent_online.t t/mojo/user_agent_socks.t t/mojo/user_agent_tls.t t/mojo/user_agent_unix.t t/mojo/util.t t/mojo/websocket.t t/mojo/websocket_frames.t t/mojo/websocket_proxy.t t/mojo/websocket_proxy_tls.t t/mojolicious/app.t t/mojolicious/charset_lite_app.t t/mojolicious/command.t t/mojolicious/commands.t t/mojolicious/dispatch.t t/mojolicious/dispatcher_lite_app.t t/mojolicious/embedded_app.t t/mojolicious/embedded_lite_app.json t/mojolicious/embedded_lite_app.t t/mojolicious/exception_lite_app.t t/mojolicious/external/lib/MyApp.pm t/mojolicious/external/my_app.conf t/mojolicious/external/my_app.testing.conf t/mojolicious/external/myapp.conf t/mojolicious/external/myapp.pl t/mojolicious/external/myapp.testing.conf t/mojolicious/external/myapp2.pl t/mojolicious/external/public/index.html t/mojolicious/external/script/my_app t/mojolicious/external/templates/index.html.ep t/mojolicious/external_app.t t/mojolicious/external_lite_app.t t/mojolicious/group_lite_app.t t/mojolicious/json_config_lite_app.json t/mojolicious/json_config_lite_app.t t/mojolicious/json_config_lite_app_abs.development.json t/mojolicious/json_config_lite_app_abs.json t/mojolicious/json_config_mode_lite_app.json t/mojolicious/json_config_mode_lite_app.t t/mojolicious/json_config_mode_lite_app.testing.json t/mojolicious/layouted_lite_app.t t/mojolicious/lib/AroundPlugin.pm t/mojolicious/lib/EmbeddedTestApp.pm t/mojolicious/lib/MojoliciousConfigTest.pm t/mojolicious/lib/MojoliciousTest.pm t/mojolicious/lib/MojoliciousTest/Baz.pm t/mojolicious/lib/MojoliciousTest/Command/test_command.pm t/mojolicious/lib/MojoliciousTest/Exceptional.pm t/mojolicious/lib/MojoliciousTest/Foo.pm t/mojolicious/lib/MojoliciousTest/Foo/Bar.pm t/mojolicious/lib/MojoliciousTest/Plugin/Test/SomePlugin2.pm t/mojolicious/lib/MojoliciousTest/Plugin/UPPERCASETestPlugin.pm t/mojolicious/lib/MojoliciousTest/PODTest.pm t/mojolicious/lib/MojoliciousTest/SideEffects/Test.pm t/mojolicious/lib/MojoliciousTest/SyntaxError.pm t/mojolicious/lib/MojoliciousTest2/Foo.pm t/mojolicious/lib/MojoliciousTest3/Bar.pm t/mojolicious/lib/MojoliciousTest3/Baz.pm t/mojolicious/lib/MojoliciousTestController.pm t/mojolicious/lib/PluginWithEmbeddedApp.pm t/mojolicious/lib/PluginWithTemplate.pm t/mojolicious/lib/SingleFileTestApp.pm t/mojolicious/lite_app.t t/mojolicious/longpolling_lite_app.t t/mojolicious/mojolicious_config_test.whatever.conf t/mojolicious/multipath_lite_app.t t/mojolicious/ojo.t t/mojolicious/ojo_signatures.t t/mojolicious/pattern.t t/mojolicious/pod_renderer_lite_app.t t/mojolicious/production_app.t t/mojolicious/public/hello.txt t/mojolicious/public/hello2.txt t/mojolicious/public/hello4.txt t/mojolicious/public2/hello.txt t/mojolicious/public2/hello3.txt t/mojolicious/public_dev/another/file t/mojolicious/public_dev/hello.txt t/mojolicious/rebased_lite_app.t t/mojolicious/renderer.t t/mojolicious/restful_lite_app.t t/mojolicious/routes.t t/mojolicious/secret.txt t/mojolicious/signatures_lite_app.t t/mojolicious/single_file_test_app.conf t/mojolicious/static_lite_app.t t/mojolicious/tag_helper_lite_app.t t/mojolicious/templates/23.html.epl t/mojolicious/templates/dies_too.html.ep t/mojolicious/templates/encoding.koi8-r.ep t/mojolicious/templates/exception.html.epl t/mojolicious/templates/exception.testing.html.ep t/mojolicious/templates/foo/bar.rss.ep t/mojolicious/templates/foo/bar/index.html.epl t/mojolicious/templates/foo/bar/test.html.ep t/mojolicious/templates/foo/index.html.xpl t/mojolicious/templates/foo/yada.html.ep t/mojolicious/templates/layouts/default.html.epl t/mojolicious/templates/layouts/green.html.epl t/mojolicious/templates/not_found.testing.html.ep t/mojolicious/templates/simple.html.pod t/mojolicious/templates/syntaxerror.html.epl t/mojolicious/templates/withblock.txt.epl t/mojolicious/templates/WithGreenLayout.html.epl t/mojolicious/templates2/42.html+test.ep t/mojolicious/templates2/42.html.ep t/mojolicious/templates2/foo/yada.html.epl t/mojolicious/testing_app.t t/mojolicious/tls_lite_app.t t/mojolicious/twinkle_lite_app.conf t/mojolicious/twinkle_lite_app.t t/mojolicious/types.t t/mojolicious/upload_lite_app.t t/mojolicious/upload_stream_lite_app.t t/mojolicious/validation_lite_app.t t/mojolicious/websocket_lite_app.t t/pod.t t/pod_coverage.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Mojolicious-7.59/t/000755 000765 000024 00000000000 13215530106 014151 5ustar00sristaff000000 000000 Mojolicious-7.59/script/000755 000765 000024 00000000000 13215530106 015212 5ustar00sristaff000000 000000 Mojolicious-7.59/README.md000644 000765 000024 00000010107 13210661316 015167 0ustar00sristaff000000 000000 # Mojolicious [![Build Status](https://travis-ci.org/kraih/mojo.svg?branch=master)](https://travis-ci.org/kraih/mojo) [![Windows build status](https://ci.appveyor.com/api/projects/status/rf4661uxfjolra2y?svg=true)](https://ci.appveyor.com/project/kraih/mojo) Back in the early days of the web, many people learned Perl because of a wonderful Perl library called [CGI](https://metacpan.org/module/CGI). It was simple enough to get started without knowing much about the language and powerful enough to keep you going, learning by doing was much fun. While most of the techniques used are outdated now, the idea behind it is not. Mojolicious is a new endeavor to implement this idea using bleeding edge technologies. ## Features * An amazing **real-time web framework**, allowing you to easily grow single file prototypes into well-structured MVC web applications. * Powerful out of the box with RESTful routes, plugins, commands, Perl-ish templates, content negotiation, session management, form validation, testing framework, static file server, CGI/[PSGI](http://plackperl.org) detection, first class Unicode support and much more for you to discover. * A powerful **web development toolkit**, that you can use for all kinds of applications, independently of the web framework. * Full stack HTTP and WebSocket client/server implementation with IPv6, TLS, SNI, IDNA, HTTP/SOCKS5 proxy, UNIX domain socket, Comet (long polling), Promises/A+, keep-alive, connection pooling, timeout, cookie, multipart, and gzip compression support. * Built-in non-blocking I/O web server, supporting multiple event loops as well as optional pre-forking and hot deployment, perfect for building highly scalable web services. * JSON and HTML/XML parser with CSS selector support. * Very clean, portable and object-oriented pure-Perl API with no hidden magic and no requirements besides Perl 5.24.0 (versions as old as 5.10.1 can be used too, but may require additional CPAN modules to be installed) * Fresh code based upon years of experience developing [Catalyst](http://www.catalystframework.org), free and open source. * Hundreds of 3rd party [extensions](https://metacpan.org/requires/distribution/Mojolicious) and high quality spin-off projects like the [Minion](https://metacpan.org/pod/Minion) job queue. ## Installation All you need is a one-liner, it takes less than a minute. $ curl -L https://cpanmin.us | perl - -M https://cpan.metacpan.org -n Mojolicious We recommend the use of a [Perlbrew](http://perlbrew.pl) environment. ## Getting Started These three lines are a whole web application. ```perl use Mojolicious::Lite; get '/' => {text => 'I ♥ Mojolicious!'}; app->start; ``` To run this example with the built-in development web server just put the code into a file and start it with `morbo`. $ morbo hello.pl Server available at http://127.0.0.1:3000 $ curl http://127.0.0.1:3000/ I ♥ Mojolicious! ## Duct tape for the HTML5 web Use all the latest Perl and HTML features in beautiful single file prototypes like this one, and [grow](http://mojolicious.org/perldoc/Mojolicious/Guides/Growing#Differences) them easily into well-structured **Model-View-Controller** web applications. ```perl use Mojolicious::Lite -signatures; # Render template "index.html.ep" from the DATA section get '/' => sub ($c) { $c->render(template => 'index'); }; # WebSocket service used by the template to extract the title from a website websocket '/title' => sub ($c) { $c->on(message => sub ($c, $msg) { my $title = $c->ua->get($msg)->result->dom->at('title')->text; $c->send($title); }); }; app->start; __DATA__ @@ index.html.ep % my $url = url_for 'title'; ``` ## Want to know more? Take a look at our excellent [documentation](http://mojolicious.org/perldoc)! Mojolicious-7.59/MANIFEST.SKIP000644 000765 000024 00000000132 13200114653 015577 0ustar00sristaff000000 000000 ^\.(?!perltidyrc) .*\.old$ \.tar\.gz$ ^Makefile$ ^MYMETA\. ^blib ^pm_to_blib \B\.DS_Store Mojolicious-7.59/examples/000755 000765 000024 00000000000 13215530106 015524 5ustar00sristaff000000 000000 Mojolicious-7.59/META.yml000644 000765 000024 00000001620 13215530106 015156 0ustar00sristaff000000 000000 --- abstract: 'Real-time web framework' author: - 'Sebastian Riedel ' build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'ExtUtils::MakeMaker version 7.3, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Mojolicious no_index: directory: - t - inc - examples - t requires: IO::Socket::IP: '0.37' JSON::PP: '2.27103' Pod::Simple: '3.09' Time::Local: '1.2' perl: '5.010001' resources: IRC: irc://irc.perl.org/#mojo bugtracker: https://github.com/kraih/mojo/issues homepage: http://mojolicious.org license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/kraih/mojo.git version: '7.59' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' Mojolicious-7.59/lib/000755 000765 000024 00000000000 13215530106 014454 5ustar00sristaff000000 000000 Mojolicious-7.59/Makefile.PL000644 000765 000024 00000002554 13200114653 015665 0ustar00sristaff000000 000000 use 5.010001; use strict; use warnings; use ExtUtils::MakeMaker; # 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.37 first shipped with Perl 5.21.11 WriteMakefile( NAME => 'Mojolicious', VERSION_FROM => 'lib/Mojolicious.pm', ABSTRACT => 'Real-time web framework', AUTHOR => 'Sebastian Riedel ', LICENSE => 'artistic_2', META_MERGE => { dynamic_config => 0, 'meta-spec' => {version => 2}, no_index => {directory => ['examples', 't']}, prereqs => {runtime => {requires => {perl => '5.010001'}}}, resources => { bugtracker => {web => 'https://github.com/kraih/mojo/issues'}, homepage => 'http://mojolicious.org', license => ['http://www.opensource.org/licenses/artistic-license-2.0'], repository => { type => 'git', url => 'https://github.com/kraih/mojo.git', web => 'https://github.com/kraih/mojo', }, x_IRC => 'irc://irc.perl.org/#mojo' }, }, PREREQ_PM => { 'IO::Socket::IP' => '0.37', 'JSON::PP' => '2.27103', 'Pod::Simple' => '3.09', 'Time::Local' => '1.2' }, EXE_FILES => ['script/hypnotoad', 'script/mojo', 'script/morbo'], test => {TESTS => 't/*.t t/*/*.t'} ); Mojolicious-7.59/.perltidyrc000644 000765 000024 00000000717 13200114653 016074 0ustar00sristaff000000 000000 -pbp # Start with Perl Best Practices -w # Show all warnings -iob # Ignore old breakpoints -l=80 # 80 characters per line -mbl=2 # No more than 2 blank lines -i=2 # Indentation is 2 columns -ci=2 # Continuation indentation is 2 columns -vt=0 # Less vertical tightness -pt=2 # High parenthesis tightness -bt=2 # High brace tightness -sbt=2 # High square bracket tightness -isbc # Don't indent comments without leading space Mojolicious-7.59/META.json000644 000765 000024 00000003040 13215530107 015325 0ustar00sristaff000000 000000 { "abstract" : "Real-time web framework", "author" : [ "Sebastian Riedel " ], "dynamic_config" : 0, "generated_by" : "ExtUtils::MakeMaker version 7.3, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Mojolicious", "no_index" : { "directory" : [ "t", "inc", "examples", "t" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "IO::Socket::IP" : "0.37", "JSON::PP" : "2.27103", "Pod::Simple" : "3.09", "Time::Local" : "1.2", "perl" : "5.010001" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/kraih/mojo/issues" }, "homepage" : "http://mojolicious.org", "license" : [ "http://www.opensource.org/licenses/artistic-license-2.0" ], "repository" : { "type" : "git", "url" : "https://github.com/kraih/mojo.git", "web" : "https://github.com/kraih/mojo" }, "x_IRC" : "irc://irc.perl.org/#mojo" }, "version" : "7.59", "x_serialization_backend" : "JSON::PP version 2.97000" } Mojolicious-7.59/lib/Mojo.pm000644 000765 000024 00000005216 13215066270 015730 0ustar00sristaff000000 000000 package Mojo; use Mojo::Base -base; # "Professor: These old Doomsday devices are dangerously unstable. I'll rest # easier not knowing where they are." use Carp (); use Mojo::Log; use Mojo::Transaction::HTTP; use Mojo::Util; has log => sub { Mojo::Log->new }; sub build_tx { Mojo::Transaction::HTTP->new } sub config { Mojo::Util::_stash(config => @_) } sub handler { Carp::croak 'Method "handler" not implemented in subclass' } 1; =encoding utf8 =head1 NAME Mojo - Web development toolkit =head1 SYNOPSIS package MyApp; use Mojo::Base 'Mojo'; # All the complexities of CGI, PSGI, HTTP and WebSockets get reduced to a # single method call! sub handler { my ($self, $tx) = @_; # Request my $method = $tx->req->method; my $path = $tx->req->url->path; # Response $tx->res->code(200); $tx->res->headers->content_type('text/plain'); $tx->res->body("$method request for $path!"); # Resume transaction $tx->resume; } =head1 DESCRIPTION A powerful web development toolkit, with all the basic tools and helpers needed to write simple web applications and higher level web frameworks, such as L. Some of the most commonly used tools are L, L, L, L, L, L and L. See L for more! =head1 ATTRIBUTES L implements the following attributes. =head2 log my $log = $app->log; $app = $app->log(Mojo::Log->new); The logging layer of your application, defaults to a L object. # Log debug message $app->log->debug('It works'); =head1 METHODS L inherits all methods from L and implements the following new ones. =head2 build_tx my $tx = $app->build_tx; Transaction builder, defaults to building a L object. =head2 config my $hash = $app->config; my $foo = $app->config('foo'); $app = $app->config({foo => 'bar', baz => 23}); $app = $app->config(foo => 'bar', baz => 23); Application configuration. # Remove value my $foo = delete $app->config->{foo}; # Assign multiple values at once $app->config(foo => 'test', bar => 23); =head2 handler $app->handler(Mojo::Transaction::HTTP->new); The handler is the main entry point to your application or framework and will be called for each new transaction, which will usually be a L or L object. Meant to be overloaded in a subclass. sub handler { my ($self, $tx) = @_; ... } =head1 SEE ALSO L, L, L. =cut Mojolicious-7.59/lib/Test/000755 000765 000024 00000000000 13215530106 015373 5ustar00sristaff000000 000000 Mojolicious-7.59/lib/ojo.pm000644 000765 000024 00000015241 13214542545 015615 0ustar00sristaff000000 000000 package ojo; use Mojo::Base -strict; use Benchmark qw(timeit timestr :hireswallclock); use Mojo::ByteStream 'b'; use Mojo::Collection 'c'; use Mojo::DOM; use Mojo::File 'path'; use Mojo::JSON 'j'; use Mojo::Util qw(dumper monkey_patch); # Silent one-liners $ENV{MOJO_LOG_LEVEL} ||= 'fatal'; sub import { # Mojolicious::Lite my $caller = caller; eval "package $caller; use Mojolicious::Lite; 1" or die $@; Mojo::Base->import(-strict, $] < 5.020 ? () : (-signatures)); my $ua = $caller->app->ua; $ua->server->app->hook(around_action => sub { local $_ = $_[1]; $_[0]() }); $ua->max_redirects(10) unless defined $ENV{MOJO_MAX_REDIRECTS}; $ua->proxy->detect unless defined $ENV{MOJO_PROXY}; # The ojo DSL monkey_patch $caller, a => sub { $caller->can('any')->(@_) and return $ua->server->app }, b => \&b, c => \&c, d => sub { $ua->delete(@_)->result }, f => \&path, g => sub { $ua->get(@_)->result }, h => sub { $ua->head(@_)->result }, j => \&j, n => sub (&@) { say STDERR timestr timeit($_[1] // 1, $_[0]) }, o => sub { $ua->options(@_)->result }, p => sub { $ua->post(@_)->result }, r => \&dumper, t => sub { $ua->patch(@_)->result }, u => sub { $ua->put(@_)->result }, x => sub { Mojo::DOM->new(@_) }; } 1; =encoding utf8 =head1 NAME ojo - Fun one-liners with Mojo =head1 SYNOPSIS $ perl -Mojo -E 'say g("mojolicious.org")->dom->at("title")->text' =head1 DESCRIPTION A collection of automatically exported functions for fun Perl one-liners. Ten redirects will be followed by default, you can change this behavior with the C environment variable. $ MOJO_MAX_REDIRECTS=0 perl -Mojo -E 'say g("example.com")->code' Proxy detection is enabled by default, but you can disable it with the C environment variable. $ MOJO_PROXY=0 perl -Mojo -E 'say g("example.com")->body' Every L one-liner is also a L application. $ perl -Mojo -E 'get "/" => {inline => "%= time"}; app->start' get / On Perl 5.20+ L will be enabled automatically. $ perl -Mojo -E 'a(sub ($c) { $c->render(text => 'Hello!') })->start' get / If it is not already defined, the C environment variable will be set to C. =head1 FUNCTIONS L implements the following functions, which are automatically exported. =head2 a my $app = a('/hello' => sub { $_->render(json => {hello => 'world'}) }); Create a route with L and return the current L object. The current controller object is also available to actions as C<$_>. See also L for more argument variations. $ perl -Mojo -E 'a("/hello" => {text => "Hello Mojo!"})->start' daemon =head2 b my $stream = b('lalala'); Turn string into a L object. $ perl -Mojo -E 'b(g("mojolicious.org")->body)->html_unescape->say' =head2 c my $collection = c(1, 2, 3); Turn list into a L object. =head2 d my $res = d('example.com'); my $res = d('http://example.com' => {Accept => '*/*'} => 'Hi!'); my $res = d('http://example.com' => {Accept => '*/*'} => form => {a => 'b'}); my $res = d('http://example.com' => {Accept => '*/*'} => json => {a => 'b'}); Perform C request with L and return resulting L object. =head2 f my $path = f('/home/sri/foo.txt'); Turn string into a L object. $ perl -Mojo -E 'say r j f("hello.json")->slurp' =head2 g my $res = g('example.com'); my $res = g('http://example.com' => {Accept => '*/*'} => 'Hi!'); my $res = g('http://example.com' => {Accept => '*/*'} => form => {a => 'b'}); my $res = g('http://example.com' => {Accept => '*/*'} => json => {a => 'b'}); Perform C request with L and return resulting L object. $ perl -Mojo -E 'say g("mojolicious.org")->dom("h1")->map("text")->join("\n")' =head2 h my $res = h('example.com'); my $res = h('http://example.com' => {Accept => '*/*'} => 'Hi!'); my $res = h('http://example.com' => {Accept => '*/*'} => form => {a => 'b'}); my $res = h('http://example.com' => {Accept => '*/*'} => json => {a => 'b'}); Perform C request with L and return resulting L object. =head2 j my $bytes = j([1, 2, 3]); my $bytes = j({foo => 'bar'}); my $value = j($bytes); Encode Perl data structure or decode JSON with L. $ perl -Mojo -E 'f("hello.json")->spurt(j {hello => "world!"})' =head2 n n {...}; n {...} 100; Benchmark block and print the results to C, with an optional number of iterations, which defaults to C<1>. $ perl -Mojo -E 'n { say g("mojolicious.org")->code }' =head2 o my $res = o('example.com'); my $res = o('http://example.com' => {Accept => '*/*'} => 'Hi!'); my $res = o('http://example.com' => {Accept => '*/*'} => form => {a => 'b'}); my $res = o('http://example.com' => {Accept => '*/*'} => json => {a => 'b'}); Perform C request with L and return resulting L object. =head2 p my $res = p('example.com'); my $res = p('http://example.com' => {Accept => '*/*'} => 'Hi!'); my $res = p('http://example.com' => {Accept => '*/*'} => form => {a => 'b'}); my $res = p('http://example.com' => {Accept => '*/*'} => json => {a => 'b'}); Perform C request with L and return resulting L object. =head2 r my $perl = r({data => 'structure'}); Dump a Perl data structure with L. perl -Mojo -E 'say r g("example.com")->headers->to_hash' =head2 t my $res = t('example.com'); my $res = t('http://example.com' => {Accept => '*/*'} => 'Hi!'); my $res = t('http://example.com' => {Accept => '*/*'} => form => {a => 'b'}); my $res = t('http://example.com' => {Accept => '*/*'} => json => {a => 'b'}); Perform C request with L and return resulting L object. =head2 u my $res = u('example.com'); my $res = u('http://example.com' => {Accept => '*/*'} => 'Hi!'); my $res = u('http://example.com' => {Accept => '*/*'} => form => {a => 'b'}); my $res = u('http://example.com' => {Accept => '*/*'} => json => {a => 'b'}); Perform C request with L and return resulting L object. =head2 x my $dom = x('
Hello!
'); Turn HTML/XML input into L object. $ perl -Mojo -E 'say x(f("test.html")->slurp)->at("title")->text' =head1 SEE ALSO L, L, L. =cut Mojolicious-7.59/lib/Mojolicious.pm000644 000765 000024 00000064274 13215066354 017334 0ustar00sristaff000000 000000 package Mojolicious; use Mojo::Base 'Mojo'; # "Fry: Shut up and take my money!" use Carp (); use Mojo::Exception; use Mojo::Home; use Mojo::Log; use Mojo::Util; use Mojo::UserAgent; use Mojolicious::Commands; use Mojolicious::Controller; use Mojolicious::Plugins; use Mojolicious::Renderer; use Mojolicious::Routes; use Mojolicious::Sessions; use Mojolicious::Static; use Mojolicious::Types; use Mojolicious::Validator; use Scalar::Util (); use Time::HiRes (); has commands => sub { my $commands = Mojolicious::Commands->new(app => shift); Scalar::Util::weaken $commands->{app}; return $commands; }; has controller_class => 'Mojolicious::Controller'; has home => sub { Mojo::Home->new->detect(ref shift) }; has log => sub { my $self = shift; # Check if we have a log directory that is writable my $log = Mojo::Log->new; my $home = $self->home; my $mode = $self->mode; $log->path($home->child('log', "$mode.log")) if -d $home->child('log') && -w _; # Reduced log output outside of development mode return $mode eq 'development' ? $log : $log->level('info'); }; has 'max_request_size'; has mode => sub { $ENV{MOJO_MODE} || $ENV{PLACK_ENV} || 'development' }; has moniker => sub { Mojo::Util::decamelize ref shift }; has plugins => sub { Mojolicious::Plugins->new }; has renderer => sub { Mojolicious::Renderer->new }; has routes => sub { Mojolicious::Routes->new }; has secrets => sub { my $self = shift; # Warn developers about insecure default $self->log->debug('Your secret passphrase needs to be changed'); # Default to moniker return [$self->moniker]; }; has sessions => sub { Mojolicious::Sessions->new }; has static => sub { Mojolicious::Static->new }; has types => sub { Mojolicious::Types->new }; has ua => sub { my $ua = Mojo::UserAgent->new; Scalar::Util::weaken $ua->server->app(shift)->{app}; return $ua; }; has validator => sub { Mojolicious::Validator->new }; our $CODENAME = 'Doughnut'; our $VERSION = '7.59'; sub AUTOLOAD { my $self = shift; my ($package, $method) = our $AUTOLOAD =~ /^(.+)::(.+)$/; Carp::croak "Undefined subroutine &${package}::$method called" unless Scalar::Util::blessed $self && $self->isa(__PACKAGE__); # Call helper with fresh controller Carp::croak qq{Can't locate object method "$method" via package "$package"} unless my $helper = $self->renderer->get_helper($method); return $self->build_controller->$helper(@_); } sub build_controller { my ($self, $tx) = @_; $tx ||= $self->build_tx; # Embedded application my $stash = {}; if (my $sub = $tx->can('stash')) { ($stash, $tx) = ($tx->$sub, $tx->tx) } # Build default controller my $defaults = $self->defaults; @$stash{keys %$defaults} = values %$defaults; my $c = $self->controller_class->new(app => $self, stash => $stash, tx => $tx); Scalar::Util::weaken $c->{app}; return $c; } sub build_tx { my $self = shift; my $tx = Mojo::Transaction::HTTP->new; my $max = $self->max_request_size; $tx->req->max_message_size($max) if defined $max; $self->plugins->emit_hook(after_build_tx => $tx, $self); return $tx; } sub defaults { Mojo::Util::_stash(defaults => @_) } sub dispatch { my ($self, $c) = @_; my $plugins = $self->plugins->emit_hook(before_dispatch => $c); # Try to find a static file my $tx = $c->tx; $self->static->dispatch($c) and $plugins->emit_hook(after_static => $c) unless $tx->res->code; # Start timer (ignore static files) my $stash = $c->stash; unless ($stash->{'mojo.static'} || $stash->{'mojo.started'}) { my $req = $c->req; my $method = $req->method; my $path = $req->url->path->to_abs_string; $self->log->debug(qq{$method "$path"}); $stash->{'mojo.started'} = [Time::HiRes::gettimeofday]; } # Routes $plugins->emit_hook(before_routes => $c); $c->helpers->reply->not_found unless $tx->res->code || $self->routes->dispatch($c) || $tx->res->code; } sub handler { my $self = shift; # Dispatcher has to be last in the chain ++$self->{dispatch} and $self->hook(around_action => sub { $_[2]($_[1]) }) and $self->hook(around_dispatch => sub { $_[1]->app->dispatch($_[1]) }) unless $self->{dispatch}; # Process with chain my $c = $self->build_controller(@_); Scalar::Util::weaken $c->{tx}; $self->plugins->emit_chain(around_dispatch => $c); # Delayed response $self->log->debug('Nothing has been rendered, expecting delayed response') unless $c->stash->{'mojo.rendered'}; } sub helper { shift->renderer->add_helper(@_) } sub hook { shift->plugins->on(@_) } sub new { my $self = shift->SUPER::new(@_); my $home = $self->home; push @{$self->renderer->paths}, $home->child('templates')->to_string; push @{$self->static->paths}, $home->child('public')->to_string; # Default to controller and application namespace my $r = $self->routes->namespaces(["@{[ref $self]}::Controller", ref $self]); # Hide controller attributes/methods $r->hide(qw(app continue cookie every_cookie every_param)); $r->hide(qw(every_signed_cookie finish flash helpers match on param)); $r->hide(qw(redirect_to render render_later render_maybe render_to_string)); $r->hide(qw(rendered req res respond_to send session signed_cookie stash)); $r->hide(qw(tx url_for validation write write_chunk)); $self->plugin($_) for qw(HeaderCondition DefaultHelpers TagHelpers EPLRenderer EPRenderer); # Exception handling should be first in chain $self->hook(around_dispatch => \&_exception); $self->startup; return $self; } sub plugin { my $self = shift; $self->plugins->register_plugin(shift, $self, @_); } sub start { my $self = shift; $_->warmup for $self->static, $self->renderer; return $self->commands->run(@_ ? @_ : @ARGV); } sub startup { } sub _exception { my ($next, $c) = @_; local $SIG{__DIE__} = sub { ref $_[0] ? CORE::die $_[0] : Mojo::Exception->throw(shift) }; $c->helpers->reply->exception($@) unless eval { $next->(); 1 }; } 1; =encoding utf8 =head1 NAME Mojolicious - Real-time web framework =head1 SYNOPSIS # Application package MyApp; use Mojo::Base 'Mojolicious'; # Route sub startup { my $self = shift; $self->routes->get('/hello')->to('foo#hello'); } # Controller package MyApp::Controller::Foo; use Mojo::Base 'Mojolicious::Controller'; # Action sub hello { my $self = shift; $self->render(text => 'Hello World!'); } =head1 DESCRIPTION An amazing real-time web framework built on top of the powerful L web development toolkit. With support for RESTful routes, plugins, commands, Perl-ish templates, content negotiation, session management, form validation, testing framework, static file server, C/C detection, first class Unicode support and much more for you to discover. Take a look at our excellent documentation in L! =head1 HOOKS L will emit the following hooks in the listed order. =head2 after_build_tx Emitted right after the transaction is built and before the HTTP request gets parsed. $app->hook(after_build_tx => sub { my ($tx, $app) = @_; ... }); This is a very powerful hook and should not be used lightly, it makes some rather advanced features such as upload progress bars possible. Note that this hook will not work for embedded applications, because only the host application gets to build transactions. (Passed the transaction and application object) =head2 around_dispatch Emitted right after a new request has been received and wraps around the whole dispatch process, so you have to manually forward to the next hook if you want to continue the chain. Default exception handling with Lexception"> is the first hook in the chain and a call to L the last, yours will be in between. $app->hook(around_dispatch => sub { my ($next, $c) = @_; ... $next->(); ... }); This is a very powerful hook and should not be used lightly, it allows you to, for example, customize application-wide exception handling, consider it the sledgehammer in your toolbox. (Passed a callback leading to the next hook and the default controller object) =head2 before_dispatch Emitted right before the static file server and router start their work. $app->hook(before_dispatch => sub { my $c = shift; ... }); Very useful for rewriting incoming requests and other preprocessing tasks. (Passed the default controller object) =head2 after_static Emitted after a static file response has been generated by the static file server. $app->hook(after_static => sub { my $c = shift; ... }); Mostly used for post-processing static file responses. (Passed the default controller object) =head2 before_routes Emitted after the static file server determined if a static file should be served and before the router starts its work. $app->hook(before_routes => sub { my $c = shift; ... }); Mostly used for custom dispatchers and collecting metrics. (Passed the default controller object) =head2 around_action Emitted right before an action gets executed and wraps around it, so you have to manually forward to the next hook if you want to continue the chain. Default action dispatching is the last hook in the chain, yours will run before it. $app->hook(around_action => sub { my ($next, $c, $action, $last) = @_; ... return $next->(); }); This is a very powerful hook and should not be used lightly, it allows you for example to pass additional arguments to actions or handle return values differently. Note that this hook can trigger more than once for the same request if there are nested routes. (Passed a callback leading to the next hook, the current controller object, the action callback and a flag indicating if this action is an endpoint) =head2 before_render Emitted before content is generated by the renderer. Note that this hook can trigger out of order due to its dynamic nature, and with embedded applications will only work for the application that is rendering. $app->hook(before_render => sub { my ($c, $args) = @_; ... }); Mostly used for pre-processing arguments passed to the renderer. (Passed the current controller object and the render arguments) =head2 after_render Emitted after content has been generated by the renderer that will be assigned to the response. Note that this hook can trigger out of order due to its dynamic nature, and with embedded applications will only work for the application that is rendering. $app->hook(after_render => sub { my ($c, $output, $format) = @_; ... }); Mostly used for post-processing dynamically generated content. (Passed the current controller object, a reference to the content and the format) =head2 after_dispatch Emitted in reverse order after a response has been generated. Note that this hook can trigger out of order due to its dynamic nature, and with embedded applications will only work for the application that is generating the response. $app->hook(after_dispatch => sub { my $c = shift; ... }); Useful for rewriting outgoing responses and other post-processing tasks. (Passed the current controller object) =head1 ATTRIBUTES L inherits all attributes from L and implements the following new ones. =head2 commands my $commands = $app->commands; $app = $app->commands(Mojolicious::Commands->new); Command line interface for your application, defaults to a L object. # Add another namespace to load commands from push @{$app->commands->namespaces}, 'MyApp::Command'; =head2 controller_class my $class = $app->controller_class; $app = $app->controller_class('Mojolicious::Controller'); Class to be used for the default controller, defaults to L. Note that this class needs to have already been loaded before the first request arrives. =head2 home my $home = $app->home; $app = $app->home(Mojo::Home->new); The home directory of your application, defaults to a L object which stringifies to the actual path. # Portably generate path relative to home directory my $path = $app->home->child('data', 'important.txt'); =head2 log my $log = $app->log; $app = $app->log(Mojo::Log->new); The logging layer of your application, defaults to a L object. The level will default to C if the L is C, or C otherwise. All messages will be written to C, or a C file if a C directory exists. # Log debug message $app->log->debug('It works'); =head2 max_request_size my $max = $app->max_request_size; $app = $app->max_request_size(16777216); Maximum request size in bytes, defaults to the value of L. Setting the value to C<0> will allow requests of indefinite size. Note that increasing this value can also drastically increase memory usage, should you for example attempt to parse an excessively large request body with the methods L or L. =head2 mode my $mode = $app->mode; $app = $app->mode('production'); The operating mode for your application, defaults to a value from the C and C environment variables or C. =head2 moniker my $moniker = $app->moniker; $app = $app->moniker('foo_bar'); Moniker of this application, often used as default filename for configuration files and the like, defaults to decamelizing the application class with L. =head2 plugins my $plugins = $app->plugins; $app = $app->plugins(Mojolicious::Plugins->new); The plugin manager, defaults to a L object. See the L method below if you want to load a plugin. # Add another namespace to load plugins from push @{$app->plugins->namespaces}, 'MyApp::Plugin'; =head2 renderer my $renderer = $app->renderer; $app = $app->renderer(Mojolicious::Renderer->new); Used to render content, defaults to a L object. For more information about how to generate content see L. # Add another "templates" directory push @{$app->renderer->paths}, '/home/sri/templates'; # Add another "templates" directory with higher precedence unshift @{$app->renderer->paths}, '/home/sri/themes/blue/templates'; # Add another class with templates in DATA section push @{$app->renderer->classes}, 'Mojolicious::Plugin::Fun'; =head2 routes my $routes = $app->routes; $app = $app->routes(Mojolicious::Routes->new); The router, defaults to a L object. You use this in your startup method to define the url endpoints for your application. # Add routes my $r = $app->routes; $r->get('/foo/bar')->to('test#foo', title => 'Hello Mojo!'); $r->post('/baz')->to('test#baz'); # Add another namespace to load controllers from push @{$app->routes->namespaces}, 'MyApp::MyController'; =head2 secrets my $secrets = $app->secrets; $app = $app->secrets([$bytes]); Secret passphrases used for signed cookies and the like, defaults to the L of this application, which is not very secure, so you should change it!!! As long as you are using the insecure default there will be debug messages in the log file reminding you to change your passphrase. Only the first passphrase is used to create new signatures, but all of them for verification. So you can increase security without invalidating all your existing signed cookies by rotating passphrases, just add new ones to the front and remove old ones from the back. # Rotate passphrases $app->secrets(['new_passw0rd', 'old_passw0rd', 'very_old_passw0rd']); =head2 sessions my $sessions = $app->sessions; $app = $app->sessions(Mojolicious::Sessions->new); Signed cookie based session manager, defaults to a L object. You can usually leave this alone, see L for more information about working with session data. # Change name of cookie used for all sessions $app->sessions->cookie_name('mysession'); =head2 static my $static = $app->static; $app = $app->static(Mojolicious::Static->new); For serving static files from your C directories, defaults to a L object. # Add another "public" directory push @{$app->static->paths}, '/home/sri/public'; # Add another "public" directory with higher precedence unshift @{$app->static->paths}, '/home/sri/themes/blue/public'; # Add another class with static files in DATA section push @{$app->static->classes}, 'Mojolicious::Plugin::Fun'; # Remove built-in favicon delete $app->static->extra->{'favicon.ico'}; =head2 types my $types = $app->types; $app = $app->types(Mojolicious::Types->new); Responsible for connecting file extensions with MIME types, defaults to a L object. # Add custom MIME type $app->types->type(twt => 'text/tweet'); =head2 ua my $ua = $app->ua; $app = $app->ua(Mojo::UserAgent->new); A full featured HTTP user agent for use in your applications, defaults to a L object. # Perform blocking request say $app->ua->get('example.com')->result->body; =head2 validator my $validator = $app->validator; $app = $app->validator(Mojolicious::Validator->new); Validate values, defaults to a L object. # Add validation check $app->validator->add_check(foo => sub { my ($validation, $name, $value) = @_; return $value ne 'foo'; }); # Add validation filter $app->validator->add_filter(quotemeta => sub { my ($validation, $name, $value) = @_; return quotemeta $value; }); =head1 METHODS L inherits all methods from L and implements the following new ones. =head2 build_controller my $c = $app->build_controller; my $c = $app->build_controller(Mojo::Transaction::HTTP->new); my $c = $app->build_controller(Mojolicious::Controller->new); Build default controller object with L. # Render template from application my $foo = $app->build_controller->render_to_string(template => 'foo'); =head2 build_tx my $tx = $app->build_tx; Build L object and emit L hook. =head2 defaults my $hash = $app->defaults; my $foo = $app->defaults('foo'); $app = $app->defaults({foo => 'bar', baz => 23}); $app = $app->defaults(foo => 'bar', baz => 23); Default values for L, assigned for every new request. # Remove value my $foo = delete $app->defaults->{foo}; # Assign multiple values at once $app->defaults(foo => 'test', bar => 23); =head2 dispatch $app->dispatch(Mojolicious::Controller->new); The heart of every L application, calls the L and L dispatchers for every request and passes them a L object. =head2 handler $app->handler(Mojo::Transaction::HTTP->new); $app->handler(Mojolicious::Controller->new); Sets up the default controller and emits the L hook for every request. =head2 helper $app->helper(foo => sub {...}); 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 templates. For a full list of helpers that are available by default see L and L. # Helper $app->helper(cache => sub { state $cache = {} }); # Application $app->cache->{foo} = 'bar'; my $result = $app->cache->{foo}; # Controller $c->cache->{foo} = 'bar'; my $result = $c->cache->{foo}; # Template % cache->{foo} = 'bar'; %= cache->{foo} =head2 hook $app->hook(after_dispatch => sub {...}); Extend L with hooks, which allow code to be shared with all requests indiscriminately, for a full list of available hooks see L. # Dispatchers will not run if there's already a response code defined $app->hook(before_dispatch => sub { my $c = shift; $c->render(text => 'Skipped static file server and router!') if $c->req->url->path->to_route =~ /do_not_dispatch/; }); =head2 new my $app = Mojolicious->new; my $app = Mojolicious->new(moniker => 'foo_bar'); my $app = Mojolicious->new({moniker => 'foo_bar'}); Construct a new L application and call L. Will automatically detect your home directory. Also sets up the renderer, static file server, a default set of plugins and an L hook with the default exception handling. =head2 plugin $app->plugin('some_thing'); $app->plugin('some_thing', foo => 23); $app->plugin('some_thing', {foo => 23}); $app->plugin('SomeThing'); $app->plugin('SomeThing', foo => 23); $app->plugin('SomeThing', {foo => 23}); $app->plugin('MyApp::Plugin::SomeThing'); $app->plugin('MyApp::Plugin::SomeThing', foo => 23); $app->plugin('MyApp::Plugin::SomeThing', {foo => 23}); Load a plugin, for a full list of example plugins included in the L distribution see L. =head2 start $app->start; $app->start(@ARGV); Start the command line interface for your application. For a full list of commands that are available by default see L. 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 $app->start('daemon', '-l', 'http://*:8080'); =head2 startup $app->startup; This is your main hook into the application, it will be called at application startup. Meant to be overloaded in a subclass. sub startup { my $self = shift; ... } =head1 AUTOLOAD In addition to the L and L above you can also call helpers on L objects. This includes all helpers from L and L. Note that application helpers are always called with a new default controller object, so they can't depend on or change controller state, which includes request, response and stash. # Call helper say $app->dumper({foo => 'bar'}); # Longer version say $app->build_controller->helpers->dumper({foo => 'bar'}); =head1 BUNDLED FILES The L distribution includes a few files with different licenses that have been bundled for internal use. =head2 Mojolicious Artwork Copyright (C) 2010-2017, Sebastian Riedel. Licensed under the CC-SA License, Version 4.0 L. =head2 jQuery Copyright (C) jQuery Foundation. Licensed under the MIT License, L. =head2 prettify.js Copyright (C) 2006, 2013 Google Inc.. Licensed under the Apache License, Version 2.0 L. =head1 CODE NAMES Every major release of L has a code name, these are the ones that have been used in the past. 7.0, C (U+1F369) 6.0, C (U+1F37B) 5.0, C (U+1F42F) 4.0, C (U+1F3A9) 3.0, C (U+1F308) 2.0, C (U+1F343) 1.0, C (U+2744) =head1 SPONSORS Some of the work on this distribution has been sponsored by L, thank you! =head1 PROJECT FOUNDER Sebastian Riedel, C =head1 CORE DEVELOPERS Current members of the core team in alphabetical order: =over 2 Jan Henning Thorsen, C Joel Berger, C Marcus Ramberg, C =back The following members of the core team are currently on hiatus: =over 2 Abhijit Menon-Sen, C Glen Hinkle, C =back =head1 CREDITS In alphabetical order: =over 2 Adam Kennedy Adriano Ferreira Al Newkirk Alex Efros Alex Salimon Alexey Likhatskiy Anatoly Sharifulin Andre Parker Andre Vieth Andreas Jaekel Andreas Koenig Andrew Fresh Andrew Nugged Andrey Khozov Andrey Kuzmin Andy Grundman Aristotle Pagaltzis Ashley Dev Ask Bjoern Hansen Audrey Tang Ben Tyler Ben van Staveren Benjamin Erhart Bernhard Graf Breno G. de Oliveira Brian Duggan Brian Medley Burak Gursoy Ch Lamprecht Charlie Brady Chas. J. Owens IV Chase Whitener Christian Hansen chromatic Curt Tilmes Dan Book Daniel Kimsey Danijel Tasov Danny Thomas David Davis David Webb Diego Kuperman Dmitriy Shalashov Dmitry Konstantinov Dominik Jarmulowicz Dominique Dumont Dotan Dimet Douglas Christopher Wilson Ettore Di Giacinto Eugen Konkov Eugene Toropov Gisle Aas Graham Barr Graham Knop Henry Tang Hideki Yamamura Hiroki Toyokawa Ian Goodacre Ilya Chesnokov James Duncan Jan Jona Javorsek Jan Schmidt Jaroslav Muhin Jesse Vincent Johannes Plunien John Kingsley Jonathan Yu Josh Leder Kazuhiro Shibuya Kevin Old Kitamura Akatsuki Klaus S. Madsen Knut Arne Bjorndal Lars Balker Rasmussen Lee Johnson Leon Brocard Magnus Holm Maik Fischer Mark Fowler Mark Grimes Mark Stosberg Marty Tennison Matt S Trout Matthew Lineen Maksym Komar Maxim Vuets Michael Gregorowicz Michael Harris Mike Magowan Mirko Westermeier Mons Anderson Moritz Lenz Neil Watkiss Nic Sandfield Nils Diewald Oleg Zhelo Olivier Mengue Pascal Gaudette Paul Evans Paul Tomlin Pavel Shaydo Pedro Melo Peter Edwards Pierre-Yves Ritschard Piotr Roszatycki Quentin Carbonneaux Rafal Pocztarski Randal Schwartz Richard Elberger Rick Delaney Robert Hicks Robin Lee Roland Lammel Roy Storey Ryan Jendoubi Salvador Fandino Santiago Zarate Sascha Kiefer Scott Wiersdorf Sergey Zasenko Simon Bertrang Simone Tampieri Shu Cho Skye Shaw Stanis Trendelenburg Steffen Ullrich Stephan Kulow Stephane Este-Gracias Stevan Little Steve Atkins Tatsuhiko Miyagawa Terrence Brannon Tianon Gravi Tomas Znamenacek Tudor Constantin Ulrich Habel Ulrich Kautz Uwe Voelker Viacheslav Tykhanovskyi Victor Engmark Viliam Pucik Wes Cravens William Lindley Yaroslav Korshak Yuki Kimoto Zak B. Elep Zoffix Znet =back =head1 COPYRIGHT AND LICENSE Copyright (C) 2008-2017, Sebastian Riedel and others. This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0. =head1 SEE ALSO L, L, L. =cut Mojolicious-7.59/lib/Mojo/000755 000765 000024 00000000000 13215530106 015360 5ustar00sristaff000000 000000 Mojolicious-7.59/lib/Mojolicious/000755 000765 000024 00000000000 13215530106 016750 5ustar00sristaff000000 000000 Mojolicious-7.59/lib/Mojolicious/Sessions.pm000644 000765 000024 00000011643 13214542563 021132 0ustar00sristaff000000 000000 package Mojolicious::Sessions; use Mojo::Base -base; use Mojo::JSON; use Mojo::Util qw(b64_decode b64_encode); has [qw(cookie_domain secure)]; has cookie_name => 'mojolicious'; has cookie_path => '/'; has default_expiration => 3600; has deserialize => sub { \&Mojo::JSON::j }; has serialize => sub { \&Mojo::JSON::encode_json }; sub load { my ($self, $c) = @_; return unless my $value = $c->signed_cookie($self->cookie_name); $value =~ y/-/=/; return unless my $session = $self->deserialize->(b64_decode $value); # "expiration" value is inherited my $expiration = $session->{expiration} // $self->default_expiration; return if !(my $expires = delete $session->{expires}) && $expiration; return if defined $expires && $expires <= time; my $stash = $c->stash; return unless $stash->{'mojo.active_session'} = keys %$session; $stash->{'mojo.session'} = $session; $session->{flash} = delete $session->{new_flash} if $session->{new_flash}; } sub store { my ($self, $c) = @_; # Make sure session was active my $stash = $c->stash; return unless my $session = $stash->{'mojo.session'}; return unless keys %$session || $stash->{'mojo.active_session'}; # Don't reset flash for static files my $old = delete $session->{flash}; $session->{new_flash} = $old if $stash->{'mojo.static'}; delete $session->{new_flash} unless keys %{$session->{new_flash}}; # Generate "expires" value from "expiration" if necessary my $expiration = $session->{expiration} // $self->default_expiration; my $default = delete $session->{expires}; $session->{expires} = $default || time + $expiration if $expiration || $default; my $value = b64_encode $self->serialize->($session), ''; $value =~ y/=/-/; my $options = { domain => $self->cookie_domain, expires => $session->{expires}, httponly => 1, path => $self->cookie_path, secure => $self->secure }; $c->signed_cookie($self->cookie_name, $value, $options); } 1; =encoding utf8 =head1 NAME Mojolicious::Sessions - Session manager based on signed cookies =head1 SYNOPSIS use Mojolicious::Sessions; my $sessions = Mojolicious::Sessions->new; $sessions->cookie_name('myapp'); $sessions->default_expiration(86400); =head1 DESCRIPTION L manages sessions based on signed cookies for L. All data gets serialized with L and stored Base64 encoded on the client-side, but is protected from unwanted changes with a HMAC-SHA1 signature. =head1 ATTRIBUTES L implements the following attributes. =head2 cookie_domain my $domain = $sessions->cookie_domain; $sessions = $sessions->cookie_domain('.example.com'); Domain for session cookies, not defined by default. =head2 cookie_name my $name = $sessions->cookie_name; $sessions = $sessions->cookie_name('session'); Name for session cookies, defaults to C. =head2 cookie_path my $path = $sessions->cookie_path; $sessions = $sessions->cookie_path('/foo'); Path for session cookies, defaults to C. =head2 default_expiration my $time = $sessions->default_expiration; $sessions = $sessions->default_expiration(3600); Default time for sessions to expire in seconds from now, defaults to C<3600>. The expiration timeout gets refreshed for every request. Setting the value to C<0> will allow sessions to persist until the browser window is closed, this can have security implications though. For more control you can also use the C and C session values. # Expiration date in seconds from now (persists between requests) $c->session(expiration => 604800); # Expiration date as absolute epoch time (only valid for one request) $c->session(expires => time + 604800); # Delete whole session by setting an expiration date in the past $c->session(expires => 1); =head2 deserialize my $cb = $sessions->deserialize; $sessions = $sessions->deserialize(sub {...}); A callback used to deserialize sessions, defaults to L. $sessions->deserialize(sub { my $bytes = shift; return {}; }); =head2 secure my $bool = $sessions->secure; $sessions = $sessions->secure($bool); Set the secure flag on all session cookies, so that browsers send them only over HTTPS connections. =head2 serialize my $cb = $sessions->serialize; $sessions = $sessions->serialize(sub {...}); A callback used to serialize sessions, defaults to L. $sessions->serialize(sub { my $hash = shift; return ''; }); =head1 METHODS L inherits all methods from L and implements the following new ones. =head2 load $sessions->load(Mojolicious::Controller->new); Load session data from signed cookie. =head2 store $sessions->store(Mojolicious::Controller->new); Store session data in signed cookie. =head1 SEE ALSO L, L, L. =cut Mojolicious-7.59/lib/Mojolicious/Plugins.pm000644 000765 000024 00000011244 13214542563 020742 0ustar00sristaff000000 000000 package Mojolicious::Plugins; use Mojo::Base 'Mojo::EventEmitter'; use Mojo::Loader 'load_class'; use Mojo::Util 'camelize'; has namespaces => sub { ['Mojolicious::Plugin'] }; sub emit_chain { my ($self, $name, @args) = @_; my $wrapper; for my $cb (reverse @{$self->subscribers($name)}) { my $next = $wrapper; $wrapper = sub { $cb->($next, @args) }; } !$wrapper ? return : return $wrapper->(); } sub emit_hook { my $self = shift; for my $cb (@{$self->subscribers(shift)}) { $cb->(@_) } return $self; } sub emit_hook_reverse { my $self = shift; for my $cb (reverse @{$self->subscribers(shift)}) { $cb->(@_) } return $self; } sub load_plugin { my ($self, $name) = @_; # Try all namespaces and full module name my $suffix = $name =~ /^[a-z]/ ? camelize $name : $name; my @classes = map {"${_}::$suffix"} @{$self->namespaces}; for my $class (@classes, $name) { return $class->new if _load($class) } # Not found die qq{Plugin "$name" missing, maybe you need to install it?\n}; } sub register_plugin { shift->load_plugin(shift)->register(shift, ref $_[0] ? $_[0] : {@_}); } sub _load { my $module = shift; return $module->isa('Mojolicious::Plugin') unless my $e = load_class $module; ref $e ? die $e : return undef; } 1; =encoding utf8 =head1 NAME Mojolicious::Plugins - Plugin manager =head1 SYNOPSIS use Mojolicious::Plugins; my $plugins = Mojolicious::Plugins->new; push @{$plugins->namespaces}, 'MyApp::Plugin'; =head1 DESCRIPTION L is the plugin manager of L. =head1 PLUGINS The following plugins are included in the L distribution as examples. =over 2 =item L Perl-ish configuration files. =item L General purpose helper collection, loaded automatically. =item L Renderer for plain embedded Perl templates, loaded automatically. =item L Renderer for more sophisticated embedded Perl templates, loaded automatically. =item L Route condition for all kinds of headers, loaded automatically. =item L JSON configuration files. =item L Mount whole L applications. =item L Renderer for turning POD into HTML and documentation browser for L. =item L Template specific helper collection, loaded automatically. =back =head1 EVENTS L inherits all events from L. =head1 ATTRIBUTES L implements the following attributes. =head2 namespaces my $namespaces = $plugins->namespaces; $plugins = $plugins->namespaces(['Mojolicious::Plugin']); Namespaces to load plugins from, defaults to L. # Add another namespace to load plugins from push @{$plugins->namespaces}, 'MyApp::Plugin'; =head1 METHODS L inherits all methods from L and implements the following new ones. =head2 emit_chain $plugins->emit_chain('foo'); $plugins->emit_chain(foo => 123); Emit events as chained hooks. =head2 emit_hook $plugins = $plugins->emit_hook('foo'); $plugins = $plugins->emit_hook(foo => 123); Emit events as hooks. =head2 emit_hook_reverse $plugins = $plugins->emit_hook_reverse('foo'); $plugins = $plugins->emit_hook_reverse(foo => 123); Emit events as hooks in reverse order. =head2 load_plugin my $plugin = $plugins->load_plugin('some_thing'); my $plugin = $plugins->load_plugin('SomeThing'); my $plugin = $plugins->load_plugin('MyApp::Plugin::SomeThing'); Load a plugin from the configured namespaces or by full module name. =head2 register_plugin $plugins->register_plugin('some_thing', Mojolicious->new); $plugins->register_plugin('some_thing', Mojolicious->new, foo => 23); $plugins->register_plugin('some_thing', Mojolicious->new, {foo => 23}); $plugins->register_plugin('SomeThing', Mojolicious->new); $plugins->register_plugin('SomeThing', Mojolicious->new, foo => 23); $plugins->register_plugin('SomeThing', Mojolicious->new, {foo => 23}); $plugins->register_plugin('MyApp::Plugin::SomeThing', Mojolicious->new); $plugins->register_plugin( 'MyApp::Plugin::SomeThing', Mojolicious->new, foo => 23); $plugins->register_plugin( 'MyApp::Plugin::SomeThing', Mojolicious->new, {foo => 23}); Load a plugin from the configured namespaces or by full module name and run C, optional arguments are passed through. =head1 SEE ALSO L, L, L. =cut Mojolicious-7.59/lib/Mojolicious/Validator.pm000644 000765 000024 00000007745 13214542563 021261 0ustar00sristaff000000 000000 package Mojolicious::Validator; use Mojo::Base -base; use Mojo::Util 'trim'; use Mojolicious::Validator::Validation; has checks => sub { { equal_to => \&_equal_to, in => \&_in, like => sub { $_[2] !~ $_[3] }, num => \&_num, size => \&_size, upload => sub { !ref $_[2] || !$_[2]->isa('Mojo::Upload') } }; }; has filters => sub { {trim => \&_trim} }; sub add_check { $_[0]->checks->{$_[1]} = $_[2] and return $_[0] } sub add_filter { $_[0]->filters->{$_[1]} = $_[2] and return $_[0] } sub validation { Mojolicious::Validator::Validation->new(validator => shift); } sub _equal_to { my ($validation, $name, $value, $to) = @_; return 1 unless defined(my $other = $validation->input->{$to}); return $value ne $other; } sub _in { my ($validation, $name, $value) = (shift, shift, shift); $value eq $_ && return undef for @_; return 1; } sub _num { my ($validation, $name, $value, $min, $max) = @_; return 1 if $value !~ /^[0-9]+$/; return defined $min && $max ? $min > $value || $max < $value : undef; } sub _size { my ($validation, $name, $value, $min, $max) = @_; my $len = ref $value ? $value->size : length $value; return $len < $min || $len > $max; } sub _trim { trim $_[2] // '' } 1; =encoding utf8 =head1 NAME Mojolicious::Validator - Validate values =head1 SYNOPSIS use Mojolicious::Validator; my $validator = Mojolicious::Validator->new; my $validation = $validator->validation; $validation->input({foo => 'bar'}); $validation->required('foo')->like(qr/ar$/); say $validation->param('foo'); =head1 DESCRIPTION L validates values for L. =head1 CHECKS These validation checks are available by default. =head2 equal_to $validation = $validation->equal_to('foo'); String value needs to be equal to the value of another field. =head2 in $validation = $validation->in('foo', 'bar', 'baz'); String value needs to match one of the values in the list. =head2 like $validation = $validation->like(qr/^[A-Z]/); String value needs to match the regular expression. =head2 num $validation = $validation->num; $validation = $validation->num(2, 5); String value needs to be a non-fractional number and if provided in the given range. =head2 size $validation = $validation->size(2, 5); String value length or size of L object in bytes needs to be between these two values. =head2 upload $validation = $validation->upload; Value needs to be a L object, representing a file upload. =head1 FILTERS These filters are available by default. =head2 trim $validation = $validation->optional('foo', 'trim'); Trim whitespace characters from both ends of string value with L. =head1 ATTRIBUTES L implements the following attributes. =head2 checks my $checks = $validator->checks; $validator = $validator->checks({size => sub {...}}); Registered validation checks, by default only L, L, L, L, L and L are already defined. =head1 METHODS L inherits all methods from L and implements the following new ones. =head2 add_check $validator = $validator->add_check(size => sub {...}); Register a validation check. $validator->add_check(foo => sub { my ($validation, $name, $value, @args) = @_; ... return undef; }); =head2 add_filter $validator = $validator->add_filter(trim => sub {...}); Register a new filter. $validator->add_filter(foo => sub { my ($validation, $name, $value) = @_; ... return $value; }); =head2 validation my $validation = $validator->validation; Build L object to perform validations. my $validation = $validator->validation; $validation->input({foo => 'bar'}); $validation->required('foo')->size(1, 5); say $validation->param('foo'); =head1 SEE ALSO L, L, L. =cut Mojolicious-7.59/lib/Mojolicious/Validator/000755 000765 000024 00000000000 13215530106 020675 5ustar00sristaff000000 000000 Mojolicious-7.59/lib/Mojolicious/Command.pm000644 000765 000024 00000013214 13214542563 020676 0ustar00sristaff000000 000000 package Mojolicious::Command; use Mojo::Base -base; use Carp 'croak'; use Mojo::File 'path'; use Mojo::Loader 'data_section'; use Mojo::Server; use Mojo::Template; has app => sub { Mojo::Server->new->build_app('Mojo::HelloWorld') }; has description => 'No description'; has 'quiet'; has usage => "Usage: APPLICATION\n"; sub chmod_file { my ($self, $path, $mod) = @_; chmod $mod, $path or croak qq{Can't chmod file "$path": $!}; return $self->_loud(" [chmod] $path " . sprintf('%lo', $mod)); } sub chmod_rel_file { $_[0]->chmod_file($_[0]->rel_file($_[1]), $_[2]) } sub create_dir { my ($self, $path) = @_; return $self->_loud(" [exist] $path") if -d $path; path($path)->make_path; return $self->_loud(" [mkdir] $path"); } sub create_rel_dir { $_[0]->create_dir($_[0]->rel_file($_[1])) } sub extract_usage { Mojo::Util::extract_usage((caller)[1]) } sub help { print shift->usage } sub rel_file { path->child(split('/', pop)) } sub render_data { my ($self, $name) = (shift, shift); Mojo::Template->new->name("template $name from DATA section") ->render(data_section(ref $self, $name), @_); } sub render_to_file { my ($self, $data, $path) = (shift, shift, shift); return $self->write_file($path, $self->render_data($data, @_)); } sub render_to_rel_file { my $self = shift; $self->render_to_file(shift, $self->rel_file(shift), @_); } sub run { croak 'Method "run" not implemented by subclass' } sub write_file { my ($self, $path, $data) = @_; return $self->_loud(" [exist] $path") if -f $path; $self->create_dir(path($path)->dirname); path($path)->spurt($data); return $self->_loud(" [write] $path"); } sub write_rel_file { $_[0]->write_file($_[0]->rel_file($_[1]), $_[2]) } sub _loud { my ($self, $msg) = @_; say $msg unless $self->quiet; return $self; } 1; =encoding utf8 =head1 NAME Mojolicious::Command - Command base class =head1 SYNOPSIS # Lowercase command name package Mojolicious::Command::mycommand; use Mojo::Base 'Mojolicious::Command'; # Short description has description => 'My first Mojo command'; # Usage message from SYNOPSIS has usage => sub { shift->extract_usage }; sub run { my ($self, @args) = @_; # Magic here! :) } 1; =head1 SYNOPSIS Usage: APPLICATION mycommand [OPTIONS] Options: -s, --something Does something =cut =head1 DESCRIPTION L is an abstract base class for L commands. See L for a list of commands that are available by default. =head1 ATTRIBUTES L implements the following attributes. =head2 app my $app = $command->app; $command = $command->app(Mojolicious->new); Application for command, defaults to a L object. # Introspect say "Template path: $_" for @{$command->app->renderer->paths}; =head2 description my $description = $command->description; $command = $command->description('Foo'); Short description of command, used for the command list. =head2 quiet my $bool = $command->quiet; $command = $command->quiet($bool); Limited command output. =head2 usage my $usage = $command->usage; $command = $command->usage('Foo'); Usage information for command, used for the help screen. =head1 METHODS L inherits all methods from L and implements the following new ones. =head2 chmod_file $command = $command->chmod_file('/home/sri/foo.txt', 0644); Change mode of a file. =head2 chmod_rel_file $command = $command->chmod_rel_file('foo/foo.txt', 0644); Portably change mode of a file relative to the current working directory. =head2 create_dir $command = $command->create_dir('/home/sri/foo/bar'); Create a directory. =head2 create_rel_dir $command = $command->create_rel_dir('foo/bar/baz'); Portably create a directory relative to the current working directory. =head2 extract_usage my $usage = $command->extract_usage; Extract usage message from the SYNOPSIS section of the file this method was called from with L. =head2 help $command->help; Print usage information for command. =head2 rel_file my $path = $command->rel_file('foo/bar.txt'); Return a L object relative to the current working directory. =head2 render_data my $data = $command->render_data('foo_bar'); my $data = $command->render_data('foo_bar', @args); Render a template from the C section of the command class with L and L. =head2 render_to_file $command = $command->render_to_file('foo_bar', '/home/sri/foo.txt'); $command = $command->render_to_file('foo_bar', '/home/sri/foo.txt', @args); Render a template from the C section of the command class with L to a file and create directory if necessary. =head2 render_to_rel_file $command = $command->render_to_rel_file('foo_bar', 'foo/bar.txt'); $command = $command->render_to_rel_file('foo_bar', 'foo/bar.txt', @args); Portably render a template from the C section of the command class with L to a file relative to the current working directory and create directory if necessary. =head2 run $command->run; $command->run(@ARGV); Run command. Meant to be overloaded in a subclass. =head2 write_file $command = $command->write_file('/home/sri/foo.txt', 'Hello World!'); Write text to a file and create directory if necessary. =head2 write_rel_file $command = $command->write_rel_file('foo/bar.txt', 'Hello World!'); Portably write text to a file relative to the current working directory and create directory if necessary. =head1 SEE ALSO L, L, L. =cut Mojolicious-7.59/lib/Mojolicious/Controller.pm000644 000765 000024 00000075564 13214542564 021464 0ustar00sristaff000000 000000 package Mojolicious::Controller; use Mojo::Base -base; # No imports, for security reasons! use Carp (); use Mojo::ByteStream; use Mojo::URL; use Mojo::Util; use Mojolicious::Routes::Match; use Scalar::Util (); use Time::HiRes (); has [qw(app tx)]; has match => sub { Mojolicious::Routes::Match->new(root => shift->app->routes) }; # Reserved stash values my %RESERVED = map { $_ => 1 } ( qw(action app cb controller data extends format handler inline json layout), qw(namespace path status template text variant) ); sub AUTOLOAD { my $self = shift; my ($package, $method) = our $AUTOLOAD =~ /^(.+)::(.+)$/; Carp::croak "Undefined subroutine &${package}::$method called" unless Scalar::Util::blessed $self && $self->isa(__PACKAGE__); # Call helper with current controller Carp::croak qq{Can't locate object method "$method" via package "$package"} unless my $helper = $self->app->renderer->get_helper($method); return $self->$helper(@_); } sub continue { $_[0]->app->routes->continue($_[0]) } sub cookie { my ($self, $name) = (shift, shift); # Response cookie if (@_) { # Cookie too big my $cookie = {name => $name, value => shift, %{shift || {}}}; $self->app->log->error(qq{Cookie "$name" is bigger than 4096 bytes}) if length $cookie->{value} > 4096; $self->res->cookies($cookie); return $self; } # Request cookies return undef unless my $cookie = $self->req->cookie($name); return $cookie->value; } sub every_cookie { [map { $_->value } @{shift->req->every_cookie(shift)}]; } sub every_param { my ($self, $name) = @_; # Captured unreserved values my $captures = $self->stash->{'mojo.captures'} ||= {}; if (!$RESERVED{$name} && exists $captures->{$name}) { my $value = $captures->{$name}; return ref $value eq 'ARRAY' ? $value : [$value]; } # Uploads or param values my $req = $self->req; my $uploads = $req->every_upload($name); return @$uploads ? $uploads : $req->every_param($name); } sub every_signed_cookie { my ($self, $name) = @_; my $secrets = $self->app->secrets; my @results; for my $value (@{$self->every_cookie($name)}) { # Check signature with rotating secrets if ($value =~ s/--([^\-]+)$//) { my $signature = $1; my $valid; for my $secret (@$secrets) { my $check = Mojo::Util::hmac_sha1_sum($value, $secret); ++$valid and last if Mojo::Util::secure_compare($signature, $check); } if ($valid) { push @results, $value } else { $self->app->log->debug(qq{Cookie "$name" has a bad signature}) } } else { $self->app->log->debug(qq{Cookie "$name" is not signed}) } } return \@results; } sub finish { my $self = shift; # WebSocket my $tx = $self->tx || Carp::croak 'Connection already closed'; $tx->finish(@_) and return $tx->established ? $self : $self->rendered(101) if $tx->is_websocket; # Chunked stream return @_ ? $self->write_chunk(@_)->write_chunk('') : $self->write_chunk('') if $tx->res->content->is_chunked; # Normal stream return @_ ? $self->write(@_)->write('') : $self->write(''); } sub flash { my $self = shift; # Check old flash my $session = $self->session; return $session->{flash} ? $session->{flash}{$_[0]} : undef if @_ == 1 && !ref $_[0]; # Initialize new flash and merge values my $values = ref $_[0] ? $_[0] : {@_}; @{$session->{new_flash} ||= {}}{keys %$values} = values %$values; return $self; } sub helpers { $_[0]->app->renderer->get_helper('')->($_[0]) } sub on { my ($self, $name, $cb) = @_; my $tx = $self->tx || Carp::croak 'Connection already closed'; $self->rendered(101) if $tx->is_websocket && !$tx->established; return $tx->on($name => sub { shift; $self->$cb(@_) }); } sub param { my ($self, $name) = (shift, shift); return $self->every_param($name)->[-1] unless @_; $self->stash->{'mojo.captures'}{$name} = @_ > 1 ? [@_] : $_[0]; return $self; } sub redirect_to { my $self = shift; # Don't override 3xx status my $res = $self->res; $res->headers->location($self->url_for(@_)); return $self->rendered($res->is_redirect ? () : 302); } sub render { my $self = shift; # Template may be first argument my ($template, $args) = (@_ % 2 ? shift : undef, {@_}); $args->{template} = $template if $template; my $app = $self->app; my $plugins = $app->plugins->emit_hook(before_render => $self, $args); my $maybe = delete $args->{'mojo.maybe'}; my $ts = $args->{'mojo.string'}; my ($output, $format) = $app->renderer->render($self, $args); # Maybe no 404 return defined $output ? Mojo::ByteStream->new($output) : undef if $ts; return $maybe ? undef : !$self->helpers->reply->not_found unless defined $output; $plugins->emit_hook(after_render => $self, \$output, $format); my $headers = $self->res->body($output)->headers; $headers->content_type($app->types->type($format) || 'text/plain') unless $headers->content_type; return !!$self->rendered($self->stash->{status}); } sub render_later { shift->stash('mojo.rendered' => 1) } sub render_maybe { shift->render(@_, 'mojo.maybe' => 1) } sub render_to_string { shift->render(@_, 'mojo.string' => 1) } sub rendered { my ($self, $status) = @_; # Make sure we have a status my $res = $self->res; $res->code($status || 200) if $status || !$res->code; # Finish transaction my $stash = $self->stash; if (!$stash->{'mojo.finished'} && ++$stash->{'mojo.finished'}) { # Disable auto rendering and stop timer my $app = $self->render_later->app; if (my $started = delete $stash->{'mojo.started'}) { my $elapsed = Time::HiRes::tv_interval($started, [Time::HiRes::gettimeofday()]); my $rps = $elapsed == 0 ? '??' : sprintf '%.3f', 1 / $elapsed; my $code = $res->code; my $msg = $res->message || $res->default_message($code); $app->log->debug("$code $msg (${elapsed}s, $rps/s)"); } $app->plugins->emit_hook_reverse(after_dispatch => $self); $app->sessions->store($self); } $self->tx->resume; return $self; } sub req { (shift->tx || Carp::croak 'Connection already closed')->req } sub res { (shift->tx || Carp::croak 'Connection already closed')->res } sub respond_to { my ($self, $args) = (shift, ref $_[0] ? $_[0] : {@_}); # Find target my $target; my $renderer = $self->app->renderer; my @formats = @{$renderer->accepts($self)}; for my $format (@formats ? @formats : ($renderer->default_format)) { next unless $target = $args->{$format}; $self->stash->{format} = $format; last; } # Fallback unless ($target) { return $self->rendered(204) unless $target = $args->{any}; delete $self->stash->{format}; } # Dispatch ref $target eq 'CODE' ? $target->($self) : $self->render(%$target); return $self; } sub send { my ($self, $msg, $cb) = @_; my $tx = $self->tx || Carp::croak 'Connection already closed'; Carp::croak 'No WebSocket connection to send message to' unless $tx->is_websocket; $tx->send($msg, $cb ? sub { shift; $self->$cb(@_) } : ()); return $tx->established ? $self : $self->rendered(101); } sub session { my $self = shift; my $stash = $self->stash; $self->app->sessions->load($self) unless exists $stash->{'mojo.active_session'}; # Hash my $session = $stash->{'mojo.session'} ||= {}; return $session unless @_; # Get return $session->{$_[0]} unless @_ > 1 || ref $_[0]; # Set my $values = ref $_[0] ? $_[0] : {@_}; @$session{keys %$values} = values %$values; return $self; } sub signed_cookie { my ($self, $name, $value, $options) = @_; # Request cookie return $self->every_signed_cookie($name)->[-1] unless defined $value; # Response cookie my $checksum = Mojo::Util::hmac_sha1_sum($value, $self->app->secrets->[0]); return $self->cookie($name, "$value--$checksum", $options); } sub stash { Mojo::Util::_stash(stash => @_) } sub url_for { my ($self, $target) = (shift, shift // ''); # Absolute URL return $target if Scalar::Util::blessed $target && $target->isa('Mojo::URL'); return Mojo::URL->new($target) if $target =~ m!^(?:[^:/?#]+:|//|#)!; # Base my $url = Mojo::URL->new; my $req = $self->req; my $base = $url->base($req->url->base->clone)->base->userinfo(undef); # Relative URL my $path = $url->path; if ($target =~ m!^/!) { if (defined(my $prefix = $self->stash->{path})) { my $real = $req->url->path->to_route; $real =~ s!/?\Q$prefix\E$!$target!; $target = $real; } $url->parse($target); } # Route else { my $generated = $self->match->path_for($target, @_); $path->parse($generated->{path}) if $generated->{path}; $base->scheme($base->protocol eq 'https' ? 'wss' : 'ws') if $generated->{websocket}; } # Make path absolute my $base_path = $base->path; unshift @{$path->parts}, @{$base_path->parts}; $base_path->parts([])->trailing_slash(0); return $url; } sub validation { my $self = shift; my $stash = $self->stash; return $stash->{'mojo.validation'} if $stash->{'mojo.validation'}; my $req = $self->req; my $token = $self->session->{csrf_token}; my $header = $req->headers->header('X-CSRF-Token'); my $hash = $req->params->to_hash; $hash->{csrf_token} //= $header if $token && $header; $hash->{$_} = $req->every_upload($_) for map { $_->name } @{$req->uploads}; my $validation = $self->app->validator->validation->input($hash); return $stash->{'mojo.validation'} = $validation->csrf_token($token); } sub write { my ($self, $chunk, $cb) = @_; $self->res->content->write($chunk, $cb ? sub { shift; $self->$cb(@_) } : ()); return $self->rendered; } sub write_chunk { my ($self, $chunk, $cb) = @_; my $content = $self->res->content; $content->write_chunk($chunk, $cb ? sub { shift; $self->$cb(@_) } : ()); return $self->rendered; } 1; =encoding utf8 =head1 NAME Mojolicious::Controller - Controller base class =head1 SYNOPSIS # Controller package MyApp::Controller::Foo; use Mojo::Base 'Mojolicious::Controller'; # Action sub bar { my $self = shift; my $name = $self->param('name'); $self->res->headers->cache_control('max-age=1, no-cache'); $self->render(json => {hello => $name}); } =head1 DESCRIPTION L is the base class for your L controllers. It is also the default controller class unless you set L. =head1 ATTRIBUTES L inherits all attributes from L and implements the following new ones. =head2 app my $app = $c->app; $c = $c->app(Mojolicious->new); A reference back to the application that dispatched to this controller, usually a L object. # Use application logger $c->app->log->debug('Hello Mojo'); # Generate path my $path = $c->app->home->child('templates', 'foo', 'bar.html.ep'); =head2 match my $m = $c->match; $c = $c->match(Mojolicious::Routes::Match->new); Router results for the current request, defaults to a L object. # Introspect my $name = $c->match->endpoint->name; my $foo = $c->match->endpoint->pattern->defaults->{foo}; my $action = $c->match->stack->[-1]{action}; =head2 tx my $tx = $c->tx; $c = $c->tx(Mojo::Transaction::HTTP->new); The transaction that is currently being processed, usually a L or L object. Note that this reference is usually weakened, so the object needs to be referenced elsewhere as well when you're performing non-blocking operations and the underlying connection might get closed early. # Check peer information my $address = $c->tx->remote_address; my $port = $c->tx->remote_port; # Increase size limit for WebSocket messages to 16MiB $c->tx->max_websocket_size(16777216) if $c->tx->is_websocket; # Perform non-blocking operation without knowing the connection status my $tx = $c->tx; Mojo::IOLoop->timer(2 => sub { $c->app->log->debug($tx->is_finished ? 'Finished' : 'In progress'); }); =head1 METHODS L inherits all methods from L and implements the following new ones. =head2 continue $c->continue; Continue dispatch chain from an intermediate destination with L. =head2 cookie my $value = $c->cookie('foo'); $c = $c->cookie(foo => 'bar'); $c = $c->cookie(foo => 'bar', {path => '/'}); Access request cookie values and create new response cookies. If there are multiple values sharing the same name, and you want to access more than just the last one, you can use L. # Create response cookie with domain and expiration date $c->cookie(user => 'sri', {domain => 'example.com', expires => time + 60}); # Create secure response cookie $c->cookie(secret => 'I <3 Mojolicious', {secure => 1, httponly => 1}); =head2 every_cookie my $values = $c->every_cookie('foo'); Similar to L, but returns all request cookie values sharing the same name as an array reference. $ Get first cookie value my $first = $c->every_cookie('foo')->[0]; =head2 every_param my $values = $c->every_param('foo'); Similar to L, but returns all values sharing the same name as an array reference. # Get first value my $first = $c->every_param('foo')->[0]; =head2 every_signed_cookie my $values = $c->every_signed_cookie('foo'); Similar to L, but returns all signed request cookie values sharing the same name as an array reference. # Get first signed cookie value my $first = $c->every_signed_cookie('foo')->[0]; =head2 finish $c = $c->finish; $c = $c->finish(1000); $c = $c->finish(1003 => 'Cannot accept data!'); $c = $c->finish('Bye!'); Close WebSocket connection or long poll stream gracefully. This method will automatically respond to WebSocket handshake requests with a C<101> response status, to establish the WebSocket connection. =head2 flash my $foo = $c->flash('foo'); $c = $c->flash({foo => 'bar'}); $c = $c->flash(foo => 'bar'); Data storage persistent only for the next request, stored in the L. # Show message after redirect $c->flash(message => 'User created successfully!'); $c->redirect_to('show_user', id => 23); =head2 helpers my $helpers = $c->helpers; Return a proxy object containing the current controller object and on which helpers provided by L can be called. This includes all helpers from L and L. # Make sure to use the "title" helper and not the controller method $c->helpers->title('Welcome!'); # Use a nested helper instead of the "reply" controller method $c->helpers->reply->not_found; =head2 on my $cb = $c->on(finish => sub {...}); Subscribe to events of L, which is usually a L or L object. This method will automatically respond to WebSocket handshake requests with a C<101> response status, to establish the WebSocket connection. # Do something after the transaction has been finished $c->on(finish => sub { my $c = shift; $c->app->log->debug('All data has been sent'); }); # Receive WebSocket message $c->on(message => sub { my ($c, $msg) = @_; $c->app->log->debug("Message: $msg"); }); # Receive JSON object via WebSocket message $c->on(json => sub { my ($c, $hash) = @_; $c->app->log->debug("Test: $hash->{test}"); }); # Receive WebSocket "Binary" message $c->on(binary => sub { my ($c, $bytes) = @_; my $len = length $bytes; $c->app->log->debug("Received $len bytes"); }); =head2 param my $value = $c->param('foo'); $c = $c->param(foo => 'ba;r'); $c = $c->param(foo => 'ba;r', 'baz'); $c = $c->param(foo => ['ba;r', 'baz']); Access route placeholder values that are not reserved stash values, file uploads as well as C and C parameters extracted from the query string and C or C message body, in that order. If there are multiple values sharing the same name, and you want to access more than just the last one, you can use L. Parts of the request body need to be loaded into memory to parse C parameters, so you have to make sure it is not excessively large. There's a 16MiB limit for requests by default. # Get first value my $first = $c->every_param('foo')->[0]; For more control you can also access request information directly. # Only GET parameters my $foo = $c->req->query_params->param('foo'); # Only POST parameters my $foo = $c->req->body_params->param('foo'); # Only GET and POST parameters my $foo = $c->req->param('foo'); # Only file uploads my $foo = $c->req->upload('foo'); =head2 redirect_to $c = $c->redirect_to('named', foo => 'bar'); $c = $c->redirect_to('named', {foo => 'bar'}); $c = $c->redirect_to('/index.html'); $c = $c->redirect_to('http://example.com/index.html'); Prepare a C<302> (if the status code is not already C<3xx>) redirect response with C header, takes the same arguments as L. # Moved Permanently $c->res->code(301); $c->redirect_to('some_route'); # Temporary Redirect $c->res->code(307); $c->redirect_to('some_route'); =head2 render my $bool = $c->render; my $bool = $c->render(foo => 'bar', baz => 23); my $bool = $c->render(template => 'foo/index'); my $bool = $c->render(template => 'index', format => 'html'); my $bool = $c->render(data => $bytes); my $bool = $c->render(text => 'Hello!'); my $bool = $c->render(json => {foo => 'bar'}); my $bool = $c->render(handler => 'something'); my $bool = $c->render('foo/index'); Render content with L and emit hooks L as well as L, or call Lnot_found"> if no response could be generated, all additional key/value pairs get merged into the L. # Render characters $c->render(text => 'I ♥ Mojolicious!'); # Render characters (alternative) $c->stash(text => 'I ♥ Mojolicious!')->render; # Render binary data use Mojo::JSON 'encode_json'; $c->render(data => encode_json({test => 'I ♥ Mojolicious!'})); # Render JSON $c->render(json => {test => 'I ♥ Mojolicious!'}); # Render inline template $c->render(inline => '<%= 1 + 1 %>'); # Render template "foo/bar.html.ep" $c->render(template => 'foo/bar', format => 'html', handler => 'ep'); # Render template "test.*.*" with arbitrary values "foo" and "bar" $c->render(template => 'test', foo => 'test', bar => 23); # Render template "test.xml.*" $c->render(template => 'test', format => 'xml'); # Render template "test.xml.*" (alternative) $c->render('test', format => 'xml'); =head2 render_later $c = $c->render_later; Disable automatic rendering to delay response generation, only necessary if automatic rendering would result in a response. # Delayed rendering $c->render_later; Mojo::IOLoop->timer(2 => sub { $c->render(text => 'Delayed by 2 seconds!'); }); =head2 render_maybe my $bool = $c->render_maybe; my $bool = $c->render_maybe(foo => 'bar', baz => 23); my $bool = $c->render_maybe('foo/index', format => 'html'); Try to render content, but do not call Lnot_found"> if no response could be generated, takes the same arguments as L. # Render template "index_local" only if it exists $c->render_maybe('index_local') or $c->render('index'); =head2 render_to_string my $output = $c->render_to_string('foo/index', format => 'pdf'); Try to render content and return it wrapped in a L object or return C, all arguments get localized automatically and are only available during this render operation, takes the same arguments as L. # Render inline template my $two = $c->render_to_string(inline => '<%= 1 + 1 %>'); =head2 rendered $c = $c->rendered; $c = $c->rendered(302); Finalize response and emit hook L, defaults to using a C<200> response code. # Custom response $c->res->headers->content_type('text/plain'); $c->res->body('Hello World!'); $c->rendered(200); =head2 req my $req = $c->req; Get L object from L. # Longer version my $req = $c->tx->req; # Extract request information my $method = $c->req->method; my $url = $c->req->url->to_abs; my $info = $c->req->url->to_abs->userinfo; my $host = $c->req->url->to_abs->host; my $agent = $c->req->headers->user_agent; my $custom = $c->req->headers->header('Custom-Header'); my $bytes = $c->req->body; my $str = $c->req->text; my $hash = $c->req->params->to_hash; my $all = $c->req->uploads; my $value = $c->req->json; my $foo = $c->req->json('/23/foo'); my $dom = $c->req->dom; my $bar = $c->req->dom('div.bar')->first->text; =head2 res my $res = $c->res; Get L object from L. # Longer version my $res = $c->tx->res; # Force file download by setting a response header $c->res->headers->content_disposition('attachment; filename=foo.png;'); # Use a custom response header $c->res->headers->header('Custom-Header' => 'whatever'); # Make sure response is cached correctly $c->res->headers->cache_control('public, max-age=300'); $c->res->headers->append(Vary => 'Accept-Encoding'); =head2 respond_to $c = $c->respond_to( json => {json => {message => 'Welcome!'}}, html => {template => 'welcome'}, any => sub {...} ); Automatically select best possible representation for resource from C request header, C stash value or C C/C parameter, defaults to L or rendering an empty C<204> response. Each representation can be handled with a callback or a hash reference containing arguments to be passed to L. Since browsers often don't really know what they actually want, unspecific C request headers with more than one MIME type will be ignored, unless the C header is set to the value C. # Everything else than "json" and "xml" gets a 204 response $c->respond_to( json => sub { $c->render(json => {just => 'works'}) }, xml => {text => 'works'}, any => {data => '', status => 204} ); For more advanced negotiation logic you can also use the helper L. =head2 send $c = $c->send({binary => $bytes}); $c = $c->send({text => $bytes}); $c = $c->send({json => {test => [1, 2, 3]}}); $c = $c->send([$fin, $rsv1, $rsv2, $rsv3, $op, $payload]); $c = $c->send($chars); $c = $c->send($chars => sub {...}); Send message or frame non-blocking via WebSocket, the optional drain callback will be executed once all data has been written. This method will automatically respond to WebSocket handshake requests with a C<101> response status, to establish the WebSocket connection. # Send "Text" message $c->send('I ♥ Mojolicious!'); # Send JSON object as "Text" message $c->send({json => {test => 'I ♥ Mojolicious!'}}); # Send JSON object as "Binary" message use Mojo::JSON 'encode_json'; $c->send({binary => encode_json({test => 'I ♥ Mojolicious!'})}); # Send "Ping" frame use Mojo::WebSocket 'WS_PING'; $c->send([1, 0, 0, 0, WS_PING, 'Hello World!']); # Make sure the first message has been written before continuing $c->send('First message!' => sub { my $c = shift; $c->send('Second message!'); }); For mostly idle WebSockets you might also want to increase the inactivity timeout with L, which usually defaults to C<15> seconds. # Increase inactivity timeout for connection to 300 seconds $c->inactivity_timeout(300); =head2 session my $session = $c->session; my $foo = $c->session('foo'); $c = $c->session({foo => 'bar'}); $c = $c->session(foo => 'bar'); Persistent data storage for the next few requests, all session data gets serialized with L and stored Base64 encoded in HMAC-SHA1 signed cookies, to prevent tampering. Note that cookies usually have a C<4096> byte (4KiB) limit, depending on browser. # Manipulate session $c->session->{foo} = 'bar'; my $foo = $c->session->{foo}; delete $c->session->{foo}; # Expiration date in seconds from now (persists between requests) $c->session(expiration => 604800); # Expiration date as absolute epoch time (only valid for one request) $c->session(expires => time + 604800); # Delete whole session by setting an expiration date in the past $c->session(expires => 1); =head2 signed_cookie my $value = $c->signed_cookie('foo'); $c = $c->signed_cookie(foo => 'bar'); $c = $c->signed_cookie(foo => 'bar', {path => '/'}); Access signed request cookie values and create new signed response cookies. If there are multiple values sharing the same name, and you want to access more than just the last one, you can use L. Cookies are cryptographically signed with HMAC-SHA1, to prevent tampering, and the ones failing signature verification will be automatically discarded. =head2 stash my $hash = $c->stash; my $foo = $c->stash('foo'); $c = $c->stash({foo => 'bar', baz => 23}); $c = $c->stash(foo => 'bar', baz => 23); Non-persistent data storage and exchange for the current request, application wide default values can be set with L. Some stash values have a special meaning and are reserved, the full list is currently C, C, C, C, C, C, C, C, C, C, C, C, C, C, C