fix reported reversion
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Delta.pod
CommitLineData
8c57b129 1=head1 NAME
6c18e892 2
8c57b129 3Catalyst::Delta - Overview of changes between versions of Catalyst
4
5=head1 DESCRIPTION
6
c20710a1 7This is an overview of the user-visible changes to Catalyst between major Catalyst releases.
b31499bc 8
5bb2a5b3 9=head2 VERSION 5.90053
10
11We are now clarifying the behavior of log, plugins and configuration during
12the setup phase. Since Plugins might require a log during setup, setup_log
13must run BEFORE setup_plugins. This has the unfortunate side effect that
14anyone using the popular ConfigLoader plugin will not be able to supply
15configuration to custom logs since the configuration is not yet finalized
16when setup_log is run (when using ConfigLoader, which is a plugin and is
17not loaded until later.)
18
19As a workaround, you can supply custom log configuration directly into
20the configuration:
21
22 package MyApp;
23 use Catalyst;
24
25 __PACKAGE__->config(
26 my_custom_log_info => { %custom_args },
27 );
28
29 __PACKAGE__->setup;
30
31If you wish to configure the custom logger differently based on ENV, you can
32try:
33
34 package MyApp;
35
36 use Catalyst;
37 use Catalyst::Utils;
38
39 __PACKAGE__->config(
40 Catalyst::Utils::merge_hashes(
41 +{ my_custom_log_info => { %base_custom_args } },
42 +{ do __PACKAGE__->path_to( $ENV{WHICH_CONF}."_conf.pl") },
43 ),
44 );
45
46 __PACKAGE__->setup;
47
48Or create a standalone Configuration class that does the right thing.
49
50Basically if you want to configure a logger via Catalyst global configuration
51you can't use ConfigLoader because it will always be loaded too late to be of
52any use. Patches and workaround options welcomed!
53
9b3b1b9c 54=head2 VERSION 5.9XXXX 'cataplack'
c20710a1 55
56The Catalyst::Engine sub-classes have all been removed and deprecated,
57to be replaced with Plack handlers.
58
59Plack is an implementation of the L<PSGI> specification, which is
60a standard interface between web servers and application frameworks.
61
62This should be no different for developers, and you should not have to
63migrate your applications unless you are using a custom engine already.
64
65This change benefits Catalyst significantly by reducing the amount of
66code inside the framework, and means that the framework gets upstream
67bug fixes in L<Plack>, and automatically gains support for any web server
68which a L<PSGI> compliant handler is written for.
69
70It also allows you more flexibility with your application, and allows
71the use of cross web framework 'middleware'.
72
73Developers are recommended to read L<Catalyst::Upgrading> for notes about
74upgrading, especially if you are using an unusual deployment method.
75
76Documentation for how to take advantage of L<PSGI> can be found in
77L<Catalyst::PSGI>, and information about deploying your application
78has been moved to L<Catalyst::Manual::Deployment>.
79
80=head3 Updated modules:
81
82A number of modules have been updated to pass their tests or not
83produce deprecation warnings with the latest version of Catalyst.
84It is recommended that you upgrade any of these that you are using
85after installing this version of Catalyst.
86
87These extensions are:
88
89=over
90
91=item L<Catalyst::Engine::HTTP::Prefork>
92
93This is now deprecated, see L<Catalyst::Upgrading>.
94
95=item L<Test::WWW::Mechanize::Catalyst>
96
97Has been updated to not produce deprecation warnings, upgrade recommended.
98
99=item Catalyst::ActionRole::ACL
100
101Has been updated to fix failing tests (although older versions still
102function perfectly with this version of Catalyst).
103
104=item Catalyst::Plugin::Session::Store::DBIC
105
106Has been updated to fix failing tests (although older versions still
107function perfectly with this version of Catalyst).
108
14eb7697 109=item Catalyst::Plugin::Authentication
110
111Has been updated to fix failing tests (although older versions still
112function perfectly with this version of Catalyst).
113
c20710a1 114=back
1fae8c61 115
116=head1 PREVIOUS VERSIONS
117
9b3b1b9c 118=head2 VERSION 5.8XXXX 'catamoose'
1fae8c61 119
120=head3 Deprecations
b31499bc 121
e88235ff 122Please see L<Catalyst::Upgrading> for a full description of how changes in the
123framework may affect your application.
124
125Below is a brief list of features which have been deprecated in this release:
126
796a8358 127=over
b31499bc 128
796a8358 129=item ::[MVC]:: style naming scheme has been deprecated and will warn
b31499bc 130
e88235ff 131=item NEXT is deprecated for all applications and components, use MRO::Compat
b31499bc 132
e88235ff 133=item Dispatcher methods which are an implementation detail made private, public versions now warn.
b31499bc 134
e88235ff 135=item MyApp->plugin method is deprecated, use L<Catalyst::Model::Adaptor> instead.
796a8358 136
0a3b8de0 137=item __PACKAGE__->mk_accessors() is supported for backward compatibility only, use Moose attributes instead in new code.
138
7df44a71 139=item Use of Catalyst::Base now warns
140
796a8358 141=back
142
1fae8c61 143=head3 New features
0a3b8de0 144
145=head3 Dispatcher
b31499bc 146
7df44a71 147=over
148
149=item Fix forwarding to Catalyst::Action objects.
150
151=item Add the dispatch_type method
152
153=back
b31499bc 154
0a3b8de0 155=head3 Restarter
b31499bc 156
6171ddd5 157The development server restarter has been improved to be compatible with
158immutable Moose classes, and also to optionally use
159L<B::Hooks::OP::Check::StashChange> to handle more complex application layouts
160correctly.
b31499bc 161
7df44a71 162=head3 $c->uri_for_action method.
b31499bc 163
7df44a71 164Give a private path to the Catalyst action you want to create a URI for.
6c18e892 165
0a3b8de0 166=head3 Logging
b31499bc 167
7df44a71 168Log levels have been made additive.
b31499bc 169
0a3b8de0 170=head3 L<Catalyst::Test>
171
172=over
173
174=item Change to use L<Sub::Exporter>.
175
0a3b8de0 176=item Support mocking multiple virtual hosts
177
178=item New methods like action_ok and action_redirect to write more compact tests
179
180=back
181
7df44a71 182=head3 Catalyst::Response
0a3b8de0 183
7df44a71 184=over
185
186=item *
187
188New print method which prints @data to the output stream, separated by $,.
189This lets you pass the response object to functions that want to write to an
190L<IO::Handle>.
191
192=item *
193
194Added code method as an alias for C<< $res->status >>
0a3b8de0 195
d5a6de01 196=back
197
1fae8c61 198=head3 Consequences of the Moose back end
b31499bc 199
796a8358 200=over
201
202=item *
203
7df44a71 204Components are fully compatible with Moose, and all Moose features, such as
205method modifiers, attributes, roles, BUILD and BUILDARGS methods are fully
206supported and may be used in components and applications.
207
208=item *
209
210Many reusable extensions which would previously have been plugins or base
211classes are better implemented as Moose roles.
212
213=item *
214
a0c37f08 215L<MooseX::MethodAttributes::Role::AttrContainer::Inheritable> is used to contain action
7df44a71 216attributes. This means that attributes are represented in the MOP, and
217decouples action creation from attributes.
796a8358 218
219=item *
220
0a3b8de0 221There is a reasonable API in Catalyst::Controller for working with
796a8358 222and registering actions, allowing a controller sub-class to replace
25f61108 223subroutine attributes for action declarations with an alternate
0a3b8de0 224syntax.
796a8358 225
226=item *
227
0a3b8de0 228Refactored capturing of $app from L<Catalyst::Controller> into
229L<Catalyst::Component::ApplicationAttribute> for easier reuse in other
7df44a71 230components.
231
232=item *
233
234Your application class is forced to become immutable at the end of compilation.
235
236=back
237
1fae8c61 238=head3 Bug fixes
7df44a71 239
240=over
241
242=item *
243
25f61108 244Don't ignore SIGCHLD while handling requests with the development server, so that
7df44a71 245system() and other ways of creating child processes work as expected.
246
247=item *
248
249Fixes for FastCGI when used with IIS 6.0
250
251=item *
252
253Fix a bug in uri_for which could cause it to generate paths with multiple
254slashes in them.
796a8358 255
256=item *
257
7df44a71 258Fix a bug in Catalyst::Stats, stopping garbage being inserted into
259the stats if a user calls begin => but no end
796a8358 260
261=back
262