# Make the Circle area() method add it to the Circle PerlBean use PerlBean::Method; my $area_circle = PerlBean::Method->new( { method_name => 'area', body => <get_radius() ); EOF } ); $circle->add_method( $area_circle );