mro compat stuff
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Log.pm
index 726ef7d..a45fb59 100644 (file)
@@ -1,5 +1,7 @@
 package Catalyst::Log;
 
+use MRO::Compat;
+use mro 'c3';
 use Moose;
 use Data::Dump;
 
@@ -36,13 +38,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 +100,9 @@ sub _send_to_log {
     print STDERR @_;
 }
 
+no Moose;
+__PACKAGE__->meta->make_immutable();
+
 1;
 
 __END__