...$self->{&{\&{$testname}}}->($system); #system is hashref
The errors suggest that at some point you are invoking one of your methods without argument, thus $self is never initialized. Carp can be very helpful here for recovering the call stack where the error is actually happening, in the calling routine. You could also manually construct a relevant error using caller:Use of uninitialized value $self in concatenation (.) or string Can't call method "_idown" on an undefined value Can't call method "_idown" on an undefined value
sub method { my $self = shift or die join(", ", caller()), "\n"; ... }
If I've misdiagnosed the issue (which is plausible given how complex your invocation is), you probably want to learn How can I visualize my complex data structure?.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: how to call a sub via variable in library
by kennethk
in thread how to call a sub via variable in library
by glenn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |