Subject: | BUILD method prevents subclassing |
Date: | Tue, 26 May 2015 11:49:10 -0700 |
To: | bug-AnyEvent-Filesys-Notify [...] rt.cpan.org |
From: | Dave Hayes <dave [...] jetcafe.org> |
This issue is found in AnyEvent::Filesys::Notify v1.18 (and earlier).
For the record: this issue was detected on perl 5.18 and FreeBSD 10.1,
however I suspect it's in all versions on all operating systems.
Because of this line in your BUILD method:
$self->_old_fs( _scan_fs( $self->dirs ) );
it is impossible to replace _scan_fs with a non recursive one without
modifying this code directly. :)
I suggest either:
$self->_old_fs( $self->_scan_fs( $self->dirs ) );
or providing a switch whereby the object will not recurse into
subdirectories; a common use case (at least for me) when using the
kqueue backend.
Thanks in advance.
--
Dave Hayes - Consultant - Altadena CA, USA - dave@jetcafe.org
Show quoted text
>>>> *The opinions expressed above are entirely my own* <<<<
It is difficult to make things foolproof because fools are
so ingenious.