Skip Menu |

This queue is for tickets about the Server-Control CPAN distribution.

Report information
The Basics
Id: 79008
Status: resolved
Priority: 0/
Queue: Server-Control

People
Owner: Nobody in particular
Requestors: RSAVAGE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.19
Fixed in: (no value)



Subject: Doc error: error_log does not default if log_dir defined
Hi See attached local.application.pl. error_log is commented out, but: Attribute (error_log) does not pass the type constraint because: Validation failed for 'Str' with value undef at reader Server::Control::error_log (defined at /home/ron/perl5/perlbrew/perls/perl- 5.14.2/lib/site_perl/5.14.2/Server/Control.pm line 51) line 15
Subject: local.application.pl
#!/usr/bin/env perl use feature qw/say switch/; use strict; use warnings; use File::Path 'make_path'; use Path::Class; # For dir(), file(). use Server::Control::Starman; # --------------------------- my($action) = shift || ''; my($app_path) = file($ENV{HOME}, 'perl.modules', 'Local-Application', 'httpd', 'cgi-bin', 'local', 'app.psgi'); my($base_dir_name) = '/tmp'; my($binary_path) = file($ENV{HOME}, 'perl5', 'perlbrew', 'perls', 'perl-5.14.2', 'bin', 'starman'); my($app_dir_name) = dir($base_dir_name, 'local.application'); my($log_dir_name) = dir($app_dir_name, 'logs'); my($error_file_name) = dir($log_dir_name, 'error_log'); my($pid_file_name) = dir($app_dir_name, 'pid_file'); make_path("$app_dir_name"); my($server) = Server::Control::Starman -> new ( app_psgi => "$app_path", binary_path => "$binary_path", bind_addr => '127.0.0.1', # error_log => "$error_file_name", log_dir => "$log_dir_name", name => 'Local::Application', options => { listen => '127.0.0.1:5002', pid => "$pid_file_name", workers => 1, }, pid_file => "$pid_file_name", port => 5002, server_root => "$app_dir_name", wait_for_status_secs => 2, ); # Report old status. say 'Status: ', $server -> status_as_string; my($status) = $server -> status; given ($status) { when (Server::Control::ACTIVE) { if ($action eq 'stop') { say 'Stopping'; $server -> stop; } } when (Server::Control::INACTIVE) { if ($action eq 'start') { say 'Starting'; $server -> start; } } when (Server::Control::LISTENING) { if ($action eq 'start') { say 'Starting'; $server -> start; } } when (Server::Control::RUNNING) { if ($action eq 'stop') { say 'Stopping'; $server -> stop; } } } # Report new status if there was an action. say 'Status: ', $server -> status_as_string if ($action);
Subject: Re: [rt.cpan.org #79008] Doc error: error_log does not default if log_dir defined
Date: Thu, 16 Aug 2012 04:41:04 -0700
To: bug-Server-Control [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
Thanks, fixed in next release (not a doc error but a bug) On Aug 15, 2012, at 9:17 PM, RSAVAGE via RT wrote: Show quoted text
> Thu Aug 16 00:17:09 2012: Request 79008 was acted upon. > Transaction: Ticket created by RSAVAGE > Queue: Server-Control > Subject: Doc error: error_log does not default if log_dir defined > Broken in: 0.19 > Severity: Important > Owner: Nobody > Requestors: RSAVAGE@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=79008 > > > > Hi > > See attached local.application.pl. > > error_log is commented out, but: > > Attribute (error_log) does not pass the type constraint because: > Validation failed for 'Str' with value undef at reader > Server::Control::error_log (defined at > /home/ron/perl5/perlbrew/perls/perl- > 5.14.2/lib/site_perl/5.14.2/Server/Control.pm line 51) line 15 > > <local.application.pl>