The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DBIx::Perform::DigestPer - "Perform" screen file digester

Digests an Informixoid .per file and make a string suitable for writing to a file or just eval'ing.

The manual used as reference for the Perform scripting language is:

INFORMIX-SQL Reference, INFORMIX-SQL Version 6.0, April 1994, Part No. 000-7607

MODULE VERSION

0.04

SYNOPSIS

    use DBIx::Perform::DigestPer;
    $desc = digest(*INFILE_HANDLE);
    # now do the right thing with $desc

    shell>  perl -MDBIx::Perform::DigestPer -e'digest_file("foo.per")'
    # writes file foo.pps or named in 2nd argument.
    # now read and do the right thing with foo.pps

REQUIREMENTS

Data::Dumper

DESCRIPTION

Digests an Informix "Perform" screen descriptor file into a form usable by the Perform emulator Perform.pm. May be used inline or to write a file.

Among other things, it digests the screen layout into a series of Curses widget specs, as either Label or TextField types.

The output string/file is evaluable Perl source code, which sets four variables:

$db: name of database

$screen: screen descriptor, a hash including a Curses::Forms spec. Form fields' widgets are named as labelled (e.g. 'f000').

$tables: array of table names.

$attrs: hash of field names to [table column attributes] . The 'attributes' string is unparsed.

CHANGES from version 0.05: Total rewrite of the parsing of the "attribute" section, greatly expanded parsing of the "instructions" section.

User creates an intermediate file in YAML with "convert_per_to_yml" sub.

User runs DBIx::Perform on the .yml file.

Brenton Chapin, Martin Baer, et. al... Valtech (www.valtech.com)

digest

   digest (IOHandle_Ref)

Digests an Informix .per file into a string that evaluates to a Perform descriptor.

digest_file

digest_file input_filename [output_filename]

Reads the perform spec file, and writes a Perl Perform Spec file with the same basename but extension .pps unless an output filename is explicitly provided. Calls "digest" in this package to do the work.

It\'s a little clumsy, but one can do a command-line "digestion" by: perl -MDBIx::Perform::DigestPer -e'digest_file "foo.per"' . Maybe a top-level Perl or shell script should be made for this purpose.