The Linux Foundation

 
LsbPerl

From The Linux Foundation

Revision as of 18:09, 10 March 2010 by Nixscripter (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)

Contents

Perl for LSB

Perl is a LsbInterpretedLanguage, so it will need to address similar issues.

What are the developer issues that might be helped by some sort of standard?

Language Syntax

There is an extensive test suite for Perl 5. The only issue is that it can test perl only before it's installed; it's possible to adapt it to test an already installed perl, but nobody found the motivations or the tuits to do this until now. (this should not be be a huge work, though).

Update: Test suite has been packaged for runtime now.

Standard Library

Perl comes with an rather large standard library, and with a utility, perlivp(1) (Perl Installation Verification Procedure) to check that all modules and extensions are available.

Also, some modules that come with Perl will be built and installed only if the corresponding libraries are present on the system. For example, is libdb available for the DB_File module ? These prerequisites need to be defined.

Perl Configuration

Perl can be configured with or without support for threads, for large files, for 64-bit integers on 32-bit machines. Which of those options are to be specified in the LSB ? What would be the recommended values ? (Perhaps, for example, support for threads could be side-stepped, for stability issues, knowing that very few Perl applications actually use threads.)

P5P probably needs to liase with LSB to define the base configuration.

Existing Specification

Closest thing I find to a specification-type document is here. There is also a C API document

Upstream Contacts

Upstream development mail list where some discussion has taken place.

Links

Version Compatibility

(quoted from the mail list):

FWIW, Perl is supposed to have binary backward compatibility within a major version (e.g. 5.8.x), but not across major versions (e.g. 5.10 vs. 5.8). Forward compatilibity is not guaranteed at all (e.g. building a module with 5.8.8 to run with perl 5.8.7).

Perl does have syntax for version handling, which many modules already use:

  require v5.6.1;	# run time version check
  require 5.6.1;	# ditto
  require 5.006_001;	# ditto; preferred for backwards compatibility

Deprecation Policy

A deprecation warning is introduced, and the feature is removed in the next major version. (that is, 5.[n+2].*)

Impressions from the list discussion

  • Perl community is interested in LSB, but few resources to commit to work on it.
  • There doesn't seem to be much interest in creating a language spec (Historically Perl has always been specified as (roughly) 'whatever the Perl interpreter interprets'.)
  • There is a person (Andy Armstrong) working on perl's TAP (testanything) parser, willing to work on a TAP<->TET converter, which could possibly be used to reformat the test suite output.
    • UPDATE: This converter is published now here
  • Seems the majority opinion is to specify a perl interpreter version foo exists at /usr/bin/perl and it passes the test suite. (An informal audit of several Linux distros I have installed point to v5.8.8 being the most common).
  • I'm doing some initial work on the test suite now, looking at how to package it to test the installed perl, based on ideas from here.
  • Suggested list of core perl and extensions to test for.

Distribution Version Survey

Distribution Perl Version
Mandriva CS4 5.8.7
Mandriva 2007.1 5.8.8
Debian 4 5.8.8
RHEL 5 5.8.8
FC6 5.8.8
SLES10 5.8.8
Ubuntu 6.10 5.8.8


Current Status

  • A test package has been committed to bzr.
  • There are a total of 363 tests, with 50375 subtests.
    • UPDATE: now 416 tests (added Math::BigInt, Math::BigFloat, Math::BigRat perl a request on perl5-portes)
    • UPDATE: 973 tests, with 102053 subtests, as of June 22, 2007

Proposed LSB Specification

Specification

Runtime Test

noarch rpm
source rpm
bzr

Test Results/Analysis on various runtimes

LsbTestPerl32Results

Application Test

noarch rpm
source rpm
bzr


[Article] [Discussion] [View source] [History]