Commit | Line | Data |
8c57b129 |
1 | =head1 NAME |
2 | |
3 | Catalyst::Upgrading - Instructions for upgrading to the latest Catalyst |
4 | |
93d60cae |
5 | =head1 Upgrading to Catalyst 5.90 |
5d5f4a73 |
6 | |
7 | The major change is that L<Plack> now replaces most of the subclasses of |
8 | L<Catalyst::Engine>. If you are using one of the standard subclasses of |
040835f0 |
9 | L<Catalyst::Engine> this should be a straightforward upgrade for you. It was |
5d5f4a73 |
10 | a design goal for this release to be as backwardly compatible as possible. |
11 | However since L<Plack> is different from L<Catalyst::Engine> it would be |
12 | possible that edge case differences would exist. Therefore we recommend care |
13 | be taken with this upgrade and that testing should be greater than would be |
14 | the case with a minor point update. |
15 | |
16 | It is highly recommended that you become familar with the L<Plack> ecosystem |
17 | and documentation. Being able to take advantage of L<Plack> development and |
18 | middleware is a major bonus to this upgrade. |
19 | |
20 | If you have created a custom subclass of L<Catalyst:Engine> you will need to |
21 | convert it to be a subclass of L<Plack::Handler>. |
22 | |
23 | If you are using the L<Plack> engine, L<Catalyst::Engine::PSGI>, this new |
24 | release supercedes that code. |
25 | |
26 | If you are using a subclass of L<Catalyst::Engine> that is aimed at nonstandard |
27 | or internal / testing uses, such as L<Catalyst::Engine::Embeddable> you should |
28 | still be able to continue using that engine. |
29 | |
30 | Advice for specific subclasses of L<Catalyst::Engine> follows: |
31 | |
93d60cae |
32 | =head2 Upgrading the FastCGI Engine |
5d5f4a73 |
33 | |
040835f0 |
34 | No upgrade needed if your myapp_fastcgi.pl script is already upgraded |
35 | enough to use L<Catalyst::Script::FastCGI>. |
5d5f4a73 |
36 | |
93d60cae |
37 | =head2 Upgrading the mod_perl / Apache Engines |
5d5f4a73 |
38 | |
040835f0 |
39 | The engines that are build upon the various iterations of mod_perl, |
40 | L<Catalyst::Engine::Apache::MP13> and |
5d5f4a73 |
41 | L<Catalyst::Engine::Apache2::MP20> should be seemless upgrades and will |
42 | work using using L<Plack::Handler::Apache1> or L<Plack::Handler::Apache2> |
43 | as required. |
44 | |
040835f0 |
45 | L<Catalyst::Engine::Apache2::MP19>, is however no longer supported, as Plack |
46 | does not support mod_perl version 1.99??? FIXME - is this true? |
5d5f4a73 |
47 | |
93d60cae |
48 | =head2 Upgrading the HTTP Engine |
5d5f4a73 |
49 | |
040835f0 |
50 | The default development server that comes with the L<Catalyst> distribution |
51 | should continue to work as expected with no changes as long as your C<myapp_server> |
52 | script is upgraded to use L<Catalyst::Script::HTTP>. |
5d5f4a73 |
53 | |
93d60cae |
54 | =head2 Upgrading the CGI Engine |
5d5f4a73 |
55 | |
697a3e9e |
56 | If you were using L<Catalyst::Engine::CGI> there is no upgrade needed if your |
57 | myapp_cgi.pl script is already upgraded enough to use L<Catalyst::Script::CGI>. |
5d5f4a73 |
58 | |
93d60cae |
59 | =head2 Upgrading the Preforking Engine |
5d5f4a73 |
60 | |
040835f0 |
61 | If you were using L<Catalyst::Engine::HTTP::Prefork> then L<Starman> |
62 | is automatically loaded. |
5d5f4a73 |
63 | |
93d60cae |
64 | =head2 Upgrading the PSGI Engine |
5d5f4a73 |
65 | |
66 | If you were using L<Catalyst::Engine::PSGI> this new release supercedes this |
697a3e9e |
67 | engine in supporting L<Plack>. By default the Engine is now always L<Plack>. |
68 | As a result, you can stop depending on L<Catalyst::Engine::PSGI> in your |
69 | C<Makefile.PL>. Additionally, if you have an C<app.psgi> script you no longer |
70 | need to specify the PSGI engine. Instead, the L<Catalyst> application class |
71 | now has a new method C<psgi_app> which returns a L<Plack> compatible coderef. |
72 | |
73 | For example, if you were using L<Catalyst::Engine::PSGI> in the past, you may |
74 | have written an C<app.psgi> file similar to this one: |
75 | |
76 | use Plack::Builder; |
77 | use MyCatalytApp; |
78 | |
79 | MyCatalystApp->setup_engine('PSGI'); |
80 | |
81 | builder { |
82 | enable ... # enable your desired middleware |
83 | sub { MyCatalystApp->run(@_) }; |
84 | }; |
85 | |
86 | Instead, you now just do |
87 | |
88 | use Plack::Builder; |
89 | use MyCatalystApp; |
90 | |
91 | builder { |
92 | enable ... #enable your desired middleware |
93 | MyCatalystApp->psgi_app; |
94 | }; |
5d5f4a73 |
95 | |
96 | =head2 Engines with unknown status |
97 | |
98 | The following engines have untested or unknown compatibility. Reports are |
99 | highly welcomed: |
100 | |
101 | Catalyst::Engine::Embeddable |
102 | Catalyst::Engine::XMPP2 |
103 | Catalyst::Engine::SCGI |
104 | Catalyst::Engine::Mojo |
105 | Catalyst::Engine::Zeus |
106 | Catalyst::Engine::JobQueue::POE |
107 | Catalyst::Engine::Wx |
108 | Catalyst::Engine::Stomp |
109 | Catalyst::Engine::Server (Marked as Deprecated) |
110 | Catalyst::Engine::HTTP::POE (Marked as Deprecated) |
111 | |
040835f0 |
112 | =head2 Using middleware |
113 | |
114 | XXX Should this be here or elsewhere? |
5d5f4a73 |
115 | |
040835f0 |
116 | =head2 Making an app.psgi file |
5d5f4a73 |
117 | |
040835f0 |
118 | =head2 Running with plackup? |
5d5f4a73 |
119 | |
7e2ec16e |
120 | =head1 Upgrading to Catalyst 5.80 |
121 | |
5687c7f9 |
122 | Most applications and plugins should run unaltered on Catalyst 5.80. |
7e2ec16e |
123 | |
8f61d649 |
124 | However, a lot of refactoring work has taken place, and several changes have |
1a98f036 |
125 | been made which could cause incompatibilities. If your application or plugin |
8f61d649 |
126 | is using deprecated code, or relying on side effects, then you could have |
ba03ccca |
127 | issues upgrading to this release. |
5687c7f9 |
128 | |
8f61d649 |
129 | Most issues found with pre-existing components have been easy to |
130 | solve. This document provides a complete description of behavior changes |
131 | which may cause compatibility issues, and of new Catalyst warnings which |
132 | be unclear. |
7e2ec16e |
133 | |
8f61d649 |
134 | If you think you have found an upgrade-related issue which is not covered in |
135 | this document, please email the Catalyst list to discuss the problem. |
7e2ec16e |
136 | |
85f0a66f |
137 | =head1 Moose features |
138 | |
8f61d649 |
139 | =head2 Application class roles |
85f0a66f |
140 | |
8f61d649 |
141 | You can only apply method modifiers after the application's C<< ->setup >> |
85f0a66f |
142 | method has been called. This means that modifiers will not work with methods |
143 | which run during the call to C<< ->setup >>. |
144 | |
a6eb852a |
145 | See L<Catalyst::Manual::ExtendingCatalyst> for more information about using |
146 | L<Moose> in your applications. |
147 | |
85f0a66f |
148 | =head2 Controller actions in Moose roles |
149 | |
d76c88f3 |
150 | You can use L<MooseX::MethodAttributes::Role> if you want to declare actions |
151 | inside Moose roles. |
85f0a66f |
152 | |
d935773d |
153 | =head2 Using Moose in Components |
154 | |
155 | The correct way to use Moose in a component in a both forward and backwards |
156 | compatible way is: |
157 | |
158 | package TestApp::Controller::Root; |
159 | use Moose; |
160 | BEGIN { extends 'Catalyst::Component' }; # Or ::Controller, or whatever |
161 | |
162 | See L<Components which inherit from Moose::Object before Catalyst::Component>. |
163 | |
8f61d649 |
164 | =head1 Known backwards compatibility breakages |
7e2ec16e |
165 | |
8f61d649 |
166 | =head2 Applications in a single file |
85f0a66f |
167 | |
168 | Applications must be in their own file, and loaded at compile time. This |
8f61d649 |
169 | issue generally only affects the tests of CPAN distributions. Your |
170 | application will fail if you try to define an application inline in a |
171 | block, and use plugins which supply a C< new > method, then use that |
172 | application latter in tests within the same file. |
85f0a66f |
173 | |
174 | This is due to the fact that Catalyst is inlining a new method on your |
8f61d649 |
175 | application class allowing it to be compatible with Moose. The method |
176 | used to do this changed in 5.80004 to avoid the possibility of reporting |
177 | an 'Unknown Error' if your application failed to compile. |
85f0a66f |
178 | |
38f90e49 |
179 | =head2 Issues with Class::C3 |
180 | |
8f61d649 |
181 | Catalyst 5.80 uses the L<Algorithm::C3> method dispatch order. This is |
182 | built into Perl 5.10, and comes via L<Class::C3> for Perl 5.8. This |
183 | replaces L<NEXT> with L<Class::C3::Adopt::NEXT>, forcing all components |
184 | to resolve methods using C3, rather than the unpredictable dispatch |
185 | order of L<NEXT>. |
38f90e49 |
186 | |
5d06547d |
187 | This issue is characterised by your application failing to start due to an |
188 | error message about having a non-linear @ISA. |
189 | |
8f61d649 |
190 | The Catalyst plugin most often causing this is |
191 | L<Catalyst::Plugin::Session::Store::FastMmap> - if you are using this |
192 | plugin and see issues, then please upgrade your plugins, as it has been |
193 | fixed. Note that Makefile.PL in the distribution will warn about known |
194 | incompatible components. |
5d06547d |
195 | |
196 | This issue can, however, be found in your own application - the only solution is |
197 | to go through each base class of the class the error was reported against, until |
198 | you identify the ones in conflict, and resolve them. |
199 | |
200 | To be able to generate a linear @ISA, the list of superclasses for each |
201 | class must be resolvable using the C3 algorithm. Unfortunately, when |
202 | superclasses are being used as mixins (to add functionality used in your class), |
203 | and with multiple inheritence, it is easy to get this wrong. |
38f90e49 |
204 | |
205 | Most common is the case of: |
206 | |
207 | package Component1; # Note, this is the common case |
208 | use base qw/Class::Accessor::Fast Class::Data::Inheritable/; |
209 | |
8f61d649 |
210 | package Component2; # Accidentally saying it this way causes a failure |
38f90e49 |
211 | use base qw/Class::Data::Inheritable Class::Accessor::Fast/; |
212 | |
213 | package GoesBang; |
214 | use base qw/Component1 Component2/; |
215 | |
5d06547d |
216 | Any situation like this will cause your application to fail to start. |
38f90e49 |
217 | |
8f61d649 |
218 | For additional documentation about this issue, and how to resolve it, see |
5d06547d |
219 | L<Class::C3::Adopt::NEXT>. |
38f90e49 |
220 | |
6f04e56a |
221 | =head2 Components which inherit from Moose::Object before Catalyst::Component |
7e2ec16e |
222 | |
6f04e56a |
223 | Moose components which say: |
7e2ec16e |
224 | |
6f04e56a |
225 | package TestApp::Controller::Example; |
226 | use Moose; |
845bfcd2 |
227 | extends qw/Moose::Object Catalyst::Component/; |
7e2ec16e |
228 | |
8f61d649 |
229 | to use the constructor provided by Moose, while working (if you do some hacks |
1a98f036 |
230 | with the C< BUILDARGS > method), will not work with Catalyst 5.80 as |
6f04e56a |
231 | C<Catalyst::Component> inherits from C<Moose::Object>, and so C< @ISA > fails |
25f61108 |
232 | to linearize. |
6f04e56a |
233 | |
6f04e56a |
234 | The correct way to use Moose in a component in a both forward and backwards |
235 | compatible way is: |
236 | |
237 | package TestApp::Controller::Root; |
238 | use Moose; |
239 | BEGIN { extends 'Catalyst::Component' }; # Or ::Controller, or whatever |
240 | |
ba03ccca |
241 | Note that the C< extends > declaration needs to occur in a begin block for |
3df46b1b |
242 | L<attributes> to operate correctly. |
243 | |
d935773d |
244 | This way you do not inherit directly from C<Moose::Object> |
245 | yourself. Having components which do not inherit their constructor from |
246 | C<Catalyst::Component> is B<unsupported>, and has never been recommended, |
247 | therefore you're on your own if you're using this technique. You'll need |
248 | to detect the version of Catalyst your application is running, and deal |
249 | with it appropriately. |
250 | |
eaae9a92 |
251 | You also don't get the L<Moose::Object> constructor, and therefore attribute |
252 | initialization will not work as normally expected. If you want to use Moose |
3df46b1b |
253 | attributes, then they need to be made lazy to correctly initialize. |
254 | |
255 | Note that this only applies if your component needs to maintain component |
256 | backwards compatibility for Catalyst versions before 5.71001 - in 5.71001 |
257 | attributes work as expected, and the BUILD method is called normally |
eaae9a92 |
258 | (although BUILDARGS is not). |
3df46b1b |
259 | |
260 | If you depend on Catalyst 5.8, then B<all> Moose features work as expected. |
8566c0de |
261 | |
d935773d |
262 | You will also see this issue if you do the following: |
263 | |
264 | package TestApp::Controller::Example; |
265 | use Moose; |
266 | use base 'Catalyst::Controller'; |
267 | |
268 | as C< use base > appends to @ISA. |
269 | |
e11cac87 |
270 | =head3 use Moose in MyApp |
271 | |
272 | Similar to the above, this will also fail: |
273 | |
274 | package MyApp; |
275 | use Moose; |
276 | use Catalyst qw/ |
277 | ConfigLoader |
278 | /; |
279 | __PACKAGE__->setup; |
280 | |
281 | If you need to use Moose in your application class (e.g. for method modifiers |
8f61d649 |
282 | etc.) then the correct technique is: |
e11cac87 |
283 | |
284 | package MyApp; |
285 | use Moose; |
5b6f82d2 |
286 | use Catalyst; |
287 | |
e11cac87 |
288 | extends 'Catalyst'; |
5b6f82d2 |
289 | |
290 | __PACKAGE__->config( name => 'MyApp' ); |
e11cac87 |
291 | __PACKAGE__->setup(qw/ |
292 | ConfigLoader |
293 | /); |
294 | |
04a48104 |
295 | =head2 Anonymous closures installed directly into the symbol table |
296 | |
297 | If you have any code which installs anonymous subroutine references directly |
298 | into the symbol table, you may encounter breakages. The simplest solution is |
299 | to use L<Sub::Name> to name the subroutine. Example: |
300 | |
e11cac87 |
301 | # Original code, likely to break: |
1a98f036 |
302 | my $full_method_name = join('::', $package_name, $method_name); |
04a48104 |
303 | *$full_method_name = sub { ... }; |
304 | |
e11cac87 |
305 | # Fixed Code |
04a48104 |
306 | use Sub::Name 'subname'; |
307 | my $full_method_name = join('::',$package_name, $method_name); |
308 | *$full_method_name = subname $full_method_name, sub { ... }; |
309 | |
8f61d649 |
310 | Additionally, you can take advantage of Catalyst's use of L<Class::MOP> and |
311 | install the closure using the appropriate metaclass. Example: |
04a48104 |
312 | |
313 | use Class::MOP; |
314 | my $metaclass = Moose::Meta::Class->initialize($package_name); |
315 | $metaclass->add_method($method_name => sub { ... }); |
316 | |
780654ad |
317 | =head2 Hooking into application setup |
318 | |
8f61d649 |
319 | To execute code during application start-up, the following snippet in MyApp.pm |
780654ad |
320 | used to work: |
321 | |
322 | sub setup { |
323 | my ($class, @args) = @_; |
324 | $class->NEXT::setup(@args); |
325 | ... # things to do after the actual setup |
326 | } |
327 | |
8f61d649 |
328 | With Catalyst 5.80 this won't work anymore, because Catalyst no longer |
329 | uses NEXT.pm for method resolution. The functionality was only ever |
330 | originally operational as L<NEXT> remembers what methods have already |
331 | been called, and will not call them again. |
780654ad |
332 | |
1a98f036 |
333 | Using this now causes infinite recursion between MyApp::setup and |
334 | Catalyst::setup, due to other backwards compatibility issues related to how |
e6c5b548 |
335 | plugin setup works. Moose method modifiers like C<< before|after|around setup |
1a98f036 |
336 | => sub { ... }; >> also will not operate correctly on the setup method. |
780654ad |
337 | |
338 | The right way to do it is this: |
339 | |
340 | after setup_finalize => sub { |
341 | ... # things to do after the actual setup |
342 | }; |
343 | |
ade00972 |
344 | The setup_finalize hook was introduced as a way to avoid this issue. |
1a98f036 |
345 | |
e11cac87 |
346 | =head2 Components with a new method which returns false |
7e2ec16e |
347 | |
8dd2f514 |
348 | Previously, if you had a component which inherited from Catalyst::COMPONENT, |
8f61d649 |
349 | but overrode the new method to return false, then your class's configuration |
8dd2f514 |
350 | would be blessed into a hash on your behalf, and this would be returned from |
a87f5aa5 |
351 | the COMPONENT method. |
7e2ec16e |
352 | |
8f61d649 |
353 | This behavior makes no sense, and so has been removed. Implementing your own |
354 | C< new > method in components is B<highly> discouraged. Instead, you should |
355 | inherit the new method from Catalyst::Component, and use Moose's BUILD |
1a98f036 |
356 | functionality and/or Moose attributes to perform any construction work |
357 | necessary for your class. |
7e2ec16e |
358 | |
359 | =head2 __PACKAGE__->mk_accessor('meta'); |
360 | |
e11cac87 |
361 | Won't work due to a limitation of L<Moose>. This is currently being fixed |
362 | inside Moose. |
7e2ec16e |
363 | |
364 | =head2 Class::Data::Inheritable side effects |
365 | |
8dd2f514 |
366 | Previously, writing to a class data accessor would copy the accessor method |
367 | down into your package. |
368 | |
8f61d649 |
369 | This behavior has been removed. While the class data is still stored |
8dd2f514 |
370 | per-class, it is stored on the metaclass of the class defining the accessor. |
7e2ec16e |
371 | |
8f61d649 |
372 | Therefore anything relying on the side effect of the accessor being copied down |
8dd2f514 |
373 | will be broken. |
7e2ec16e |
374 | |
1a98f036 |
375 | The following test demonstrates the problem: |
8dd2f514 |
376 | |
377 | { |
378 | package BaseClass; |
379 | use base qw/Class::Data::Inheritable/; |
380 | __PACKAGE__->mk_classdata('foo'); |
381 | } |
382 | |
383 | { |
384 | package Child; |
385 | use base qw/BaseClass/; |
386 | } |
387 | |
388 | BaseClass->foo('base class'); |
389 | Child->foo('sub class'); |
eaae9a92 |
390 | |
e11cac87 |
391 | use Test::More; |
8dd2f514 |
392 | isnt(BaseClass->can('foo'), Child->can('foo')); |
7e2ec16e |
393 | |
8f61d649 |
394 | =head2 Extending Catalyst::Request or other classes in an ad-hoc manner using mk_accessors |
7e2ec16e |
395 | |
8dd2f514 |
396 | Previously, it was possible to add additional accessors to Catalyst::Request |
397 | (or other classes) by calling the mk_accessors class method. |
7e2ec16e |
398 | |
8f61d649 |
399 | This is no longer supported - users should make a subclass of the class whose |
400 | behavior they would like to change, rather than globally polluting the |
e11cac87 |
401 | Catalyst objects. |
8be895a7 |
402 | |
10011c19 |
403 | =head2 Confused multiple inheritance with Catalyst::Component::COMPONENT |
8be895a7 |
404 | |
8f61d649 |
405 | Previously, Catalyst's COMPONENT method would delegate to the method on |
406 | the right hand side, which could then delegate back again with |
407 | NEXT. This is poor practice, and in addition, makes no sense with C3 |
408 | method dispatch order, and is therefore no longer supported. |
bcc773b9 |
409 | |
ba03ccca |
410 | If a COMPONENT method is detected in the inheritance hierarchy to the right |
bcc773b9 |
411 | hand side of Catalyst::Component::COMPONENT, then the following warning |
412 | message will be emitted: |
7e2ec16e |
413 | |
8dd2f514 |
414 | There is a COMPONENT method resolving after Catalyst::Component |
5687c7f9 |
415 | in ${next_package}. |
8dd2f514 |
416 | |
8f61d649 |
417 | The correct fix is to re-arrange your class's inheritance hierarchy so that the |
bcc773b9 |
418 | COMPONENT method you would like to inherit is the first (left-hand most) |
419 | COMPONENT method in your @ISA. |
7e2ec16e |
420 | |
c571d2c8 |
421 | =head1 WARNINGS |
422 | |
63b546b1 |
423 | =head2 Actions in your application class |
424 | |
425 | Having actions in your application class will now emit a warning at application |
e256d0e1 |
426 | startup as this is deprecated. It is highly recommended that these actions are moved |
63b546b1 |
427 | into a MyApp::Controller::Root (as demonstrated by the scaffold application |
55dd186c |
428 | generated by catalyst.pl). |
da73c6af |
429 | |
e256d0e1 |
430 | This warning, also affects tests. You should move actions in your test, |
431 | creating a myTest::Controller::Root, like the following example: |
da73c6af |
432 | |
433 | package MyTest::Controller::Root; |
95a52a01 |
434 | |
da73c6af |
435 | use strict; |
436 | use warnings; |
95a52a01 |
437 | |
da73c6af |
438 | use parent 'Catalyst::Controller'; |
95a52a01 |
439 | |
da73c6af |
440 | __PACKAGE__->config(namespace => ''); |
95a52a01 |
441 | |
da73c6af |
442 | sub action : Local { |
443 | my ( $self, $c ) = @_; |
444 | $c->do_something; |
445 | } |
95a52a01 |
446 | |
da73c6af |
447 | 1; |
63b546b1 |
448 | |
ac9279b0 |
449 | =head2 ::[MVC]:: naming scheme |
450 | |
451 | Having packages called MyApp::[MVC]::XX is deprecated and can no longer be generated |
452 | by catalyst.pl |
453 | |
454 | This is still supported, but it is recommended that you rename your application |
455 | components to Model/View/Controller. |
456 | |
457 | A warning will be issued at application startup if the ::[MVC]:: naming scheme is |
458 | in use. |
459 | |
ade00972 |
460 | =head2 Catalyst::Base |
461 | |
8f61d649 |
462 | Any code using L<Catalyst::Base> will now emit a warning; this |
463 | module will be removed in a future release. |
ade00972 |
464 | |
c571d2c8 |
465 | =head2 Methods in Catalyst::Dispatcher |
466 | |
8f61d649 |
467 | The following methods in Catalyst::Dispatcher are implementation |
468 | details, which may change in the 5.8X release series, and therefore their use |
bcc773b9 |
469 | is highly deprecated. |
c571d2c8 |
470 | |
471 | =over |
472 | |
8dd2f514 |
473 | =item tree |
c571d2c8 |
474 | |
8dd2f514 |
475 | =item dispatch_types |
c571d2c8 |
476 | |
8dd2f514 |
477 | =item registered_dispatch_types |
c571d2c8 |
478 | |
8dd2f514 |
479 | =item method_action_class |
c571d2c8 |
480 | |
8dd2f514 |
481 | =item action_hash |
c571d2c8 |
482 | |
483 | =item container_hash |
484 | |
485 | =back |
486 | |
487 | The first time one of these methods is called, a warning will be emitted: |
7e2ec16e |
488 | |
bcc773b9 |
489 | Class $class is calling the deprecated method Catalyst::Dispatcher::$public_method_name, |
490 | this will be removed in Catalyst 5.9X |
7e2ec16e |
491 | |
c571d2c8 |
492 | You should B<NEVER> be calling any of these methods from application code. |
493 | |
8f61d649 |
494 | Plugin authors and maintainers whose plugins currently call these methods |
8f5a2bd9 |
495 | should change to using the public API, or, if you do not feel the public API |
8f61d649 |
496 | adequately supports your use case, please email the development list to |
8f5a2bd9 |
497 | discuss what API features you need so that you can be appropriately supported. |
7e2ec16e |
498 | |
95b20422 |
499 | =head2 Class files with names that don't correspond to the packages they define |
7e2ec16e |
500 | |
e11cac87 |
501 | In this version of Catalyst, if a component is loaded from disk, but no |
ba03ccca |
502 | symbols are defined in that component's name space after it is loaded, this |
bcc773b9 |
503 | warning will be issued: |
7e2ec16e |
504 | |
bcc773b9 |
505 | require $class was successful but the package is not defined. |
7e2ec16e |
506 | |
8f61d649 |
507 | This is to protect against confusing bugs caused by mistyping package names, |
bcc773b9 |
508 | and will become a fatal error in a future version. |
509 | |
510 | Please note that 'inner packages' (via L<Devel::InnerPackage>) are still fully |
8f61d649 |
511 | supported; this warning is only issued when component file naming does not map |
bcc773b9 |
512 | to B<any> of the packages defined within that component. |
7e2ec16e |
513 | |
5687c7f9 |
514 | =head2 $c->plugin method |
515 | |
25f61108 |
516 | Calling the plugin method is deprecated, and calling it at run time is B<highly |
8dd2f514 |
517 | deprecated>. |
7e2ec16e |
518 | |
95a52a01 |
519 | Instead you are recommended to use L<Catalyst::Model::Adaptor> or similar to |
ba03ccca |
520 | compose the functionality you need outside of the main application name space. |
7e2ec16e |
521 | |
4e68badc |
522 | Calling the plugin method will not be supported past Catalyst 5.81. |
bcc773b9 |
523 | |
7e2ec16e |
524 | =cut |
4e68badc |
525 | |