in reply to how to call a sub via variable in library
I don't know, maybe my tone in this thread was too harsh. But this line really made my head hurt. Understanding it requires the reader to remember several lines among the thousands of pages of Perl's documentation. Anyway, that line is better written as:
That will make it much easier to debug.my $key = do { no strict 'refs'; $testcase->(); # symbolic (string) reference }; $self->{$key}->($system);
|
|---|