NAME
DBIx::Informix::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.
MODULE VERSION
0.0.1
SYNOPSIS
use DBIx::Informix::Perform::DigestPer;
$desc = digest(*INFILE_HANDLE);
# now do the right thing with $desc
shell> perl -MDBIx::Informix::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.
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::Informix::Perform::DigestPer -e'digest_file "foo.per"' . Maybe a top-level Perl or shell script should be made for this purpose.