in reply to Perl Error Messages Explained?

Use of uninitialized value
Perl tried to use the value of a variable, and found that the value was undef, so it displayed a warning;
in
Since this generic warning can be triggered at any point during perl execution, perl tells you what opcode it was executing at the time; this gives a clue as to the likely culprit:
method with known name
The particular opcode is OP_METHOD_NAMED; the above is the textual description of that particular op. This op used when the method name is known at compile time, such as:
$self->foo();
as opposed to for example
my $method = 'foo'; $self->$method();
which uses OP_METHOD instead.

Note that you won't get this particular warning from a simple $undefined_var->foo(), as perl will give you a specific warning in that case; so it's not clear to me how you're triggering that particular warning.

Dave.

Replies are listed 'Best First'.
Re^2: Perl Error Messages Explained?
by QM (Parson) on Jul 10, 2013 at 09:05 UTC
    This op used when the method name is known at compile time...

    Thanks, that's the nugget that failed to penetrate my noggin. The code line triggering this message,

    $self->{$Foo}{$Bar} = $self->{$Baz}{$undefined_scalar}->method;

    is syntactically the same as the real one (just the names changed to protect the guilty). I knew $undefined_scalar was the problem from the start, I just missed the hint about method names known at compile time versus those not known until run time. (Though I'm scratching my head to figure out when that wouldn't be patently obvious from the statement in question, but I suppose function references and other obscura can make for a hazy day.)

    At least my initial intuition was in the right direction...known at compile time is part of the context where the error/warning occurred.

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of