in reply to using a module created from C header file with h2xs

This works for me:
$ h2xs main.h $ mv main.h Main $ cd Main $ perl Makefile.PL $ make $ perl -Mblib \ -MMain=St_NetOnNorm,St_ProgMode,St_ProgEdit \ -E'say for St_NetOnNorm,St_ProgMode,St_ProgEdit' 1 2 4
The module exports the header symbols. Read a book about XS and the Perl documentation about exporting.

Replies are listed 'Best First'.
Re^2: using a module created from C header file with h2xs
by pashanoid (Scribe) on Jul 18, 2011 at 13:01 UTC

    ok, so then from within a script I would do $var=Main->St_NetOnNorm?