Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Using module with c code in perl program.

by Anonymous Monk
on Dec 21, 2015 at 20:10 UTC ( #1150884=note: print w/replies, xml ) Need Help??


in reply to Using module with c code in perl program.

You should read the documentations of Inline itself:
In case you've forgotten, the DATA pseudo file is comprised of all the text after the __END__ or __DATA__ section of your program. If you're working outside the main package, you'd best use the __DATA__ marker or else Inline will not find your code.
perldata might also be of interest:
For compatibility with older scripts written before __DATA__ was introduced, __END__ behaves like __DATA__ in the top level script (but not in files loaded with "require" or "do") and leaves the remaining contents of the file accessible via "main::DATA".
use says:
use Module LIST... is exactly equivalent to
BEGIN { require Module; Module->import( LIST ); }
except that Module must be a bareword.

Replies are listed 'Best First'.
Re^2: Using module with c code in perl program.
by stevieb (Canon) on Dec 21, 2015 at 20:20 UTC
    Awesome. I was hoping for a proper explanation.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1150884]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2023-03-20 13:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (59 votes). Check out past polls.

    Notices?