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

Re: perl -V: list build options one per line?

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
December 8, 2015 17:31
Subject:
Re: perl -V: list build options one per line?
Message ID:
20151208183124.6d75604f@pc09.procura.nl
On Tue, 8 Dec 2015 15:22:09 +0000, Dave Mitchell <davem@iabyn.com>
wrote:

> Currently perl -V produces output like:
> 
> Characteristics of this binary (from libperl): 
>   Compile-time options: DEBUGGING HAS_TIMES MULTIPLICITY PERLIO_LAYERS
>                         PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV
>                         PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
>                         PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
>                         PERL_PRESERVE_IVUV PERL_TRACK_MEMPOOL PERL_USE_DEVEL
>                         USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
>                         USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
>                         USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME
>                         USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
> 
> which personally I find very hard visually to spot whether a particular
> option is there, particularly due to the mix of ' ' and '_'. I'd like to
> change it to something like:
> 
> Characteristics of this binary (from libperl): 
>   Compile-time options:
>     DEBUGGING
>     HAS_TIMES
>     MULTIPLICITY
>     PERLIO_LAYERS
>     PERL_COPY_ON_WRITE
>     PERL_DONT_CREATE_GVSV
>     PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
>     PERL_IMPLICIT_CONTEXT
>     PERL_MALLOC_WRAP
>     PERL_PRESERVE_IVUV
>     PERL_TRACK_MEMPOOL
>     PERL_USE_DEVEL
>     USE_64_BIT_ALL
>     USE_64_BIT_INT
>     USE_ITHREADS
>     USE_LARGE_FILES
>     USE_LOCALE
>     USE_LOCALE_COLLATE
>     USE_LOCALE_CTYPE
>     USE_LOCALE_NUMERIC
>     USE_LOCALE_TIME
>     USE_PERLIO
>     USE_PERL_ATOF
>     USE_REENTRANT_API
> 
> Any opinions?

I am slightly as that will take way too much screen lines. It
already has 50 lines. I do not want to scroll more (unnecessary)

Usually I know what I am looking for

Can -V be doubled to -VV to allow this? In which case every section
should list any special on a single line. That would cause the current
-V to double the line count to 97 lines

As a side note, this might break Config::Perl::V, but I should be able
to fix that when you decide to push this along

What you might want is a shell-alias that does something like

% perl -MConfig::Perl::V=myconfig -E'$a=myconfig->{build}{options};say for sort grep {$a->{$_}}keys%{$a}'
HAS_TIMES
MULTIPLICITY
PERLIO_LAYERS
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP
PERL_NEW_COPY_ON_WRITE
PERL_PRESERVE_IVUV
USE_64_BIT_ALL
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_LONG_DOUBLE
USE_PERLIO
USE_PERL_ATOF
USE_REENTRANT_API

--8<---
Summary of my perl5 (revision 5 version 22 subversion 0) configuration:

  Platform:
    osname=linux
    osvers=3.11.10-29-desktop
    archname=x86_64-linux-thread-multi-ld
    uname='linux tux 3.11.10-29-desktop #1 smp preempt thu mar 5 16:24:00 utc 2015 (338c513) x86_64 x86_64 x86_64 gnulinux '
    config_args='-Duse64bitall -Duselongdouble -Dusethreads -Duseithreads -des'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=define
    usemymalloc=n
    bincompat5005=undef
  Compiler:
    cc='ccache cc'
    ccflags ='-D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
    optimize='-O2'
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include'
    ccversion=''
    gccversion='4.8.1 20130909 [gcc-4_8-branch revision 202388]'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='long double'
    nvsize=16
    Off_t='off_t'
    lseeksize=8
    alignbytes=16
    prototype=define
  Linker and Libraries:
    ld='ccache cc'
    ldflags ='-L/pro/local/lib -fstack-protector'
    libpth=/usr/local/lib /usr/lib64/gcc/x86_64-suse-linux/4.8/include-fixed /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib /usr/lib /pro/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.18.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.18'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -L/pro/local/lib -fstack-protector'


Characteristics of this binary (from libperl):
  Compile-time options:
    HAS_TIMES
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
    PERL_IMPLICIT_CONTEXT
    PERL_MALLOC_WRAP
    PERL_NEW_COPY_ON_WRITE
    PERL_PRESERVE_IVUV
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_LONG_DOUBLE
    USE_PERLIO
    USE_PERL_ATOF
    USE_REENTRANT_API
  Built under linux
  Compiled at Jun  2 2015 08:31:41
  @INC:
    /pro/lib/perl5/site_perl/5.22.0/x86_64-linux-thread-multi-ld
    /pro/lib/perl5/site_perl/5.22.0
    /pro/lib/perl5/5.22.0/x86_64-linux-thread-multi-ld
    /pro/lib/perl5/5.22.0
    .
-->8---

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.23   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

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