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

[perl #124346] Respect perl6 in hashbang

Thread Next
From:
Leon Timmermans
Date:
April 19, 2015 13:53
Subject:
[perl #124346] Respect perl6 in hashbang
Message ID:
rt-4.0.18-24105-1429451601-1535.124346-75-0@perl.org
# New Ticket Created by  Leon Timmermans 
# Please include the string:  [perl #124346]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=124346 >


This is a bug report for perl from fawaka@gmail.com,
generated with the help of perlbug 1.40 running under perl 5.20.1.


-----------------------------------------------------------------

Currently, when perl tries to run a script and it encounters a hashbang
line not containing the string "perl" (e.g. /usr/bin/python), it will
instead run that executable. This works for most other languages, but for
perl6 this doesn't switch gracefully for obvious reasons.

The attached patch tries to fix that, so that #!perl6 files will DWIM.

-----------------------------------------------------------------
---
Flags:
    category=core
    severity=wishlist
---
Site configuration information for perl 5.20.1:

Configured by leon at Tue Oct 21 13:31:28 CEST 2014.

Summary of my perl5 (revision 5 version 20 subversion 1) configuration:

  Platform:
    osname=linux, osvers=3.13.0-37-generic,
archname=x86_64-linux-thread-multi
    uname='linux leon-laptop 3.13.0-37-generic #64-ubuntu smp mon sep 22
21:28:38 utc 2014 x86_64 x86_64 x86_64 gnulinux '
    config_args='-de -Dprefix=/home/leon/perl5/perlbrew/perls/perl-5.20.1
-Duseshrplib -DDEBUGGING -Dusethreads
-Aeval:scriptdir=/home/leon/perl5/perlbrew/perls/perl-5.20.1/bin'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.8.2', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
-lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=libc-2.19.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.19'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/home/leon/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib
-fstack-protector'


---
@INC for perl 5.20.1:

/home/leon/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux-thread-multi
    /home/leon/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1

/home/leon/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux-thread-multi
    /home/leon/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1
    .

---
Environment for perl 5.20.1:
    HOME=/home/leon
    LANG=en_US.UTF-8
    LANGUAGE=en_US:en
    LC_ADDRESS=en_US.UTF-8
    LC_IDENTIFICATION=en_US.UTF-8
    LC_MEASUREMENT=en_US.UTF-8
    LC_MONETARY=en_US.UTF-8
    LC_NAME=en_US.UTF-8
    LC_NUMERIC=en_US.UTF-8
    LC_PAPER=en_US.UTF-8
    LC_TELEPHONE=en_US.UTF-8
    LC_TIME=en_US.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)

PATH=/home/leon/.rakudobrew/bin:/home/leon/perl5/perlbrew/bin:/home/leon/perl5/perlbrew/perls/perl-5.20.1/bin:/home/leon/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
    PERLBREW_BASHRC_VERSION=0.71
    PERLBREW_HOME=/home/leon/.perlbrew
    PERLBREW_MANPATH=/home/leon/perl5/perlbrew/perls/perl-5.20.1/man

PERLBREW_PATH=/home/leon/perl5/perlbrew/bin:/home/leon/perl5/perlbrew/perls/perl-5.20.1/bin
    PERLBREW_PERL=perl-5.20.1
    PERLBREW_ROOT=/home/leon/perl5/perlbrew
    PERLBREW_VERSION=0.71
    PERL_BADLANG (unset)
    SHELL=/bin/bash

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