#!/usr/bin/perl -- -w =head1 NAME cmvcq.pl - Uses TK to create GUI windows to obtain metadata and files from the original CMVC AMS family used by the Enablement team from 1998 to 2016+ =head1 DEPENDENCIES/CONDITIONS 1. Requires TK and DB/SQL skills for development. =head1 FUNCTIONS : : =head1 HISTORY Original build 06/21/2016 Updates - / /201 - - =cut #*********************************************************************************************** # Set environment #------------------------------------------------------------------------------------------------ use Config ; # gets the version and directory architecture - used in BEGIN block BEGIN { # location of afs installed modules # NOTE: must place arch dependent location first to eliminate the arch name include # in the module name, e.g., x86_64-linux-thread-multi::Bundle::DBD::mysql $basedir = '/proj/pdkfc8/tools/perl' ; $version = $Config{'version'} ; # perl version $archname = $Config{'archname'} ; # os architecture print("version=$version, archname=$archname\n\n"); push @INC, "$basedir/lib/perl5/site_perl/$version/$archname" ; # at bottom of array push @INC, "$basedir/lib/perl5/site_perl/$version" ; # at bottom of array push @INC, "$basedir/lib64/perl5/site_perl/$version/$archname"; # at bottom of arra push @INC, "$basedir/lib64/perl5/site_perl/$version" ; # at bottom of array push @INC, "$basedir/lib64/perl5" ; # at bottom of array push @INC, "$basedir/share/perl5" ; # at bottom of array # use this when trying to install DBI and DBD::DB2 perl modules. DBD::DB2 would not install in aix push @INC, "$basedir/lib/site_perl/$version/$archname" ; # at bottom of array for aix } # print "\n\nlarry $version, $archname"; # exit; use DBI ; # database module use File::Basename ; # basepath module use Tk ; # TK gui module use Tk::Text ; # TK text widget use Tk::TableMatrix ; # used in $showSelection to show query results # There is a bug in the Tk TableMatrix widget using th Ctrl-mouse method to # select a row of data - it always select one less cell than the number of # rows in the table. Module creator gve me fix, so make sure you add it to # the the appropriate module - add changes and re-install. # # Following is from John Cerney who wrote the module: # It appears to be an issue with extended mode selection when the number of # rows in the table is less than the number of columns. It looks like an error # in finding the end of the row, using the max-row and not the max column number # in the code. This can be fixed by making a mod to the TableMatrix.pm file as # follows (diff -c output). # # *** TableMatrix.pm.bak Mon Jun 27 15:20:37 2016 # --- TableMatrix.pm Mon Jun 27 15:20:43 2016 # *************** # *** 769,775 **** # else # { # ## We're in a row header # ! $end = "$r,".$w->index('end','row'); # } # } # else # --- 769,775 ---- # else # { # ## We're in a row header # ! $end = "$r,".$w->index('end','col'); # } # } # else use Tk::BrowseEntry ; # used in $MakeSelectWIndow for @Choices use Tk::ProgressBar ; # not used use Tk::DateEntry ; # TK Calendar use Tk::TableMatrix::Spreadsheet ; # TK Calendar use Data::Dumper ; use List::Util qw(first); # for original attempt to determine if array had a value (abandoned use)