use html::auth_dialog; my $tree = html::auth_dialog->new; $tree->highlander (auth_dialog => [ authed => sub { $_[0]->authenticated } not_authed => sub { 1 } ], $model ); print $tree->as_HTML;