Commit | Line | Data |
8c57b129 |
1 | =head1 NAME |
6c18e892 |
2 | |
8c57b129 |
3 | Catalyst::Delta - Overview of changes between versions of Catalyst |
4 | |
5 | =head1 DESCRIPTION |
6 | |
46fff667 |
7 | This is an overview of the user-visible changes to Catalyst between major |
8 | Catalyst releases. |
9 | |
10 | =head2 VERSION 5.90060+ |
11 | |
12 | We changed the way we return body content (from response) to whatever |
13 | Plack handler you are using (Starman, FastCGI, etc.) We no longer |
14 | always use the streaming interface for the cases when the body is a |
15 | simple scalar, object or filehandle like. In those cases we now just |
16 | pass the simple response on to the plack handler. This might lead to |
17 | some minor differences in how streaming is handled. For example, you |
18 | might notice that streaming starts using chunked encoding when running |
19 | on a server that supports that, or that previously missing headers |
20 | (possible content-length) might appear suddenly correct. Also, if you |
21 | are using middleware like L<Plack::Middleware::XSendfile> and are using |
22 | a filehandle that sets a readable path, your server might now correctly |
23 | handle the file (rather than as before where Catalyst would stream it |
24 | very likely very slowly). |
25 | |
26 | In other words, some things might be meaninglessly different and some |
27 | things that were broken codewise but worked because of Catalyst being |
28 | incorrect might suddenly be really broken. The behavior is now more |
29 | correct in that Catalyst plays better with features that Plack offers |
30 | but if you are making heavy use of the streaming interface there could |
31 | be some differences so you should test carefully (this is probably not |
32 | the vast majority of people). In particular if you are developing |
33 | using one server but deploying using a different one, differences in |
34 | what those server do with streaming should be noted. |
35 | |
36 | We also now more carefully distingush the different between a body set |
37 | to '' and a body that is undef. This might lead to situations where |
38 | again you'll get a content-length were you didn't get one before or |
39 | where a supporting server will start chunking output. If this is an |
40 | issue you can apply the middleware L<Plack::Middleware::BufferedStreaming> |
41 | or report specific problems to the dev team. |
b31499bc |
42 | |
9b3b1b9c |
43 | =head2 VERSION 5.9XXXX 'cataplack' |
c20710a1 |
44 | |
45 | The Catalyst::Engine sub-classes have all been removed and deprecated, |
46 | to be replaced with Plack handlers. |
47 | |
48 | Plack is an implementation of the L<PSGI> specification, which is |
49 | a standard interface between web servers and application frameworks. |
50 | |
51 | This should be no different for developers, and you should not have to |
52 | migrate your applications unless you are using a custom engine already. |
53 | |
54 | This change benefits Catalyst significantly by reducing the amount of |
55 | code inside the framework, and means that the framework gets upstream |
56 | bug fixes in L<Plack>, and automatically gains support for any web server |
57 | which a L<PSGI> compliant handler is written for. |
58 | |
59 | It also allows you more flexibility with your application, and allows |
60 | the use of cross web framework 'middleware'. |
61 | |
62 | Developers are recommended to read L<Catalyst::Upgrading> for notes about |
63 | upgrading, especially if you are using an unusual deployment method. |
64 | |
65 | Documentation for how to take advantage of L<PSGI> can be found in |
66 | L<Catalyst::PSGI>, and information about deploying your application |
67 | has been moved to L<Catalyst::Manual::Deployment>. |
68 | |
69 | =head3 Updated modules: |
70 | |
71 | A number of modules have been updated to pass their tests or not |
72 | produce deprecation warnings with the latest version of Catalyst. |
73 | It is recommended that you upgrade any of these that you are using |
74 | after installing this version of Catalyst. |
75 | |
76 | These extensions are: |
77 | |
78 | =over |
79 | |
80 | =item L<Catalyst::Engine::HTTP::Prefork> |
81 | |
82 | This is now deprecated, see L<Catalyst::Upgrading>. |
83 | |
84 | =item L<Test::WWW::Mechanize::Catalyst> |
85 | |
86 | Has been updated to not produce deprecation warnings, upgrade recommended. |
87 | |
88 | =item Catalyst::ActionRole::ACL |
89 | |
90 | Has been updated to fix failing tests (although older versions still |
91 | function perfectly with this version of Catalyst). |
92 | |
93 | =item Catalyst::Plugin::Session::Store::DBIC |
94 | |
95 | Has been updated to fix failing tests (although older versions still |
96 | function perfectly with this version of Catalyst). |
97 | |
14eb7697 |
98 | =item Catalyst::Plugin::Authentication |
99 | |
100 | Has been updated to fix failing tests (although older versions still |
101 | function perfectly with this version of Catalyst). |
102 | |
c20710a1 |
103 | =back |
1fae8c61 |
104 | |
105 | =head1 PREVIOUS VERSIONS |
106 | |
9b3b1b9c |
107 | =head2 VERSION 5.8XXXX 'catamoose' |
1fae8c61 |
108 | |
109 | =head3 Deprecations |
b31499bc |
110 | |
e88235ff |
111 | Please see L<Catalyst::Upgrading> for a full description of how changes in the |
112 | framework may affect your application. |
113 | |
114 | Below is a brief list of features which have been deprecated in this release: |
115 | |
796a8358 |
116 | =over |
b31499bc |
117 | |
796a8358 |
118 | =item ::[MVC]:: style naming scheme has been deprecated and will warn |
b31499bc |
119 | |
e88235ff |
120 | =item NEXT is deprecated for all applications and components, use MRO::Compat |
b31499bc |
121 | |
e88235ff |
122 | =item Dispatcher methods which are an implementation detail made private, public versions now warn. |
b31499bc |
123 | |
e88235ff |
124 | =item MyApp->plugin method is deprecated, use L<Catalyst::Model::Adaptor> instead. |
796a8358 |
125 | |
0a3b8de0 |
126 | =item __PACKAGE__->mk_accessors() is supported for backward compatibility only, use Moose attributes instead in new code. |
127 | |
7df44a71 |
128 | =item Use of Catalyst::Base now warns |
129 | |
796a8358 |
130 | =back |
131 | |
1fae8c61 |
132 | =head3 New features |
0a3b8de0 |
133 | |
134 | =head3 Dispatcher |
b31499bc |
135 | |
7df44a71 |
136 | =over |
137 | |
138 | =item Fix forwarding to Catalyst::Action objects. |
139 | |
140 | =item Add the dispatch_type method |
141 | |
142 | =back |
b31499bc |
143 | |
0a3b8de0 |
144 | =head3 Restarter |
b31499bc |
145 | |
6171ddd5 |
146 | The development server restarter has been improved to be compatible with |
147 | immutable Moose classes, and also to optionally use |
148 | L<B::Hooks::OP::Check::StashChange> to handle more complex application layouts |
149 | correctly. |
b31499bc |
150 | |
7df44a71 |
151 | =head3 $c->uri_for_action method. |
b31499bc |
152 | |
7df44a71 |
153 | Give a private path to the Catalyst action you want to create a URI for. |
6c18e892 |
154 | |
0a3b8de0 |
155 | =head3 Logging |
b31499bc |
156 | |
7df44a71 |
157 | Log levels have been made additive. |
b31499bc |
158 | |
0a3b8de0 |
159 | =head3 L<Catalyst::Test> |
160 | |
161 | =over |
162 | |
163 | =item Change to use L<Sub::Exporter>. |
164 | |
0a3b8de0 |
165 | =item Support mocking multiple virtual hosts |
166 | |
167 | =item New methods like action_ok and action_redirect to write more compact tests |
168 | |
169 | =back |
170 | |
7df44a71 |
171 | =head3 Catalyst::Response |
0a3b8de0 |
172 | |
7df44a71 |
173 | =over |
174 | |
175 | =item * |
176 | |
177 | New print method which prints @data to the output stream, separated by $,. |
178 | This lets you pass the response object to functions that want to write to an |
179 | L<IO::Handle>. |
180 | |
181 | =item * |
182 | |
183 | Added code method as an alias for C<< $res->status >> |
0a3b8de0 |
184 | |
d5a6de01 |
185 | =back |
186 | |
1fae8c61 |
187 | =head3 Consequences of the Moose back end |
b31499bc |
188 | |
796a8358 |
189 | =over |
190 | |
191 | =item * |
192 | |
7df44a71 |
193 | Components are fully compatible with Moose, and all Moose features, such as |
194 | method modifiers, attributes, roles, BUILD and BUILDARGS methods are fully |
195 | supported and may be used in components and applications. |
196 | |
197 | =item * |
198 | |
199 | Many reusable extensions which would previously have been plugins or base |
200 | classes are better implemented as Moose roles. |
201 | |
202 | =item * |
203 | |
a0c37f08 |
204 | L<MooseX::MethodAttributes::Role::AttrContainer::Inheritable> is used to contain action |
7df44a71 |
205 | attributes. This means that attributes are represented in the MOP, and |
206 | decouples action creation from attributes. |
796a8358 |
207 | |
208 | =item * |
209 | |
0a3b8de0 |
210 | There is a reasonable API in Catalyst::Controller for working with |
796a8358 |
211 | and registering actions, allowing a controller sub-class to replace |
25f61108 |
212 | subroutine attributes for action declarations with an alternate |
0a3b8de0 |
213 | syntax. |
796a8358 |
214 | |
215 | =item * |
216 | |
0a3b8de0 |
217 | Refactored capturing of $app from L<Catalyst::Controller> into |
218 | L<Catalyst::Component::ApplicationAttribute> for easier reuse in other |
7df44a71 |
219 | components. |
220 | |
221 | =item * |
222 | |
223 | Your application class is forced to become immutable at the end of compilation. |
224 | |
225 | =back |
226 | |
1fae8c61 |
227 | =head3 Bug fixes |
7df44a71 |
228 | |
229 | =over |
230 | |
231 | =item * |
232 | |
25f61108 |
233 | Don't ignore SIGCHLD while handling requests with the development server, so that |
7df44a71 |
234 | system() and other ways of creating child processes work as expected. |
235 | |
236 | =item * |
237 | |
238 | Fixes for FastCGI when used with IIS 6.0 |
239 | |
240 | =item * |
241 | |
242 | Fix a bug in uri_for which could cause it to generate paths with multiple |
243 | slashes in them. |
796a8358 |
244 | |
245 | =item * |
246 | |
7df44a71 |
247 | Fix a bug in Catalyst::Stats, stopping garbage being inserted into |
248 | the stats if a user calls begin => but no end |
796a8358 |
249 | |
250 | =back |
251 | |