in reply to Dereference of undefined value OK under strictures?

I tried -MO=Deparse and -d options, passing them through system function however these did not provide any deeper understanding from my standpoint.

I maybe need to try passing some -D flags.

I've recently begun using padre with strawberry perl, and I am informed to Recompile perl with -DDEBUGING to use -D switch.

update: -Mdiagnostics=-verbose with debugger steps through some functions in the diagnostics module, such as diagnostics::death_trap and then splain's the error as:

Can't use an undefined value as an ARRAY reference at -e line 2 (#1) (F) A value used as either a hard reference or a symbolic reference must be a defined value. This helps to delurk some insidious errors. Uncaught exception from user code: Can't use an undefined value as an ARRAY reference at -e line 2. at -e line 2

But this doesn't necessarily get to the l-value derivation of the issue. Also the -traceonly option only prints the uncaught exception part without the useful diagnostic provided pre-amble.

Replies are listed 'Best First'.
Re^2: Dereference of undefined value OK under strictures?
by LanX (Saint) on Jun 30, 2019 at 00:46 UTC
    > But this doesn't necessarily get to the l-value derivation of the issue

    From perlglossary#autovivification

    • autovivification
    A Graeco-Roman word meaning “to bring oneself to life”. In Perl, storage locations (lvalues) spontaneously generate themselves as needed, including the creation of any hard reference values to point to the next level of storage.

    Hence it's not undefined anymore when strict refs start checking.

    Hth

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      Thank you, yes the autovivication entry is informative and useful.

      Rather I meant that for one or another reason the debugger steps over each line in both programs. Whereas I would like to explicitly step into the print function or subroutine call to expose for example, the lvalue determinations or aliasing operations. Although on a preliminary read-through of the docs that may be out of scope for the debugger.

        The debugger is IMHO operating on a statement level.

        IOW the interpreter is calling the debugger routines for every semicolon (roughly).

        The OP tree has an entry for every statements start holding all meta inf like line numbers.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice