in reply to
Re: Mixing C and perl
in thread Mixing C and perl
I want to be able to get directly to the XS methods using
$amd->method();
If $amd is just a blessed hash reference, I think I'd have to "indirect through" the perl wrapper:
# In AddrMatch.pm
sub method {
my $self = shift;
my $Cptr = $self->{__c_ptr};
return $Cptr->xs_method();
}
Also not too onerous. But will h2xs do all the right stuff to do the dynamic linking? I confess to considerable uncertainty about how the linking is made to work. I have tested the original model, and it appears to be doing the right thing with linking and reference counts.