package MyParser; use HTML::Parser; @MyParser::ISA = qw( HTML::Parser ); sub text { # do what you will here }