Devel::PPPort

Devel::PPPort is a Perl/Pollution/Portability.
Download

Devel::PPPort Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Marcus Holland-Moritz
  • Publisher web site:
  • http://search.cpan.org/~mhx/Devel-PPPort-3.11/PPPort.pm

Devel::PPPort Tags


Devel::PPPort Description

Devel::PPPort is a Perl/Pollution/Portability. Devel::PPPort is a Perl/Pollution/Portability.SYNOPSIS Devel::PPPort::WriteFile(); # defaults to ./ppport.h Devel::PPPort::WriteFile('someheader.h');Perl's API has changed over time, gaining new features, new functions, increasing its flexibility, and reducing the impact on the C namespace environment (reduced pollution). The header file written by this module, typically ppport.h, attempts to bring some of the newer Perl API features to older versions of Perl, so that you can worry less about keeping track of old releases, but users can still reap the benefit.Devel::PPPort contains a single function, called WriteFile. Its only purpose is to write the ppport.h C header file. This file contains a series of macros and, if explicitly requested, functions that allow XS modules to be built using older versions of Perl. Currently, Perl versions from 5.003 to 5.9.4 are supported.This module is used by h2xs to write the file ppport.h.Why use ppport.h?You should use ppport.h in modern code so that your code will work with the widest range of Perl interpreters possible, without significant additional work.You should attempt older code to fully use ppport.h, because the reduced pollution of newer Perl versions is an important thing. It's so important that the old polluting ways of original Perl modules will not be supported very far into the future, and your module will almost certainly break! By adapting to it now, you'll gain compatibility and a sense of having done the electronic ecology some good.How to use ppport.hDon't direct the users of your module to download Devel::PPPort. They are most probably no XS writers. Also, don't make ppport.h optional. Rather, just take the most recent copy of ppport.h that you can find (e.g. by generating it with the latest Devel::PPPort release from CPAN), copy it into your project, adjust your project to use it, and distribute the header along with your module.Running ppport.hBut ppport.h is more than just a C header. It's also a Perl script that can check your source code. It will suggest hints and portability notes, and can even make suggestions on how to change your code. You can run it like any other Perl program: perl ppport.h It also has embedded documentation, so you can use perldoc ppport.hto find out more about how to use it. Requirements: · Perl


Devel::PPPort Related Software