Group
Extension

Matches 2

Plack-App-ServiceStatus ( D/DO/DOMM/Plack-App-ServiceStatus-0.913.tar.gz, DOMM, 2024; MetaCPAN )
Plack-App-ServiceStatus/bin/plack_app_service_status_generate_buildinfo.pl ( view source; MetaCPAN )
!/usr/bin/env perl
use 5.010;
use strict;
use warnings;

# ABSTRACT: Script to generate buildinfo.json for Plack::App::ServiceStatus
# PODNAME: plack_app_service_status_generate_buildinfo.pl
our $VERS
se Pod::Usage;

my $man            = 0;
my $help           = 0;
my $buildinfo_file = "./buildinfo.json";
my $project_dir    = '';
GetOptions(
    'help|?'    => \$help,
    man         => \$man,
    "
Cannot write to $buildinfo_file: $!";

chdir($project_dir);

my $data = '{';    # just concat the JSON :-)

my $now = strftime( '%Y-%m-%dT%H:%M:%SZ', gmtime( time() ) );
$data .= qq{"date":"$now"};

m
Plack-App-ServiceStatus ( D/DO/DOMM/Plack-App-ServiceStatus-0.913.tar.gz, DOMM, 2024; MetaCPAN )
Plack-App-ServiceStatus/lib/Plack/App/ServiceStatus.pm ( view source; MetaCPAN )
ersion checks show_hostname buildinfo _buildinfo_data));

use Try::Tiny;
use Plack::Response;
use JSON::MaybeXS;
use Sys::Hostname qw(hostname);
use Module::Runtime qw(use_module);
use Log::Any qw($lo
ildinfo;
        if ( -f $buildinfo_file ) {
            $buildinfo =
              eval { decode_json( path( $buildinfo_file )->slurp_utf8 ) };
            if ($@) {
                $buildinfo = { st
self->show_hostname ? hostname() : '';

    my $app = sub {
        my $env = shift;

        my $json = {
            app                => $self->app,
            started_at_iso8601 => strftime( '%Y

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.