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

Thread Previous
From:
James E Keenan via RT
Date:
November 20, 2017 14:47
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-6198-1511189264-411.132459-15-0@perl.org
On Thu, 16 Nov 2017 22:05:38 GMT, Ulrich.Windl@rz.uni-regensburg.de wrote:
> 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:

Would you be able to attach a short Perl program which a reader could step through with the debugger and which would illustrate the problems you are encountering?

No more than 10 lines should be necessary.

Thank you very much.

-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=132459

Thread Previous


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