in reply to Inline::C in a Perl module

It is DLDtest.pm that needs to return the true value. Just insert

1;
at the end of that file.

See also Perl Module ending without 1;

Replies are listed 'Best First'.
Re^2: Inline::C in a Perl module
by pryrt (Abbot) on Sep 18, 2017 at 19:29 UTC

    Specifically, because __DATA__ ends the perl, the 1; needs to go before the __DATA__:

    ... use Inline "C"; Inline->init; 1; __DATA__ __C__ ...

    update: for example, Inline: "More about the DATA Section". That also gives examples of doing the source code as a heredoc (look for << on the page), where you could then have perl after the Inline source code as well.

      Well, darn. It's easy once you know the answer.

      Thank you

      Opps, my bad, you are so right!