How can I implement a dispatch table using Perl objects?

Posted by bitbucket on Stack Overflow See other posts from Stack Overflow or by bitbucket
Published on 2010-05-26T22:03:21Z Indexed on 2010/05/27 4:11 UTC
Read the original article Hit count: 175

Filed under:
|
|

What is the syntax for the hash value for a Perl object member subroutine reference in a dispatch table?

use lib Alpha;

my $foo = new Alpha::Foo;

$foo->bar();

my %disp_table = ( bar => ??? );

I want ??? to be the code reference for $foo->bar().

© Stack Overflow or respective owner

Related posts about perl

Related posts about object