Bug#839536: "do EXPR" no longer behaves as documented with '.' removed from @INC

Anthony DeRobertis anthony at derobert.net
Sat Oct 1 16:26:14 UTC 2016


Package: perl
Version: 5.24.1~rc3-3
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

perlfunc's documentation for "do EXPR" says:

    do EXPR Uses the value of EXPR as a filename and executes the contents of
            the file as a Perl script.

                do 'stat.pl';

            is largely like

                eval `cat stat.pl`;

But it's not like that eval at all, because do no longer searches the
current working directory. You now have to write:

    do './stat.pl'

That also means it's not really using the value of EXPR as a filename
(compare to, e.g., "open" which also takes a filename).

Surprisingly, even though the above works, this does not:

    do 'subdir/file.pl'

seems as if q{./} is doing something magical.

This breaks Config::Any::Perl, or at least a lot of usages of it that
used to work. Filing a bug there as well.

- -- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing'), (500, 'stable'), (130, 'unstable'), (120, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages perl depends on:
ii  dpkg               1.18.10
ii  libperl5.24        5.24.1~rc3-3
ii  perl-base          5.24.1~rc3-3
ii  perl-modules-5.24  5.24.1~rc3-3

Versions of packages perl recommends:
ii  netbase  5.3
ii  rename   0.20-4

Versions of packages perl suggests:
ii  libterm-readline-gnu-perl  1.34-1+b1
ii  make                       4.1-9
ii  perl-doc                   5.24.1~rc3-3

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iFwEARECABwFAlfv46YVHGFudGhvbnlAZGVyb2JlcnQubmV0AAoJEPs/iMJV6ln+
xuAAoIppFEN/qcYF0KlcBt8mGvh9yFoRAJ0aCVFKb7PvWhljJQYEyNtRpuuu3Q==
=1RHs
-----END PGP SIGNATURE-----




More information about the Perl-maintainers mailing list