On Tuesday, February 15, 2005, at 02:21PM, John E. Malmberg <[EMAIL PROTECTED]> wrote:
>It appears that the VMS specific file name behavior is tied to many perl >scripts that are checking the ^O for 'VMS'. > >What I would like to investigate is having a option where a symbol or >logical name could be used by the init and pre-init code in VMS.C >to change the ^O to report 'GNV'. That same feature would also cause >the DECC feature settings to go to full UNIX/POSIX filename compatibility >mode. The global PL_osname is set in S_init_predump_symbols in perl.c, which is called from S_parse_body when a Perl script is compiled. If you put in your own value in start-up code, I'm pretty sure it will get overwritten later. You could stick some code in S_init_predump_symbols to check for a logical name and reset accordingly. That might be a little dangerous since we don't really know what side effects there might be to dynamically changing the OS name. If you can live with configuration time changes, look for $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE") in configure.com and modify it to say whatever you want. >In investigating why the first standard test for symlinks on perl was >failing, it turns out that the fast_abs_path() and abs_path() call VMS >specific code including using rms calls to return the path. This >existing code does not know how to follow a symbolic link to the >real path, and since other code calls those same routines that should >not return a real path, but the link value, a new routine would be needed >for the abs_path routines to use. > >Alternatively, symbolic links virtually require UNIX/POSIX path names to >function, which means that they are most likely only to be used in a >full POSIX environment. > >It looks like when Perl does not recognize the value of ^O, it defaults >to POSIX/UNIX behavior on file handling. > >I have not found out yet how to read or change the value of ^O from C, as >it seems to only be set by config.pm, and I am not sure if config.pm is >used after Perl is built. > >If anyone has any suggestions on an easy way to do this, please let me >know. > >Thanks, >-John >[EMAIL PROTECTED] >Personal Opinion Only > > >