in reply to Re: some questions about example 4 of perlxstut
in thread some questions about example 4 of perlxstut

Thanks Rob, I usually use Inine::C to call some C functions from a library or create a skeleton of XS module, it's very handy, and I haven't touched h2xs for long time also. But as you said, example 4 is aim to access to functions in source, in this scenario, Inline C is not very suitable I think, although what h2xs shows in example 4 in perlxstut is not good either.

So what's the good way to generate XS (automatically) for access to a large source distribution? I'll look up ExtUtils::XSpp, hope it's a right way to go.

  • Comment on Re^2: some questions about example 4 of perlxstut

Replies are listed 'Best First'.
Re^3: some questions about example 4 of perlxstut
by syphilis (Archbishop) on Jul 01, 2019 at 11:17 UTC
    So what's the good way to generate XS (automatically) for access to a large source distribution?

    I don't know - it's not something I've done, and Example 4 would indicate that a large amount of hand-editing of the XS file that's generated by h2xs would be required.
    However, you might find something useful in perldoc Inline::C::Cookbook.
    For example there's a small section headed "Replacing h2xs" that seems to discuss this very issue, though it's thin on detail and I don't understand it.

    FAIRK, maybe that fiddly "Example 4" is, in fact, as good a way as any ?

    Cheers,
    Rob
Re^3: some questions about example 4 of perlxstut
by Anonymous Monk on Jul 02, 2019 at 07:25 UTC