Skip Menu |

This queue is for tickets about the Log-Dispatch-Gtk2-Notify CPAN distribution.

Report information
The Basics
Id: 52298
Status: resolved
Priority: 0/
Queue: Log-Dispatch-Gtk2-Notify

People
Owner: Nobody in particular
Requestors: KAPPA [...] cpan.org
Cc: jhelwig [...] cpan.org
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.01
Fixed in: (no value)



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' };
RT-Send-CC: rafl [...] debian.org
On 2009-11-30 17:06:18, KAPPA wrote: Show quoted text
> I just fixed around the errors it gives when I try to use it. Patch is > really trivial.
The patch did not apply cleanly for me on the current master (6599306), so here is an updated one that should apply cleanly.
Subject: updated-gn.patch
diff --git i/lib/Log/Dispatch/Gtk2/Notify.pm w/lib/Log/Dispatch/Gtk2/Notify.pm index afffa31..39d3a56 100644 --- i/lib/Log/Dispatch/Gtk2/Notify.pm +++ w/lib/Log/Dispatch/Gtk2/Notify.pm @@ -62,20 +62,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, ); @@ -141,7 +145,7 @@ sub _build_icon_map { }; } -__PACKAGE__->meta->make_immutable; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); =pod diff --git i/lib/Log/Dispatch/Gtk2/Notify/Types.pm w/lib/Log/Dispatch/Gtk2/Notify/Types.pm index b89b17f..1ee3b22 100644 --- i/lib/Log/Dispatch/Gtk2/Notify/Types.pm +++ w/lib/Log/Dispatch/Gtk2/Notify/Types.pm @@ -13,7 +13,7 @@ use MooseX::Types -declare => [qw/ /]; subtype LogLevel, - from Str, + as Str, where { Log::Dispatch->level_is_valid($_) }, message { 'invalid log level' };