Subject: | Failure with modern Moose |
I just fixed around the errors it gives when I try to use it. Patch is
really trivial.
Subject: | gn.patch |
diff --git a/lib/Log/Dispatch/Gtk2/Notify.pm b/lib/Log/Dispatch/Gtk2/Notify.pm
index ee3a618..846d60b 100644
--- a/lib/Log/Dispatch/Gtk2/Notify.pm
+++ b/lib/Log/Dispatch/Gtk2/Notify.pm
@@ -45,20 +45,24 @@ has icon_map => (
);
has name => (
+ is => 'ro',
isa => Str,
required => 1,
);
has min_level => (
+ is => 'ro',
isa => LogLevel,
required => 1,
);
has max_level => (
+ is => 'ro',
isa => LogLevel,
);
has callbacks => (
+ is => 'ro',
isa => (ArrayRef[CodeRef]) | CodeRef,
);
@@ -124,7 +128,7 @@ sub _build_icon_map {
};
}
-__PACKAGE__->meta->make_immutable;
+__PACKAGE__->meta->make_immutable(inline_constructor => 0);
1;
diff --git a/lib/Log/Dispatch/Gtk2/Notify/Types.pm b/lib/Log/Dispatch/Gtk2/Notify/Types.pm
index 0a7741d..7af7584 100644
--- a/lib/Log/Dispatch/Gtk2/Notify/Types.pm
+++ b/lib/Log/Dispatch/Gtk2/Notify/Types.pm
@@ -15,7 +15,7 @@ use MooseX::Types -declare => [qw/
/];
subtype LogLevel,
- from Str,
+ as Str,
where { Log::Dispatch->level_is_valid($_) },
message { 'invalid log level' };