Subject: | Circular references in Notify::Role::* |
The attached script should exit immediately, but instead runs forever
due to references to the Notify object in watcher callbacks in Role::*.
The scoundrels are:
Role/Fallback.pm:16: $self->_process_events();
Role/Linux.pm:25: sub { my $e = shift;
$self->_process_events($e); } );
Role/Linux.pm:55: sub { my $e = shift;
$self->_process_events($e); } );
Role/Mac.pm:28: $self->_process_events(
$fs_monitor->read_events() );
And could all be fixed by using Scalar::Util's weaken on $self before
constructing the callback.
perl v5.10.1 (*) built for i686-linux-thread-multi running on Linux
2.6.33-ARCH #1 SMP PREEMPT Mon Apr 5 05:57:38 UTC 2010 i686
Subject: | notify.plx |
Message body not shown because it is not plain text.