my $x = eval 'class A { method foo($bar, $baz} }; A.new'; $x.foo();