Bug#718209: perl-base: m//p doesn't work if precompiled regex doesn't use it

brian m. carlson sandals at crustytoothpaste.net
Sun Jul 28 19:04:36 UTC 2013


Package: perl-base
Version: 5.18.0-3
Severity: normal
File: /usr/bin/perl

If a regex is precompiled with qr//, but without /p, and then used in
$text =~ /$pat/p, the ${^POSTMATCH} variable is undefined.  If I use
qr//p instead, everything works fine.  This did work in Perl 5.14, so I
expect that despite the bad style, it should work in Perl 5.18.

The attached test case will die in Perl 5.18.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages perl-base depends on:
ii  dpkg   1.17.0
ii  libc6  2.17-7

perl-base recommends no packages.

Versions of packages perl-base suggests:
ii  perl  5.18.0-3

-- no debconf information

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pl
Type: text/x-perl
Size: 632 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20130728/07f5ff6e/attachment.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20130728/07f5ff6e/attachment.sig>


More information about the Perl-maintainers mailing list