Subject: | POE::XS::Queue::Array doesn't seem to sub-class properly |
POE::XS::Queue::Array doesn't seem to respond to isa() requests when
sub-classing.
Test attached.
Relevant system information:
perl -v
This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi
uname -a
Linux amelia 2.6.28-13-server #45-Ubuntu SMP Tue Jun 30 22:56:18 UTC
2009 x86_64 GNU/Linux
prove -v pq.t
pq.t ..
ok 1 - use POE::XS::Queue::Array;
ok 2 - The object isa My::Normal
ok 3 - The object isa My::Normal::Derived
ok 4 - The object isa My::Normal
not ok 5 - The object isa My::DerivedQueue
ok 6 - The object isa POE::XS::Queue::Array
1..6
# Failed test 'The object isa My::DerivedQueue'
# at pq.t line 35.
# The object isn't a 'My::DerivedQueue' it's a 'POE::XS::Queue::Array'
# Looks like you failed 1 test of 6.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests
Test Summary Report
-------------------
pq.t (Wstat: 256 Tests: 6 Failed: 1)
Failed test: 5
Non-zero exit status: 1
Files=1, Tests=6, 0 wallclock secs ( 0.03 usr 0.02 sys + 0.02 cusr
0.01 csys = 0.08 CPU)
Result: FAIL
Subject: | pq.t |
package My::Normal;
use strict;
use warnings;
sub new { bless({}, shift); }
1;
package My::Normal::Derived;
use strict;
use warnings;
use base qw[My::Normal];
1;
package My::DerivedQueue;
use strict;
use warnings;
use base qw[POE::XS::Queue::Array];
1;
package main;
BEGIN {
use Test::More;
plan 'no_plan';
use_ok('POE::XS::Queue::Array');
}
my $normal = My::Normal->new;
isa_ok($normal, 'My::Normal');
my $derived = My::Normal::Derived->new;
isa_ok($derived, 'My::Normal::Derived');
isa_ok($derived, 'My::Normal');
my $queue = My::DerivedQueue->new;
isa_ok($queue, 'My::DerivedQueue');
isa_ok($queue, 'POE::XS::Queue::Array');