$p->handler(start => $start_handler,"tagname,attr,self"); my $start_handler = sub { # sub wie gehabt };