I hope you're refering to your local copy of perlxstut - the copies on perlmonks are out of date. But indeed, the files generated with perl 5.8.6 are slightly longer and have more options and comments in them than the docs show, though it's not too spectacular.
I just tried the first example (adding the hello world function to the xs file) and it works fine for me. Here's what my Mytest.xs looks like (no changes required to any other file) update: I mean: just do what the tutorial says, and ignore small differences in the generated files compared to the docs:
MODULE = Mytest PACKAGE = Mytest
and the test script:
You should probably remember that XS is whitespace sensitive, especially with regards to the function prototypes.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||