|Previous||Table of Contents||Next|
8.4 Custom Perls
Back in the wild and woolly days of Perl 4, integrating custom C code into Perl took sweat, ingenuity, and guts. Whereas in Perl 5 custom binary code can be dynamically loaded faster than you can say "perldoc perlxs," in Perl 4 you had to build a special version of perl that contained the new code you wanted. You would edit some template files to load the new source files that you placed in the right subdirectory, and make perl from source all over again.
To keep this and other custom perls separate from the unaltered, common or garden-variety perl, it was customary to give them different names depending on what functionality had been added. Thus, a perl that had Oracle database intelligence embedded would be called oraperl. A perl that knew how to speak the Lightweight Directory Access Protocol (LDAP) to an X.500 directory user agent would be called duaperl. (Theoretically, a perl that had both capabilities ought to have been called oraduaperl or duaoraperl, but I never heard of this happening.)
Once Perl 5 appeared on the scene with dynamic loading of shared libraries (or DLLs), these custom perls were consigned to the scrap heap of history. Unfortunately, legacy code might still be using these relics of a bygone era ; that's why they call it "legacy." Here is a guide to common types of custom perl and what to do with them.
Btreeperl, by John Conover, was for interfacing with BSD NDBM database files. No compatibility mode module was written, but the NDBM_File module, bundled in the core as of Perl 5.8.0, supplies a cleaner tied interface to NDBM files.
8.4.2 Cisamperl / rocisperl
Cisamperl, by Mathias Koerber, was for accessing Informix C-ISAM files. No DBD module exists because the interface does not use SQL. The closest compatibility mode is Philippe Chane You Kaye's Isam module (http://search.cpan.org/dist/Isam/).
Ctreeperl, by John Conover, was for accessing Faircom c-tree databases. Robert Eden's Db::Ctree module (http://search.cpan.org/dist/Db-Ctree/) is a close object-oriented translation. However, there is no DBD module.
Duaperl, by Eric Douglas, was for accessing X.500 directory servers via LDAP (DUA is a directory user agent in X.500 terminology). Stephen Pillinger made a Perl 5 module (http://search.cpan.org/dist/Dua/) that, while not providing an exact emulation mode (it is object-oriented), does have a one-to-one correspondence between its methods and the duaperl functions. It is, however, quite old, unsupported, and does not build without expert attention. You can migrate programs to more maintainable code by changing them to use Graham Barr's Net::LDAP (http://search.cpan.org/dist/perl-ldap/) instead.
8.4.5 Ingperl / sqlperl
Ingperl (also called sqlperl), by Ted Lemon, was for accessing Ingres databases. Henrik Tougaard maintains an emulation module, Ingperl, in the DBD-Ingres distribution (http://search.cpan.org/dist/DBD-Ingres/). You can migrate programs to more maintainable code by changing them to use his DBD::Ingres module in the same distribution.
Interperl, by Buzz Moschetti, was for accessing Interbase databases. Edwin Pratomo's DBD::Interbase (http://search.cpan.org/dist/DBD-InterBase/) fulfills the same purpose. There is no compatibility module.
Sometimes inaccurately referred to as infoperl, this module by Bill Hails was for accessing Informix databases. No compatibility module was ever written. DBD::Informix, by Jonathan Leffler, handles the functionality for Perl 5.
Oraperl, by Kevin Stock, was for accessing Oracle databases. You can use the Oraperl module in Tim Bunce's DBD-Oracle distribution (http://search.cpan.org/dist/DBD-Oracle/Oraperl.pm), which provides an emulation mode allowing you to port old oraperl programs to run under new perls. You can migrate programs to more maintainable code by changing them to use DBD::Oracle (http://search.cpan.org/dist/DBD-Oracle) instead.
Pgperl, by Igor Metz, was for accessing Postgres databases. There appears to be no emulation module; the closest equivalent is the Pg module in Edmund Mergl's pgsql distribution (http://search.cpan.org/dist/pgsql_perl5/Pg.pm). The migration path to more maintainable code is via his DBD::Pg (http://search.cpan.org/dist/DBD-Pg/).
Sybperl was for accessing Sybase databases. Michael Peppler maintains an FAQ [PEPPLER02]. You can use his CPAN module Sybase::Sybperl (http://search.cpan.org/search?dist=sybperl), which provides an emulation mode that allows old sybperl programs to run under new perls. The migration path to more maintainable code is via DBD::Sybase (http://search.cpan.org/dist/DBD-Sybase/), by the same author.
In a break from the relentless stream of database-specific perls, tkperl, by Malcolm Beattie, was for creating Tk graphical user interfaces. It has been superseded by Nick Ing-Simmons' Perl/Tk (http://search.cpan.org/dist/Tk/). See [LIDIE02].
Uniperl, by Rick Wargo, was for accessing Unify databases. H. Merijn Brand's DBD::Unify (http://search.cpan.org/dist/DBD-Unify/) brings that capability to Perl 5, and also contains a Uniperl.pm module providing backward compatibility with uniperl.
|Previous||Table of Contents||Next|