Writing C Modules with Inline::C
Modifying Makefile.PL
However, before I can get started, the generated Makefile.PL requires some modi 
fication to build an Inline::C module (see Listing 10 1).
Listing 10 1. Makefile.PL for Inline::C Version of Gnome::MIME
use Inline::MakeMaker;
WriteInlineMakefile(
                     NAME          => "Gnome::MIME",
                     VERSION_FROM  => "MIME.pm",
                     PREREQ_PM     => { Inline::C => 0.43 },
                      AUTHOR        =>  Sam Tregar  ,
                    );
This file is considerably different from the version created for XS. First, it starts 
by using a different MakeMaker module:
use Inline::MakeMaker;
Also, it calls WriteInlineMakefile() rather than WriteMakefile(). Inline::C 
modules use a different MakeMaker to allow them to be compiled and installed 
just like XS modules rather than being compiled the first time they're used. Also, 
notice that Inline::C is listed as a requirement in PREREQ_PM:
PREREQ_PM     => { Inline::C => 0.43 },
A future version of Inline::C will make it possible to build modules that do not 
depend on Inline::C, but at least for version 0.43 users of Inline::C based modules 
must also install Inline::C.
What's new isn't as notable as what's missing the calls to gnome config to set 
up LIBS and INC. This logic will still be needed by the module, but it will go in the 
module itself rather than living in the Makefile.PL.
Modifying MIME.pm
The configuration that was part of Makefile.PL in the XS version is now part of 
MIME.pm (Listing 10 2).
24
241
1






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

web hosting perl

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved