in reply to Cannot subclass Gearman::XS::Client

Your code requires Gearman::XS::Client to bless the object into the class 'My::Gearman::Client'. Gearman::XS::Client does not necessarily do this. Although the common way to write a constructor is something along the lines of:
sub new { my $class = shift; bless {}, $class; }
Not all modules will do it this way, and will bless into some constant class name. That appears to be what is happening. You can try filing a bug report (hopefully with a patch) that the module cannot be sub-classed, or you can make your library a delegator instead of a parent class.

Replies are listed 'Best First'.
Re^2: Cannot subclass Gearman::XS::Client
by incubusaurus (Initiate) on Jul 24, 2014 at 20:23 UTC
    I've not worked with XS code before, but this looks like an interesting little challenge for me. Time permitting, I'll have a stab at creating a patch.