use UNIVERSAL::require;
use Catalyst::Log;
-__PACKAGE__->mk_classdata($_) for qw/_config log/;
+__PACKAGE__->mk_classdata($_) for qw/_config engine log/;
-our $VERSION = '4.28';
+our $VERSION = '4.33';
our @ISA;
=head1 NAME
no strict 'refs';
*{"$caller\::handler"} =
sub { Catalyst::Engine::handler( $caller, @_ ) };
- push @{"$caller\::ISA"}, $self;
+
+ unless ( $caller->isa($self) ) {
+ push @{"$caller\::ISA"}, $self;
+ }
+ }
+
+ unless ( $caller->log ) {
+ $caller->log( Catalyst::Log->new );
}
- $self->log( Catalyst::Log->new );
# Options
my $engine =
if (/^\-Debug$/) {
no warnings;
no strict 'refs';
- *{"$self\::debug"} = sub { 1 };
+ *{"$caller\::debug"} = sub { 1 };
$caller->log->debug('Debug messages enabled');
}
elsif (/^-Engine=(.*)$/) { $engine = "Catalyst::Engine::$1" }
no strict 'refs';
push @{"$caller\::ISA"}, $engine;
}
+ $caller->engine($engine);
$caller->log->debug(qq/Loaded engine "$engine"/) if $caller->debug;
}
+=item $c->engine
+
+Contains the engine class.
+
+=item $c->log
+
+Contains the logging object. Unless it is already set Catalyst sets this up with a
+C<Catalyst::Log> object. To use your own log class:
+
+ $c->log( MyLogger->new );
+ $c->log->info("now logging with my own logger!");
+
+Your log class should implement the methods described in the C<Catalyst::Log>
+man page.
+
+
=back
=head1 SUPPORT
=head1 THANK YOU
-Andrew Ruthven, Christian Hansen, Christopher Hicks, Danijel Milicevic,
-David Naughton, Gary Ashton Jones, Jesse Sheidlower, Johan Lindstrom,
-Marcus Ramberg, Tatsuhiko Miyagawa and all the others who've helped.
+Andrew Ford, Andrew Ruthven, Christian Hansen, Christopher Hicks,
+Dan Sully, Danijel Milicevic, David Naughton, Gary Ashton Jones,
+Jesse Sheidlower, Johan Lindstrom, Marcus Ramberg, Tatsuhiko Miyagawa
+and all the others who've helped.
=head1 LICENSE