package A; # stuff taken out sub get_write_file_func { my $self = shift; return $self->can("_write_file"); }