Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
the next release will be 6.0
  • Loading branch information
kraih committed Feb 23, 2015
1 parent 01a7f8d commit 5ec1a93
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 115 deletions.
14 changes: 13 additions & 1 deletion Changes
@@ -1,5 +1,17 @@

5.83 2015-02-23
6.0 2015-02-24
- Code name "Clinking Beer Mugs", this is a major release.
- Removed deprecated object-oriented Mojo::Loader API.
- Removed deprecated accept_interval, lock and unlock attributes from
Mojo::IOLoop.
- Removed deprecated accept_interval, lock_file and lock_timeout attributes
from Mojo::Server::Prefork.
- Removed deprecated bridge method from Mojolicious::Routes::Route.
- Removed deprecated is_readable method from Mojo::Reactor.
- Removed deprecated siblings method from Mojo::DOM.
- Removed deprecated render_exception and render_not_found methods from
Mojolicious::Controller.
- Removed deprecated keep_alive_requests setting from Hypnotoad.

5.82 2015-02-22
- Deprecated Mojo::Reactor::is_readable.
Expand Down
9 changes: 1 addition & 8 deletions lib/Mojo/DOM.pm
Expand Up @@ -13,7 +13,7 @@ use Carp 'croak';
use Mojo::Collection;
use Mojo::DOM::CSS;
use Mojo::DOM::HTML;
use Mojo::Util qw(deprecated squish);
use Mojo::Util 'squish';
use Scalar::Util qw(blessed weaken);

sub all_contents { $_[0]->_collect(_all(_nodes($_[0]->tree))) }
Expand Down Expand Up @@ -137,13 +137,6 @@ sub root {
return $self->_build($tree, $self->xml);
}

# DEPRECATED in Tiger Face!
sub siblings {
deprecated 'Mojo::DOM::siblings is DEPRECATED';
my $siblings = $_[0]->_siblings(1);
return _select($_[0]->_collect(@{$siblings->[0]}, @{$siblings->[1]}), $_[1]);
}

sub strip {
my $self = shift;
return $self if (my $tree = $self->tree)->[0] ne 'tag';
Expand Down
20 changes: 1 addition & 19 deletions lib/Mojo/IOLoop.pm
Expand Up @@ -9,7 +9,7 @@ use Mojo::IOLoop::Delay;
use Mojo::IOLoop::Server;
use Mojo::IOLoop::Stream;
use Mojo::Reactor::Poll;
use Mojo::Util qw(deprecated md5_sum steady_time);
use Mojo::Util qw(md5_sum steady_time);
use Scalar::Util qw(blessed weaken);

use constant DEBUG => $ENV{MOJO_IOLOOP_DEBUG} || 0;
Expand All @@ -29,12 +29,6 @@ $SIG{PIPE} = 'IGNORE';
# Initialize singleton reactor early
__PACKAGE__->singleton->reactor;

# DEPRECATED in Tiger Face!
sub accept_interval {
deprecated 'Mojo::IOLoop::accept_interval is DEPRECATED';
@_ > 1 ? shift : undef;
}

sub acceptor {
my ($self, $acceptor) = (_instance(shift), @_);

Expand Down Expand Up @@ -87,12 +81,6 @@ sub delay {

sub is_running { _instance(shift)->reactor->is_running }

# DEPRECATED in Tiger Face!
sub lock {
deprecated 'Mojo::IOLoop::lock is DEPRECATED';
@_ > 1 ? shift : undef;
}

sub next_tick {
my ($self, $cb) = (_instance(shift), @_);
weaken $self;
Expand Down Expand Up @@ -166,12 +154,6 @@ sub stream {

sub timer { shift->_timer(timer => @_) }

# DEPRECATED in Tiger Face!
sub unlock {
deprecated 'Mojo::IOLoop::unlock is DEPRECATED';
@_ > 1 ? shift : undef;
}

sub _id {
my $self = shift;
my $id;
Expand Down
20 changes: 1 addition & 19 deletions lib/Mojo/Loader.pm
Expand Up @@ -5,20 +5,14 @@ use Exporter 'import';
use File::Basename 'fileparse';
use File::Spec::Functions qw(catdir catfile splitdir);
use Mojo::Exception;
use Mojo::Util qw(b64_decode class_to_path deprecated);
use Mojo::Util qw(b64_decode class_to_path);

our @EXPORT_OK = qw(data_section file_is_binary find_modules load_class);

my (%BIN, %CACHE);

# DEPRECATED in Tiger Face!
sub data { shift; data_section(@_) }

sub data_section { $_[0] ? $_[1] ? _all($_[0])->{$_[1]} : _all($_[0]) : undef }

# DEPRECATED in Tiger Face!
sub is_binary { shift; file_is_binary(@_) }

sub file_is_binary { keys %{_all($_[0])} ? !!$BIN{$_[0]}{$_[1]} : undef }

sub find_modules {
Expand All @@ -39,9 +33,6 @@ sub find_modules {
return sort keys %modules;
}

# DEPRECATED in Tiger Face!
sub load { shift; load_class(@_) }

sub load_class {
my $class = shift;

Expand All @@ -58,15 +49,6 @@ sub load_class {
return Mojo::Exception->new($@);
}

# DEPRECATED in Tiger Face!
sub new {
deprecated 'Object-oriented Mojo::Loader API is DEPRECATED';
Mojo::Base::new(@_);
}

# DEPRECATED in Tiger Face!
sub search { shift; [find_modules(@_)] }

sub _all {
my $class = shift;

Expand Down
10 changes: 1 addition & 9 deletions lib/Mojo/Reactor.pm
Expand Up @@ -3,7 +3,6 @@ use Mojo::Base 'Mojo::EventEmitter';

use Carp 'croak';
use Mojo::Loader 'load_class';
use Mojo::Util 'deprecated';

sub again { croak 'Method "again" not implemented by subclass' }

Expand All @@ -12,14 +11,7 @@ sub detect {
return load_class($try) ? 'Mojo::Reactor::Poll' : $try;
}

sub io { croak 'Method "io" not implemented by subclass' }

# DEPRECATED in Tiger Face!
sub is_readable {
deprecated 'Mojo::Reactor::is_readable is DEPRECATED';
Mojo::Util::_readable(0, fileno pop);
}

sub io { croak 'Method "io" not implemented by subclass' }
sub is_running { croak 'Method "is_running" not implemented by subclass' }

sub next_tick { shift->timer(0 => @_) and return undef }
Expand Down
6 changes: 1 addition & 5 deletions lib/Mojo/Server/Hypnotoad.pm
Expand Up @@ -7,7 +7,7 @@ use Cwd 'abs_path';
use File::Basename 'dirname';
use File::Spec::Functions 'catfile';
use Mojo::Server::Prefork;
use Mojo::Util qw(deprecated steady_time);
use Mojo::Util qw(steady_time);
use Scalar::Util 'weaken';

has prefork => sub { Mojo::Server::Prefork->new };
Expand All @@ -22,10 +22,6 @@ sub configure {
$c->{listen} ||= ['http://*:8080'];
$self->upgrade_timeout($c->{upgrade_timeout}) if $c->{upgrade_timeout};

# DEPRECATED in Tiger Face!
deprecated 'keep_alive_requests setting is DEPRECATED in favor of requests'
if !$c->{requests} && ($c->{requests} ||= $c->{keep_alive_requests});

# Prefork settings
$prefork->reverse_proxy($c->{proxy}) if defined $c->{proxy};
$prefork->max_clients($c->{clients}) if $c->{clients};
Expand Down
20 changes: 1 addition & 19 deletions lib/Mojo/Server/Prefork.pm
Expand Up @@ -2,7 +2,7 @@ package Mojo::Server::Prefork;
use Mojo::Base 'Mojo::Server::Daemon';

use File::Spec::Functions qw(catfile tmpdir);
use Mojo::Util qw(deprecated steady_time);
use Mojo::Util 'steady_time';
use POSIX 'WNOHANG';
use Scalar::Util 'weaken';

Expand All @@ -24,12 +24,6 @@ sub DESTROY {
if (my $file = $self->pid_file) { unlink $file if -w $file }
}

# DEPRECATED in Tiger Face!
sub accept_interval {
deprecated 'Mojo::Server::Prefork::accept_interval is DEPRECATED';
@_ > 1 ? shift : undef;
}

sub check_pid {
my $file = shift->pid_file;
return undef unless open my $handle, '<', $file;
Expand Down Expand Up @@ -62,18 +56,6 @@ sub healthy {
scalar grep { $_->{healthy} } values %{shift->{pool}};
}

# DEPRECATED in Tiger Face!
sub lock_file {
deprecated 'Mojo::Server::Prefork::lock_file is DEPRECATED';
@_ > 1 ? shift : undef;
}

# DEPRECATED in Tiger Face!
sub lock_timeout {
deprecated 'Mojo::Server::Prefork::lock_timeout is DEPRECATED';
@_ > 1 ? shift : undef;
}

sub run {
my $self = shift;

Expand Down
4 changes: 3 additions & 1 deletion lib/Mojolicious.pm
Expand Up @@ -43,7 +43,7 @@ has types => sub { Mojolicious::Types->new };
has validator => sub { Mojolicious::Validator->new };

our $CODENAME = 'Tiger Face';
our $VERSION = '5.83';
our $VERSION = '6.0';

sub AUTOLOAD {
my $self = shift;
Expand Down Expand Up @@ -713,6 +713,8 @@ L<http://www.apache.org/licenses/LICENSE-2.0>.
Every major release of L<Mojolicious> has a code name, these are the ones that
have been used in the past.
6.0, C<Clinking Beer Mugs> (U+1F37B)
5.0, C<Tiger Face> (u1F42F)
4.0, C<Top Hat> (u1F3A9)
Expand Down
21 changes: 1 addition & 20 deletions lib/Mojolicious/Plugin/DefaultHelpers.pm
Expand Up @@ -5,15 +5,11 @@ use Mojo::ByteStream;
use Mojo::Collection;
use Mojo::Exception;
use Mojo::IOLoop;
use Mojo::Util qw(deprecated dumper sha1_sum steady_time);
use Mojo::Util qw(dumper sha1_sum steady_time);

sub register {
my ($self, $app) = @_;

# DEPRECATED in Tiger Face!
$app->helper(render_exception => sub { _render('exception', @_) });
$app->helper(render_not_found => sub { _render('not_found', @_) });

# Controller alias helpers
for my $name (qw(app flash param stash session url_for validation)) {
$app->helper($name => sub { shift->$name(@_) });
Expand Down Expand Up @@ -91,13 +87,6 @@ sub _delay {
sub _development {
my ($page, $c, $e) = @_;

# DEPRECATED in Tiger Face!
if (my $sub = $c->can("render_$page")) {
deprecated "Mojolicious::Controller::render_$page is DEPRECATED in favor"
. " of the reply->$page helper";
return $c->$sub($page eq 'exception' ? $e : ());
}

my $app = $c->app;
$app->log->error($e = Mojo::Exception->new($e)) if $page eq 'exception';

Expand Down Expand Up @@ -149,14 +138,6 @@ sub _is_fresh {
return $c->app->static->is_fresh($c, \%options);
}

# DEPRECATED in Tiger Face!
sub _render {
my $page = shift;
deprecated "Mojolicious::Controller::render_$page is DEPRECATED in favor of"
. " the reply->$page helper";
shift->helpers->reply->$page(@_);
}

sub _static {
my ($c, $file) = @_;
return !!$c->rendered if $c->app->static->serve($c, $file);
Expand Down
7 changes: 0 additions & 7 deletions lib/Mojolicious/Routes/Route.pm
Expand Up @@ -32,13 +32,6 @@ sub add_child {

sub any { shift->_generate_route(ref $_[0] eq 'ARRAY' ? shift : [], @_) }

# DEPRECATED in Tiger Face!
sub bridge {
Mojo::Util::deprecated 'Mojolicious::Routes::Route::bridge is DEPRECATED in'
. ' favor of Mojolicious::Routes::Route::under';
shift->route(@_)->inline(1);
}

sub delete { shift->_generate_route(DELETE => @_) }

sub detour { shift->partial(1)->to(@_) }
Expand Down
8 changes: 1 addition & 7 deletions t/pod_coverage.t
Expand Up @@ -7,10 +7,4 @@ plan skip_all => 'set TEST_POD to enable this test (developer only!)'
plan skip_all => 'Test::Pod::Coverage 1.04+ required for this test!'
unless eval 'use Test::Pod::Coverage 1.04; 1';

# DEPRECATED in Tiger Face!
my @tiger = (
qw(accept_interval bridge data is_binary is_readable load lock lock_file),
qw(lock_timeout max_connections new search siblings unlock)
);

all_pod_coverage_ok({also_private => [@tiger]});
all_pod_coverage_ok();

0 comments on commit 5ec1a93

Please sign in to comment.