my $object = Product::create( $data_ref ); if ($object->isa('Product::Real')) { &call_real_product_api( $object ); } else { &call_potential_product_api( $object ); } #### if (Product::isa_Real_Object( $data_ref )) { &call_real_product_code( $data_ref ); } else { &call_potential_product_code( $data_ref ); }