On Mon, 2004-04-19 at 16:59, Nick Ing-Simmons wrote: > Dirk Koopman <[EMAIL PROTECTED]> writes: > >> > > >> >$SBOL::ACCNO = $SYUS::LOGNAME; > >> > >> What doesn't exist? You have two packages and a variable in each package > >> there which of the four exist to perl. > > > >I express myself badly (not unusual). Yes, the variables exist and, even > >with strict on, cause no errors. I understand that both the packages > >(SBOL and SYUS) and the variables will have been auto-vivified in perl. > >However, the underlying 4GL(ish) will not be "connected". > > > >The real question is: whether I can intercept the process of > >vivification to do the necessary tying between the perl variable name > >and the actual underlying 4GL(ish) variable. > > I am still having difficulty with your "jargon" > What is 4GL?
A programming sub system that allows one to write screen based programs quickly. It defines variable names (attributes) in files (tables in SQL speak). It does this in a Data Dictionary (DD). In order to do this, it allocates a memory buffer, into which it reads records (rows). You access the variables (attributes) using names like SBOL.ACCNO. > How essential is it that perl code looks like: > > >> >$SBOL::ACCNO = $SYUS::LOGNAME; > Pretty much essential. > Would explict (exported) hash : > > $SBOL{ACCNO} = $SYUS{LOGNAME}; > > do? > No, but how does this help? > 'tie' of %SBOL and %SYUS is much easier than > quasi-tie of %main::SBOL:: (the symbol table). > The tie to %main::SBOL:: only has to be in existance until the first reference to a variable. After that, I anticipate defining (thus tying) *all* the variables defined in the DD for that file. This is an acceptable overhead. Then I would want to untie %main::SBOL:: because its job is now done. > Or another trick that has been used is to overload (say) the '.' operator > > $SBOL::ACCNO = $SYUS.LOGNAME; > > but that only works on rhs. This would only be acceptible if $SBOL were global to all packages all the time (and you cannot guarantee an Export being done in advance) AND if it worked on the lhs as well. So erm... no.