From: Tomas Doran Date: Sun, 12 Apr 2009 16:35:38 +0000 (+0000) Subject: Warnings from C::Base X-Git-Tag: 5.80001~33 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=dec1adb07ece5c25d6e91cc3b1670ce22d12e445;hp=c4d02967407405042bdf9ea08223b5582612d8d1 Warnings from C::Base --- diff --git a/Changes b/Changes index 2c646b6..14030d4 100644 --- a/Changes +++ b/Changes @@ -61,6 +61,7 @@ This is more correct, and avoids metaclass incompatibility in complex cases (t0m) - Tests for this (t0m) + - Use of deprecated Catalyst::Base now warns. (t0m) 5.8000_06 2009-02-04 21:00 - Disallow writing to config after setup (rafl) diff --git a/lib/Catalyst/Base.pm b/lib/Catalyst/Base.pm index 659a97d..6ef8fd3 100644 --- a/lib/Catalyst/Base.pm +++ b/lib/Catalyst/Base.pm @@ -1,9 +1,13 @@ package Catalyst::Base; - -use base qw/Catalyst::Controller/; use Moose; +BEGIN { extends 'Catalyst::Controller' } no Moose; +after 'BUILD' => sub { + my $self = shift; + warn(ref($self) . " is using the deprecated Catalyst::Base, update your application as this will be removed in the next major release"); +}; + 1; __END__ @@ -15,7 +19,10 @@ Catalyst::Base - Deprecated base class =head1 DESCRIPTION This used to be the base class for Catalyst Controllers. It -remains here for compatibility reasons. +remains here for compatibility reasons, but its use is highly deprecated. + +If your application produces a warning, then please update your application to +inherit from L instead. =head1 SEE ALSO