class 'Idiot', { public => { string => [ qw( name title ) ], int => [ qw( score ) ], }, types => { string => STD::VARCHAR(80), int => STD::INTEGER, } }; sub Idiot::talk : method { my $this = shift; use IO::Extended qw(:all); printfln "I am %s and stupid", $this->name; } my $murat = new Idiot name => 'murat', title => 'Mr.', score => 10; $murat->talk;