Subject: | Classes don't inherit properly |
Several classes, the filters in particular, don't inherit from their parent class, so things like the following fail.
sub check_filter {
my $filter = shift;
unless ( $filter->isa('POE::Filter') ) {
die "You did not provide a valid Filter";
}
$filter;
}
my $filter = POE::Filter::Grep->new( Code => { $_ } );
check_filter( $filter );
So apparently, a POE::Filter::Grep is not a POE::Filter
Solution:
Even if POE::Filter doesn't supply any useful logic, you should still be doing
package POE::Filter::Grep;
use base 'POE::Filter';
so that at least they can be identifier as filters...