develooper Front page | perl.perl5.porters | Postings from September 2019

Re: [perl #134409] Perl intepreter exception on expressionsubstitution

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
September 9, 2019 11:38
Subject:
Re: [perl #134409] Perl intepreter exception on expressionsubstitution
Message ID:
20190909113847.GQ2245@iabyn.com
On Sat, Sep 07, 2019 at 07:14:51PM +0000, Chris Crook wrote:
> Hi
> 
> Here is the log resulting from adding the logging and exception handler.  This is still on perl 5.22.1. Also with this exception handler in place the program continued to run after hitting the panic condition and appeared to complete correctly.

Can you give me the output with he following updated instrumentation:


    use Devel::Peek;
    my $orig_v = $v;
    eval {$v =~ s/\{(\w+)\}/$lookup->{$1}/eg; };

    if ($@) {
        Dump($orig_v);
        Dump($v);
        Dump($1);
        Dump($lookup);
    }

or even better, if the loop isn't hit too many times:


    use Devel::Peek;
    Dump($v);
    eval {$v =~ s/\{(\w+)\}/$lookup->{$1}/eg; };

    if ($@) {
        Dump($v);
        Dump($1);
        Dump($lookup);
    }

So I can get an accurate picture of the contents of $v *before* the
substitution.

Thanks.


-- 
Monto Blanco... scorchio!

Thread Previous | 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