incubusaurus has asked for the wisdom of the Perl Monks concerning the following question:
The code works as expected if I substitute Gearman::XS::Client with another module, such as JSON::XS. I've tried use parent, use base, manually modifying @ISA, and using extends from Mouse. I'm assuming that the problem is caused by Gearman::XS::Client, buy why?use Test::More; use strict; use warnings; { package My::Gearman::Client; use parent 'Gearman::XS::Client'; sub foo {} } my $gm = My::Gearman::Client->new; isa_ok($gm, 'Gearman::XS::Client'); # Pass isa_ok($gm, 'My::Gearman::Client'); # Fail can_ok($gm, 'foo'); # Fail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cannot subclass Gearman::XS::Client
by MidLifeXis (Monsignor) on Jul 24, 2014 at 19:47 UTC | |
by incubusaurus (Initiate) on Jul 24, 2014 at 20:21 UTC | |
|
Re: Cannot subclass Gearman::XS::Client
by runrig (Abbot) on Jul 24, 2014 at 19:51 UTC | |
by incubusaurus (Initiate) on Jul 24, 2014 at 20:23 UTC |