develooper Front page | perl.perl5.porters | Postings from April 2012

Who stole my $^H cheese?

Thread Next
From:
Craig A. Berry
Date:
April 4, 2012 20:46
Subject:
Who stole my $^H cheese?
Message ID:
EC174456-4274-4171-B9F0-8686EF19C202@mac.com
The symptom is that 'use strict' now turns on the vmsish pragmas, and actually it's no mystery whodunnit.  With

$ perl -v

This is perl 5, version 15, subversion 9 (v5.15.9-65-g8928fb8) built for VMS_IA64
<snip>

I get:

$ perl -e "my $x = system('exit 44'); print $x;"
1024
$ perl -e "use strict; my $x = system('exit 44'); print $x;"
1024
$ perl -e "use vmsish 'status'; my $x = system('exit 44'); print $x;"
44

but with:

$ mcr sys$disk:[]miniperl -"Ilib" -"V"
Summary of my perl5 (revision 5 version 15 subversion 9 patch v5.15.9-73-g57ef7c8) configuration:
  Snapshot of: 57ef7c84d0edb2d2e89bbab264bcdfaf37312a51
<snip>

I get:

$ mcr sys$disk:[]miniperl.exe -"Ilib" -e "my $x = system('exit 44'); print $x;"
1024
$ mcr sys$disk:[]miniperl.exe -"Ilib" -e "use strict; my $x = system('exit 44'); print $x;"
44
$ mcr sys$disk:[]miniperl.exe -"Ilib" -e "use vmsish 'status'; my $x = system('exit 44'); print $x;"
44

The middle case demonstrates that strictures now enable the C<vmsish 'status'> pragma.  d1718a7cf54f01c3c9d449a1ea96c9bba32d1126 with commit message starting "[perl #111462] Move strict hints from %^H to $^H" added the following lines to strict.pm:

+my %explicit_bitmask = (
+refs => 0x20000000,
+subs => 0x40000000,
+vars => 0x80000000
+);
...
-           $^H{"strict/$s"} = undef;
+           $^H |= $explicit_bitmask{$s};

But it looks like the values claimed here for subs and vars are already taken (and have been for a long time):

% grep HINT_M_VMSISH vms/*.h
#define HINT_M_VMSISH_STATUS	0x40000000 /* system, $? return VMS status */
#define HINT_M_VMSISH_TIME	0x80000000 /* times are local, not UTC */
#define VMSISH_STATUS	TEST_VMSISH(HINT_M_VMSISH_STATUS)
#define VMSISH_TIME	TEST_VMSISH(HINT_M_VMSISH_TIME)

The build on VMS is broken by this because make_ext.pl enables strictures, which are now equivalent to enabling both "vmsish 'status'" and "vmsish 'exit'", making unixy exit statuses that were formerly successful now fail.  Could we please choose different hunks of the hints that don't clobber hunks already in use?

Full details of the failing configuration:

$ mcr sys$disk:[]miniperl.exe -"Ilib" -"V"                                                
Summary of my perl5 (revision 5 version 15 subversion 9 patch v5.15.9-73-g57ef7c8) configuration:
  Snapshot of: 57ef7c84d0edb2d2e89bbab264bcdfaf37312a51
  Platform:
    osname=VMS, osvers=V8.4, archname=VMS_IA64-thread-multi
    uname='VMS alma V8.4 HP rx2600  (1.50GHz/6.0MB)'
    config_args='-"des" -"Dusedevel" -"Dusethreads"'
    hint=none, useposix=false, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=undef, bincompat5005=undef
  Compiler:
    cc='CC/DECC', ccflags ='/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj /NOANSI_ALIAS/float=ieee/ieee=denorm/NAMES=(SHORTENED)/Define=_USE_STD_STAT=1',
    optimize='/NoList',
    cppflags='undef'
    ccversion='70390020', gccversion='', gccosandvers='undef'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='Link/nodebug', ldflags ='/NoTrace/NoMap'
    libpth=/sys$share /sys$library
    libs= 
    perllibs= 
    libc=(DECCRTL), so=exe, useshrplib=true, libperl=undef
    gnulibc_version='undef'
  Dynamic Linking:
    dlsrc=dl_vms.c, dlext=exe, d_dlsymun=undef, ccdlflags=''
    cccdlflags='', lddlflags='/Share'


Characteristics of this PERLSHR image: 
  Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
                        PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_EXTERNAL_GLOB PERL_IMPLICIT_CONTEXT
                        PERL_IS_MINIPERL PERL_MALLOC_WRAP PERL_PRESERVE_IVUV
                        USE_IEEE USE_ITHREADS USE_LARGE_FILES USE_LOCALE
                        USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
                        USE_REENTRANT_API USE_SITECUSTOMIZE VMS_DO_SOCKETS
                        VMS_SHORTEN_LONG_SYMBOLS
  Locally applied patches:
	SMOKE57ef7c84d0edb2d2e89bbab264bcdfaf37312a51
  Built under VMS
  Compiled at Apr  4 2012 07:39:50
  %ENV:
    PERLSHR="PERL_ROOT:[000000]PERLSHR.EXE"
    PERL_CORE="1"
    PERL_ROOT="DSA0:[VMS$COMMON.PERL-5_12_3.]"
  @INC:
    mda0:[smoke.blead.cpan.AutoLoader.lib]
    mda0:[smoke.blead.dist.Carp.lib]
    mda0:[smoke.blead.dist.Cwd]
    mda0:[smoke.blead.dist.Cwd.lib]
    mda0:[smoke.blead.dist.ExtUtils-Command.lib]
    mda0:[smoke.blead.dist.ExtUtils-Install.lib]
    mda0:[smoke.blead.cpan.ExtUtils-MakeMaker.lib]
    mda0:[smoke.blead.dist.ExtUtils-Manifest.lib]
    mda0:[smoke.blead.cpan.File-Path.lib]
    mda0:[smoke.blead.ext.re]
    mda0:[smoke.blead.dist.Term-ReadLine.lib]
    mda0:[smoke.blead]lib
    .
$ 

________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser


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