develooper Front page | perl.perl5.porters | Postings from December 2000

Re: [ID 20001214.011] Unreachable value in a search list logicalname

Thread Previous | Thread Next
From:
Peter Prymmer
Date:
December 14, 2000 12:09
Subject:
Re: [ID 20001214.011] Unreachable value in a search list logicalname
Message ID:
Pine.OSF.4.10.10012141159020.57557-100000@aspara.forte.com

In a recent perlbug report listed at:

http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-12/msg00755.html

coucoureux.p@fr.ibm.com noted that:

> In a search list logical name with more than 7 values, the last
> values are not reachable.
> 
> Example:
> $ Define STORY  once,upon,a,time,there,was,a,little,girl,with
> $ perl -e "for ($i = 0; $i <= 9; $i++) " -
> _$ -e "{ print $ENV{'story;'.$i},' '}"
> once upon a time there was a little

Which I can reproduce even with older perls.  It seems as though this is
a limitation that DECC imposes on its interface to the $trnlnm() system
service.  The translation done by perl is carried out in the my_trnlnm()
routine in perl_root:[vms]vms.c.  Where you'll note that search list
translation does not exceed LNM$_MAX_INDEX translations.  That parameter
is defined in lnmdef.h (a module to be found in the
SYS$LIBRARY:SYS$STARLET_C.TLB header library) on my older V5.5-002 I have
this definition:

#define LNM$_MAX_INDEX 7                /* Maximum translation index */

I am not sure why DECC imposes this limitation.  Obviously DCL's SHOW
LOGICAL command can access the remaining search list items:

$ show log story
   "STORY" = "ONCE" (LNM$PROCESS_TABLE)
        = "UPON"
        = "A"
        = "TIME"
        = "THERE"
        = "WAS"
        = "A"
        = "LITTLE"
        = "GIRL"
        = "WITH"

So the "stop at 7" bug in DECC ought to be worked around by vmsperl.

If you are in an especially adventurous mood you might try adding a
redefinition:

#undef LNM$_MAX_INDEX
#define LNM$_MAX_INDEX 21

at some point in vms.c then recompile your perl binary (although you may
invoke access violations that way too so caution with such an
experimental binary would be highly advised).

I have Cced this reply to the vmsperl list where some discussion of
logical name translation has recently been discussed.

Peter Prymmer



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About