+sub oneshot {
+ my ($ctx, $code, $strref) = @_;
+ my $self = bless {
+ ctx => $ctx,
+ base_url => base_url($ctx),
+ }, __PACKAGE__;
+ [ $code, [ 'Content-Type', 'text/html; charset=UTF-8' ], [
+ _html_top($self), $strref ? $$strref : (), _html_end($self)
+ ] ]
+}
+