Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

djberg96 (2603)

  (email not shown publicly)

Journal of djberg96 (2603)

Tuesday April 23, 2002
01:00 PM

hostname, mailhost

[ #4404 ]
Today I wrote another Ruby extension. This one was a simple module to get the hostname (ala Sys::Hostname), with the idea of adding a 'mailhost' method later. It's not portable yet, but I haven't a clue as to how you get the hostname in Windoze (via a C extension, anyway). Someone also pointed out that you could get the hostname using the socket module, but that seemed like overkill.

I'm really getting into extensions, as I'm starting to get back into C a little bit. I've also been seriously looking at XS code for the first time and stealing what I can for Ruby's sake. This has also made me see just how much cleaner and easier Ruby's C extensions are compared to Perl's (though Perl's is probably slightly easier still).

Now I'm wondering what extensions will be like in Perl 6, and if/how Parrot plays into all that.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.