sub MY::makefile { return "# removed" } #### package MY; sub c_o { my $inherited = shift->SUPER::c_o(@_); $inherited =~ s/old text/new text/; $inherited; } #### sub MY::c_o { my $self = shift( @_ ); # get our MM object local *c_o; # localize to inside our current scope at runtime. my $inherited_text = $self->MM::c_o( @_ ); # any other args get passed to # the "stock" MM method (there # generally are none). $inherited_text =~ s/old text/new text/; # do vengeance on those who have # wronged us. return $inherited_text; # a return of a scalar whose value is just a # (probably multi-line) string. }