App-unbelievable

 view release on metacpan or  search on metacpan

lib/App/unbelievable/CLI.pm  view on Meta::CPAN

    require File::Temp;

    # TODO get CPU count per
    # https://gist.github.com/aras-p/47e2252d6b1fa57d3619fd8e021690ec

    # List the routes
    # TODO get all GET routes from app
    my @routes;

    # Get and filter the routes from /content.
    push @routes, File::Find::Rule->readable->file->not_name('.*')->relative
                    ->in(_here('content'));
    if($opts->{route_style} eq 'htmlfile') {
        s{\.[^\.]+$}{.html} foreach @routes;
    } elsif($opts->{route_style} eq 'dir') {
        s{\.[^\.]+$}{/} foreach @routes;
    } else {
        die "Unknown route style $opts->{route_style}";
    }

    # public/ --- all files appear just as they are, sans leading /public



( run in 0.300 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )