.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Catalyst::Delta 3pm" .TH Catalyst::Delta 3pm "2014-09-18" "perl v5.20.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Catalyst::Delta \- Overview of changes between versions of Catalyst .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is an overview of the user-visible changes to Catalyst between major Catalyst releases. .SS "\s-1VERSION 5.90060+\s0" .IX Subsection "VERSION 5.90060+" \fICatalyst::Log object autoflush on by default\fR .IX Subsection "Catalyst::Log object autoflush on by default" .PP Starting in 5.90065, the Catalyst::Log object has 'autoflush' which is on by default. This causes all messages to be written to the log immediately instead of at the end of startup and then at the end of each request. In order to access the old behavior, you must now call: .PP .Vb 1 \& $c\->log\->autoflush(0); .Ve .PP \fIDeprecate Catalyst::Utils::ensure_class_loaded\fR .IX Subsection "Deprecate Catalyst::Utils::ensure_class_loaded" .PP Going forward we recommend you use Module::Runtime. In fact we will be converting all uses of Class::Load to Module::Runtime. We will also convert Catalyst::Utils\eensure_class_loaded to be based on Module::Runtime to allow some time for you to update code, however at some future point this method will be removed so you should stop using it now. .PP \fISupport passing Body filehandles directly to your Plack server.\fR .IX Subsection "Support passing Body filehandles directly to your Plack server." .PP We changed the way we return body content (from response) to whatever Plack handler you are using (Starman, FastCGI, etc.) We no longer always use the streaming interface for the cases when the body is a simple scalar, object or filehandle like. In those cases we now just pass the simple response on to the plack handler. This might lead to some minor differences in how streaming is handled. For example, you might notice that streaming starts properly supporting chunked encoding when on a server that supports that, or that previously missing headers (possible content-length) might appear suddenly correct. Also, if you are using middleware like Plack::Middleware::XSendfile and are using a filehandle that sets a readable path, your server might now correctly handle the file (rather than as before where Catalyst would stream it very likely very slowly). .PP In other words, some things might be meaninglessly different and some things that were broken codewise but worked because of Catalyst being incorrect might suddenly be really broken. The behavior is now more correct in that Catalyst plays better with features that Plack offers but if you are making heavy use of the streaming interface there could be some differences so you should test carefully (this is probably not the vast majority of people). In particular if you are developing using one server but deploying using a different one, differences in what those server do with streaming should be noted. .PP Please see note below about changes to filehandle support and existing Plack middleware to aid in backwards compatibility. .PP \fIDistinguish between body null versus undef.\fR .IX Subsection "Distinguish between body null versus undef." .PP We also now more carefully distingush the different between a body set to '' and a body that is undef. This might lead to situations where again you'll get a content-length were you didn't get one before or where a supporting server will start chunking output. If this is an issue you can apply the middleware Plack::Middleware::BufferedStreaming or report specific problems to the dev team. .PP \fIMore Catalyst Middleware\fR .IX Subsection "More Catalyst Middleware" .PP We have started migrating code in Catalyst to equivilent Plack Middleware when such exists and is correct to do so. For example we now use Plack::Middleware::ContentLength to determine content length of a response when none is provided. This replaces similar code inlined with Catalyst The main advantages to doing this is 1) more similar Catalyst core that is focused on the Catalyst special sauce, 2) Middleware is more broadly shared so we benefit from better collaboration with developers outside Catalyst, 3) In the future you'll be able to change or trim the middleware stack to get additional performance when you don't need all the checks and constraints. .PP \fIDeprecate Filehandle like objects that do read but not getline\fR .IX Subsection "Deprecate Filehandle like objects that do read but not getline" .PP We also deprecated setting the response body to an object that does 'read' but not 'getline'. If you are using a custom IO-Handle like object for response you should verify that 'getline' is supported in your interface. Unless we here this case is a major issue for people, we will be removing support in a near future release of Catalyst. When the code encounters this it will issue a warning. You also may run into this issue with MogileFS::Client which does read but not getline. For now we will just warn when encountering such an object and fallback to the previous behavior (where Catalyst::Engine itself unrolls the filehandle and performs blocking streams). However this backwards compatibility will be removed in an upcoming release so you should either rewrite your custom filehandle objects to support getline or start using the middleware that adapts read for getline Plack::Middleware::AdaptFilehandleRead. .PP \fIResponse\->headers become read-only after finalizing\fR .IX Subsection "Response->headers become read-only after finalizing" .PP Once the response headers are finalized, trying to change them is not allowed (in the past you could change them and this would lead to unexpected results). .PP \fIOfficially deprecate Catalyst::Engine::PSGI\fR .IX Subsection "Officially deprecate Catalyst::Engine::PSGI" .PP Catalyst::Engine::PSGI is also officially no longer supported. We will no long run test cases against this and can remove backwards compatibility code for it as deemed necessary for the evolution of the platform. You should simply discontinue use of this engine, as Catalyst has been \s-1PSGI\s0 at the core for several years. .PP \fIOfficially deprecate finding the \s-1PSGI\s0 \f(CI$env\fI anyplace other than Request\fR .IX Subsection "Officially deprecate finding the PSGI $env anyplace other than Request" .PP A few early releases of Cataplack had the \s-1PSGI\s0 \f(CW$env\fR in Catalyst::Engine. Code has been maintained here for backwards compatibility reasons. This is no longer supported and will be removed in upcoming release, so you should update your code and / or upgrade to a newer version of Catalyst .PP \fIDeprecate setting Response\->body after using write/write_fh\fR .IX Subsection "Deprecate setting Response->body after using write/write_fh" .PP Setting \f(CW$c\fR\->res\->body to a filehandle after using \f(CW$c\fR\->res\->write or \&\f(CW$c\fR\->res\->write_fh is no longer considered allowed, since we can't send the filehandle to the underlying Plack handler. For now we will continue to support setting body to a simple value since this is possible, but at some future release a choice to use streaming indicates that you will do so for the rest of the request. .SS "\s-1VERSION 5.90053\s0" .IX Subsection "VERSION 5.90053" We are now clarifying the behavior of log, plugins and configuration during the setup phase. Since Plugins might require a log during setup, setup_log must run \s-1BEFORE\s0 setup_plugins. This has the unfortunate side effect that anyone using the popular ConfigLoader plugin will not be able to supply configuration to custom logs since the configuration is not yet finalized when setup_log is run (when using ConfigLoader, which is a plugin and is not loaded until later.) .PP As a workaround, you can supply custom log configuration directly into the configuration: .PP .Vb 2 \& package MyApp; \& use Catalyst; \& \& _\|_PACKAGE_\|_\->config( \& my_custom_log_info => { %custom_args }, \& ); \& \& _\|_PACKAGE_\|_\->setup; .Ve .PP If you wish to configure the custom logger differently based on \s-1ENV,\s0 you can try: .PP .Vb 1 \& package MyApp; \& \& use Catalyst; \& use Catalyst::Utils; \& \& _\|_PACKAGE_\|_\->config( \& Catalyst::Utils::merge_hashes( \& +{ my_custom_log_info => { %base_custom_args } }, \& +{ do _\|_PACKAGE_\|_\->path_to( $ENV{WHICH_CONF}."_conf.pl") }, \& ), \& ); \& \& _\|_PACKAGE_\|_\->setup; .Ve .PP Or create a standalone Configuration class that does the right thing. .PP Basically if you want to configure a logger via Catalyst global configuration you can't use ConfigLoader because it will always be loaded too late to be of any use. Patches and workaround options welcomed! .SS "\s-1VERSION 5.9XXXX \s0'cataplack'" .IX Subsection "VERSION 5.9XXXX 'cataplack'" The Catalyst::Engine sub-classes have all been removed and deprecated, to be replaced with Plack handlers. .PP Plack is an implementation of the \s-1PSGI\s0 specification, which is a standard interface between web servers and application frameworks. .PP This should be no different for developers, and you should not have to migrate your applications unless you are using a custom engine already. .PP This change benefits Catalyst significantly by reducing the amount of code inside the framework, and means that the framework gets upstream bug fixes in Plack, and automatically gains support for any web server which a \s-1PSGI\s0 compliant handler is written for. .PP It also allows you more flexibility with your application, and allows the use of cross web framework 'middleware'. .PP Developers are recommended to read Catalyst::Upgrading for notes about upgrading, especially if you are using an unusual deployment method. .PP Documentation for how to take advantage of \s-1PSGI\s0 can be found in Catalyst::PSGI, and information about deploying your application has been moved to Catalyst::Manual::Deployment. .PP \fIUpdated modules:\fR .IX Subsection "Updated modules:" .PP A number of modules have been updated to pass their tests or not produce deprecation warnings with the latest version of Catalyst. It is recommended that you upgrade any of these that you are using after installing this version of Catalyst. .PP These extensions are: .IP "Catalyst::Engine::HTTP::Prefork" 4 .IX Item "Catalyst::Engine::HTTP::Prefork" This is now deprecated, see Catalyst::Upgrading. .IP "Test::WWW::Mechanize::Catalyst" 4 .IX Item "Test::WWW::Mechanize::Catalyst" Has been updated to not produce deprecation warnings, upgrade recommended. .IP "Catalyst::ActionRole::ACL" 4 .IX Item "Catalyst::ActionRole::ACL" Has been updated to fix failing tests (although older versions still function perfectly with this version of Catalyst). .IP "Catalyst::Plugin::Session::Store::DBIC" 4 .IX Item "Catalyst::Plugin::Session::Store::DBIC" Has been updated to fix failing tests (although older versions still function perfectly with this version of Catalyst). .IP "Catalyst::Plugin::Authentication" 4 .IX Item "Catalyst::Plugin::Authentication" Has been updated to fix failing tests (although older versions still function perfectly with this version of Catalyst). .SH "PREVIOUS VERSIONS" .IX Header "PREVIOUS VERSIONS" .SS "\s-1VERSION 5.8XXXX \s0'catamoose'" .IX Subsection "VERSION 5.8XXXX 'catamoose'" \fIDeprecations\fR .IX Subsection "Deprecations" .PP Please see Catalyst::Upgrading for a full description of how changes in the framework may affect your application. .PP Below is a brief list of features which have been deprecated in this release: .IP "::[\s-1MVC\s0]:: style naming scheme has been deprecated and will warn" 4 .IX Item "::[MVC]:: style naming scheme has been deprecated and will warn" .PD 0 .IP "\s-1NEXT\s0 is deprecated for all applications and components, use MRO::Compat" 4 .IX Item "NEXT is deprecated for all applications and components, use MRO::Compat" .IP "Dispatcher methods which are an implementation detail made private, public versions now warn." 4 .IX Item "Dispatcher methods which are an implementation detail made private, public versions now warn." .IP "MyApp\->plugin method is deprecated, use Catalyst::Model::Adaptor instead." 4 .IX Item "MyApp->plugin method is deprecated, use Catalyst::Model::Adaptor instead." .IP "_\|_PACKAGE_\|_\->\fImk_accessors()\fR is supported for backwards compatibility only, use Moose attributes instead in new code." 4 .IX Item "__PACKAGE__->mk_accessors() is supported for backwards compatibility only, use Moose attributes instead in new code." .IP "Use of Catalyst::Base now warns" 4 .IX Item "Use of Catalyst::Base now warns" .PD .PP \fINew features\fR .IX Subsection "New features" .PP \fIDispatcher\fR .IX Subsection "Dispatcher" .IP "Fix forwarding to Catalyst::Action objects." 4 .IX Item "Fix forwarding to Catalyst::Action objects." .PD 0 .IP "Add the dispatch_type method" 4 .IX Item "Add the dispatch_type method" .PD .PP \fIRestarter\fR .IX Subsection "Restarter" .PP The development server restarter has been improved to be compatible with immutable Moose classes, and also to optionally use B::Hooks::OP::Check::StashChange to handle more complex application layouts correctly. .PP \fI\f(CI$c\fI\->uri_for_action method.\fR .IX Subsection "$c->uri_for_action method." .PP Give a private path to the Catalyst action you want to create a \s-1URI\s0 for. .PP \fILogging\fR .IX Subsection "Logging" .PP Log levels have been made additive. .PP \fICatalyst::Test\fR .IX Subsection "Catalyst::Test" .IP "Change to use Sub::Exporter." 4 .IX Item "Change to use Sub::Exporter." .PD 0 .IP "Support mocking multiple virtual hosts" 4 .IX Item "Support mocking multiple virtual hosts" .IP "New methods like action_ok and action_redirect to write more compact tests" 4 .IX Item "New methods like action_ok and action_redirect to write more compact tests" .PD .PP \fICatalyst::Response\fR .IX Subsection "Catalyst::Response" .IP "\(bu" 4 New print method which prints \f(CW@data\fR to the output stream, separated by $,. This lets you pass the response object to functions that want to write to an IO::Handle. .IP "\(bu" 4 Added code method as an alias for \f(CW\*(C`$res\->status\*(C'\fR .PP \fIConsequences of the Moose back end\fR .IX Subsection "Consequences of the Moose back end" .IP "\(bu" 4 Components are fully compatible with Moose, and all Moose features, such as method modifiers, attributes, roles, \s-1BUILD\s0 and \s-1BUILDARGS\s0 methods are fully supported and may be used in components and applications. .IP "\(bu" 4 Many reusable extensions which would previously have been plugins or base classes are better implemented as Moose roles. .IP "\(bu" 4 MooseX::MethodAttributes::Role::AttrContainer::Inheritable is used to contain action attributes. This means that attributes are represented in the \s-1MOP,\s0 and decouples action creation from attributes. .IP "\(bu" 4 There is a reasonable \s-1API\s0 in Catalyst::Controller for working with and registering actions, allowing a controller sub-class to replace subroutine attributes for action declarations with an alternate syntax. .IP "\(bu" 4 Refactored capturing of \f(CW$app\fR from Catalyst::Controller into Catalyst::Component::ApplicationAttribute for easier reuse in other components. .IP "\(bu" 4 Your application class is forced to become immutable at the end of compilation. .PP \fIBug fixes\fR .IX Subsection "Bug fixes" .IP "\(bu" 4 Don't ignore \s-1SIGCHLD\s0 while handling requests with the development server, so that \&\fIsystem()\fR and other ways of creating child processes work as expected. .IP "\(bu" 4 Fixes for FastCGI when used with \s-1IIS 6.0\s0 .IP "\(bu" 4 Fix a bug in uri_for which could cause it to generate paths with multiple slashes in them. .IP "\(bu" 4 Fix a bug in Catalyst::Stats, stopping garbage being inserted into the stats if a user calls begin => but no end