App-htidx

 view release on metacpan or  search on metacpan

lib/App/htidx.pm  view on Meta::CPAN


    open(my $fh, '>', $index) || die("$index: $!");

    my $title = sprintf('Directory listing of %s/', basename($dir));

    $fh->say('<!doctype html>');
    $fh->say(sprintf('<!-- %s -->', he(SIGNATURE)));
    $fh->say($H->open('html', {lang => 'en'}));

    $fh->say($H->head([
    $H->meta({charset => 'UTF-8'}),
        $H->title(he($title)),
        $H->meta({name => 'generator', content => sprintf('%s v%s', __PACKAGE__, $VERSION)}),
        $H->meta({name => 'viewport', content => 'width=device-width'}),
        $H->style(he($CSS)),
    ]));

    $fh->say($H->open('body', { class => 'htidx-body' }));

    $fh->say($H->h1($title));



( run in 0.428 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )