X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FLog.pm;h=3f67952b36726bb8b34b5578948b3df5377e37e3;hp=726ef7d4e5a3862a41314e1e11a2ecab85e3cd91;hb=0fc2d522eec43202c21e9f0062e43f10db4d9008;hpb=5fb12dbb7e69039e0ea22ec4d7cb627206b4508b diff --git a/lib/Catalyst/Log.pm b/lib/Catalyst/Log.pm index 726ef7d..3f67952 100644 --- a/lib/Catalyst/Log.pm +++ b/lib/Catalyst/Log.pm @@ -1,5 +1,6 @@ package Catalyst::Log; +use Class::C3; use Moose; use Data::Dump; @@ -36,13 +37,12 @@ has abort => (is => 'rw'); } } -around new => sub { - my $orig = shift; +sub new { my $class = shift; - my $self = $class->$orig; + my $self = $class->next::method; $self->levels( scalar(@_) ? @_ : keys %LEVELS ); return $self; -}; +} sub levels { my ( $self, @levels ) = @_; @@ -99,6 +99,9 @@ sub _send_to_log { print STDERR @_; } +no Moose; +__PACKAGE__->meta->make_immutable(); + 1; __END__