X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=46fc5223a89bf7fcb1c8a8d6af00f050313ce92c;hp=f9ebe5177cde0caef8856d73eb9715dc593c3578;hb=ff942beb0bff49b955364171d35961fa1b5aae93;hpb=d87eba4d709c2db0756466df8d8a5137a67ef8f1 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index f9ebe51..46fc522 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1458,12 +1458,18 @@ Returns a hash of components. sub components { my ( $class, $comps ) = @_; + # FIXME + # this is very wrong # people create components calling this sub directly, before setup + # also, $class->log doesn't work before setup_log $class->setup_config unless $class->container; my $container = $class->container; if ( $comps ) { + $class->log->warn(q{You are adding components using Catalyst's components method.}); + $class->log->warn(q{This behaviour is deprecated, please read}); + $class->log->warn(q{Catalyst::IOC::Container's documentation for better ways to do that.}); $container->add_component( $_ ) for keys %$comps; }