develooper Front page | perl.perl5.porters | Postings from November 2017

[perl #132459] Problem with DB::db_complete: Can't use string ("::")as a HASH ref while "strict refs" in use

From:
Ulrich Windl
Date:
November 16, 2017 22:05
Subject:
[perl #132459] Problem with DB::db_complete: Can't use string ("::")as a HASH ref while "strict refs" in use
Message ID:
rt-4.0.24-29624-1510869938-478.132459-75-0@perl.org
# New Ticket Created by  "Ulrich Windl" 
# Please include the string:  [perl #132459]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132459 >


This is a bug report for perl from Ulrich.Windl@rz.uni-regensburg.de,
generated with the help of perlbug 1.39 running under perl 5.18.2.


-----------------------------------------------------------------
[Please describe your issue here]
When using Perl with "use warnings" and "use strict", a TAB-completion
for array variable @loop_indices in the debugger fails with the following
message when used for the first time:

  DB<3> x @looCan't use string ("::") as a HASH ref while "strict refs" in =
use at /usr/lib/perl5/5.18.2/perl5db.pl line 9519.
 at /usr/lib/perl5/5.18.2/perl5db.pl line 9519.
    DB::db_complete('@loo', 'x @loo', 2) called at /usr/lib/perl5/vendor_pe=
rl/5.18.2/x86_64-linux-thread-multi/Term/ReadLine/Gnu/XS.pm line 574
    Term::ReadLine::Gnu::XS::_trp_completion_function('@loo', 0) called at =
/usr/lib/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi/Term/ReadLine/G=
nu.pm line 719
    Term::ReadLine::Gnu::AU::__ANON__[/usr/lib/perl5/vendor_perl/5.18.2/x86=
_64-linux-thread-multi/Term/ReadLine/Gnu.pm:719]('Term::ReadLine=3DHASH(0x2=
273828)', '\x{1}\x{1b}[4m\x{2}  DB<3> \x{1}\x{1b}[24m\x{2}') called at =
/usr/lib/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi/Term/ReadLine/G=
nu.pm line 331
    Term::ReadLine::Gnu::readline('Term::ReadLine=3DHASH(0x2273828)', '  =
DB<3> ') called at /usr/lib/perl5/5.18.2/perl5db.pl line 7287
    DB::readline('  DB<3> ') called at /usr/lib/perl5/5.18.2/perl5db.pl =
line 1832
    DB::_DB__read_next_cmd(undef) called at /usr/lib/perl5/5.18.2/perl5db.p=
l line 2747
    DB::DB called at -e line 1
Debugged program terminated.  Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.

When tried a second time, Perl quits, leaving the tty in raw state (need a
"stty sane"):

  DB<3> x @looCan't use string ("::") as a HASH ref while "strict refs" in =
use at /usr/lib/perl5/5.18.2/perl5db.pl line 9519.
END failed--call queue aborted at -e line 4209.
 at -e line 4209.

Cited line of perl5db.pl reads:
        push @out, map "$prefix$_", grep /^\Q$text/,
          ( grep /^_?[a-zA-Z]/, keys %$pack ),
          ( $pack eq '::' ? () : ( grep /::$/, keys %:: ) );

Finally, for the nerds, there is a compressed uuencoded typescript of a
sample session:



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About