in reply to Perl Module Make Format Conversion.

...documentation doesn’t even touch the makefile.pl format needed for a swig generated project...
Really? What's http://www.swig.org/Doc1.3/Perl5.html then?

Anyway, I wouldn't go the SWIG route, I'd stick with plain XS (I can't remember ever successfully compiling a module wrapped with SWIG on win32).

For a quick comparison between XS and SWIG take a look at the swig version of String::Ediff and the XS version of the code. The intent of the module is to wrap a single C function.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: Perl Module Make Format Conversion.

Replies are listed 'Best First'.
Re: Re: Perl Module Make Format Conversion.
by Swordkeeper (Novice) on Mar 08, 2004 at 10:41 UTC
    That doesnt show how to make a perl module package, just the command line methodes used to make the raw .so file as I said above; Also I'm not worried about windows since flite doesnt compile well under it anyway, its broken as a operating system, and I avoidusing it as a general rule. Besides there are better speech synth stuff for windows. My goal is simply to provide interaction with flite from perl under linux based systems so that the blind may use it. And I have to use swig for this, I dont have a choice in the matter... besides all the XS tutorials I could find are writen for the person who understands it in mind.
      Try this. Create a directory called "say" and place the file say.i in it, along with Makefile.PL which should look like
      #!/usr/bin/perl -w - use strict; use ExtUtils::MakeMaker; system q[ swig -perl5 say.i ]; WriteMakefile( 'NAME' => 'say', # Name of package 'INC' => ' -I/usr/local/include/flite ', 'LIBS' => [ ' -llflite_cmu_us_kal -lflite_usenglish -lflite_cmulex -lflite + -lm ' ], # Name of custom libraries 'OBJECT' => 'say.o say_wrap.o', # Object files );
      Now, execute the commands
      • perl Makefile.PL
      • make
      • make install
      If all that works out as it should, you should now have a module called "say" installed, and you can go ahead and execute "make dist" which should create a file "say-0.01.tar.gz" suitable for uploading to cpan.

      If you do plan to upload this to cpan, I'd suggest thinking about a better name since all lowercase package names are generally reserved for pragmas.

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.