App-PerinciUtils

 view release on metacpan or  search on metacpan

script/peri-htserve  view on Meta::CPAN


    # display hint for user
    if (@root_urls) {
        my @ep_urls; # api endpoints
        for my $root_url (@root_urls) {
            for my $pkg (@pkgs) {
                my $pkgp = $pkg; $pkgp =~ s!::!/!g;
                push @ep_urls, $root_url . "api/$pkgp/";
            }
        }
        say "Try accessing one of the following URLs with curl/riap/etc:";
        print map { "- $_\n" } @ep_urls;
        say "";
    }

    push @argv, "-D" if $args{daemonize};
    my $runner = Plack::Runner->new;
    $runner->parse_options(@argv);
    $runner->run($app);

    # never reached though
    [200, "OK"];
}

script/peri-run  view on Meta::CPAN

            if ($opt eq '--library' || $opt eq '-I') {
                require Complete::Module;
                return Complete::Module::complete_module(word=>$word);
            }
        }
    },
    'library|I=s' => $opts{library},
    'help|h|?' => \$opts{help},
    'version' => sub {
        no warnings 'once';
        say "peri-run version " . ($main::VERSION // 'dev');
        exit 0;
    },
    'subcommand|s=s' => $opts{subcommands},
    'pass-cmdline-object|o' => \$opts{pass_cmdline_object},
);

my $me = $0; $me =~ s!.+/!!;

my $oscs = $opts{subcommands};
if ($opts{help} || !@ARGV && !@$oscs) {



( run in 2.276 seconds using v1.01-cache-2.11-cpan-d7a12ab2c7f )