Skip to content

Commit

Permalink
fixed dependency on Getopt::Long 2.38
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 30, 2009
1 parent ec6704e commit 69b4168
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -4,6 +4,7 @@ This file documents the revision history for Perl extension Mojo.
- Made proxy support more portable.
- Simplified progress callbacks.
- Cleaned up internal Mojo APIs.
- Fixed dependency on Getopt::Long 2.38. (kevinold)

0.991242 2009-07-27 00:00:00
- Cleaned up the whole script system, this change is mostly backwards
Expand Down
2 changes: 2 additions & 0 deletions lib/Mojo.pm
Expand Up @@ -182,6 +182,8 @@ Jesse Vincent
Kazuhiro Shibuya
Kevin Old
Lars Balker Rasmussen
Leon Brocard
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojo/Script/Cgi.pm
Expand Up @@ -9,7 +9,7 @@ use base 'Mojo::Script';

use Mojo::Server::CGI;

use Getopt::Long 'GetOptionsFromArray';
use Getopt::Long 'GetOptions';

__PACKAGE__->attr('description', default => <<'EOF');
Start application with CGI backend.
Expand All @@ -27,8 +27,8 @@ sub run {
my $cgi = Mojo::Server::CGI->new;

# Options
my @options = @_ ? @_ : @ARGV;
GetOptionsFromArray(\@options, 'nph' => sub { $cgi->nph(1) });
@ARGV = @_ if @_;
GetOptions('nph' => sub { $cgi->nph(1) });

# Run
$cgi->run;
Expand Down
7 changes: 3 additions & 4 deletions lib/Mojo/Script/Daemon.pm
Expand Up @@ -9,7 +9,7 @@ use base 'Mojo::Script';

use Mojo::Server::Daemon;

use Getopt::Long 'GetOptionsFromArray';
use Getopt::Long 'GetOptions';

__PACKAGE__->attr('description', default => <<'EOF');
Start application with HTTP 1.1 backend.
Expand Down Expand Up @@ -37,9 +37,8 @@ sub run {
my $daemon = Mojo::Server::Daemon->new;

# Options
my @options = @_ ? @_ : @ARGV;
GetOptionsFromArray(
\@options,
@ARGV = @_ if @_;
GetOptions(
'clients=i' => sub { $daemon->max_clients($_[1]) },
'group=s' => sub { $daemon->group($_[1]) },
'keepalive=i' => sub { $daemon->keep_alive_timeout($_[1]) },
Expand Down
7 changes: 3 additions & 4 deletions lib/Mojo/Script/DaemonPrefork.pm
Expand Up @@ -9,7 +9,7 @@ use base 'Mojo::Script';

use Mojo::Server::Daemon::Prefork;

use Getopt::Long 'GetOptionsFromArray';
use Getopt::Long 'GetOptions';

__PACKAGE__->attr('description', default => <<'EOF');
Start application with preforking HTTP 1.1 backend.
Expand Down Expand Up @@ -51,9 +51,8 @@ sub run {

# Options
my $daemonize;
my @options = @_ ? @_ : @ARGV;
GetOptionsFromArray(
\@options,
@ARGV = @_ if @_;
GetOptions(
'clients=i' => sub { $daemon->max_clients($_[1]) },
'daemonize' => \$daemonize,
'group=s' => sub { $daemon->group($_[1]) },
Expand Down

0 comments on commit 69b4168

Please sign in to comment.