my $callback = sub { ... }; HTML::LinkExtor->new($callback);