Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
just check for fork emulation
  • Loading branch information
kraih committed May 7, 2016
1 parent 7d5c0ec commit dc0da0f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
5 changes: 4 additions & 1 deletion Changes
@@ -1,5 +1,8 @@

6.62 2016-05-02
6.62 2016-05-07
- Removed deprecated is_debug, is_error, is_info and is_warn methods from
Mojo::Log.
- Improved support for Ubuntu on Windows.

6.61 2016-04-30
- Improved Mojo::Server::Daemon to no longer log when a connection has been
Expand Down
11 changes: 1 addition & 10 deletions lib/Mojo/Log.pm
Expand Up @@ -3,7 +3,7 @@ use Mojo::Base 'Mojo::EventEmitter';

use Carp 'croak';
use Fcntl ':flock';
use Mojo::Util qw(deprecated encode monkey_patch);
use Mojo::Util qw(encode monkey_patch);

has format => sub { \&_format };
has handle => sub {
Expand All @@ -23,15 +23,6 @@ has 'path';
# Supported log levels
my %LEVEL = (debug => 1, info => 2, warn => 3, error => 4, fatal => 5);

# DEPRECATED!
for my $name (qw(debug error info warn)) {
monkey_patch __PACKAGE__, "is_$name", sub {
deprecated
"Mojo::Log::is_$name is DEPRECATED in favor of Mojo::Log::is_level";
shift->is_level($name);
};
}

sub append {
my ($self, $msg) = @_;

Expand Down
5 changes: 3 additions & 2 deletions lib/Mojo/Server/Hypnotoad.pm
Expand Up @@ -3,6 +3,7 @@ use Mojo::Base -base;

# "Bender: I was God once.
# God: Yes, I saw. You were doing well, until everyone died."
use Config;
use Cwd 'abs_path';
use File::Basename 'dirname';
use File::Spec::Functions 'catfile';
Expand Down Expand Up @@ -33,8 +34,8 @@ sub configure {
sub run {
my ($self, $app) = @_;

# No Windows support
_exit('Hypnotoad is not available for Windows.') if $^O eq 'MSWin32';
# No fork emulation support
_exit('Hypnotoad does not support fork emulation.') if $Config{d_pseudofork};

# Remember executable and application for later
$ENV{HYPNOTOAD_EXE} ||= $0;
Expand Down
6 changes: 4 additions & 2 deletions lib/Mojo/Server/Prefork.pm
@@ -1,6 +1,7 @@
package Mojo::Server::Prefork;
use Mojo::Base 'Mojo::Server::Daemon';

use Config;
use File::Spec::Functions qw(catfile tmpdir);
use Mojo::Util 'steady_time';
use POSIX 'WNOHANG';
Expand Down Expand Up @@ -59,8 +60,9 @@ sub healthy {
sub run {
my $self = shift;

# No Windows support
say 'Preforking is not available for Windows.' and exit 0 if $^O eq 'MSWin32';
# No fork emulation support
say 'Preforking does not support fork emulation.' and exit 0
if $Config{d_pseudofork};

# Pipe for worker communication
pipe($self->{reader}, $self->{writer}) or die "Can't create pipe: $!";
Expand Down
1 change: 0 additions & 1 deletion lib/Mojo/Transaction/WebSocket.pm
Expand Up @@ -2,7 +2,6 @@ package Mojo::Transaction::WebSocket;
use Mojo::Base 'Mojo::Transaction';

use Compress::Raw::Zlib 'Z_SYNC_FLUSH';
use Config;
use List::Util 'first';
use Mojo::JSON qw(encode_json j);
use Mojo::Util qw(decode encode trim);
Expand Down

0 comments on commit dc0da0f

Please sign in to comment.