Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
no imports in the base class either
  • Loading branch information
kraih committed Oct 29, 2014
1 parent 6c8e9fa commit 358eb23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,5 +1,7 @@

5.56 2014-10-29
- Deprecated Mojo::Collection::AUTOLOAD in favor of Mojo::Collection::pluck.
- Deprecated Mojo::DOM::AUTOLOAD in favor of Mojo::DOM::children.

5.55 2014-10-28
- Deprecated support for data arguments in Mojo::JSON::Pointer.
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojo.pm
Expand Up @@ -3,27 +3,27 @@ use Mojo::Base -base;

# "Professor: These old Doomsday devices are dangerously unstable. I'll rest
# easier not knowing where they are."
use Carp 'croak';
use Carp ();
use Mojo::Home;
use Mojo::Log;
use Mojo::Transaction::HTTP;
use Mojo::UserAgent;
use Mojo::Util;
use Scalar::Util 'weaken';
use Scalar::Util ();

has home => sub { Mojo::Home->new };
has log => sub { Mojo::Log->new };
has ua => sub {
my $ua = Mojo::UserAgent->new;
weaken $ua->server->app(shift)->{app};
Scalar::Util::weaken $ua->server->app(shift)->{app};
return $ua;
};

sub build_tx { Mojo::Transaction::HTTP->new }

sub config { Mojo::Util::_stash(config => @_) }

sub handler { croak 'Method "handler" not implemented in subclass' }
sub handler { Carp::croak 'Method "handler" not implemented in subclass' }

sub new {
my $self = shift->SUPER::new(@_);
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Collection.pm
Expand Up @@ -13,8 +13,8 @@ our @EXPORT_OK = ('c');

# DEPRECATED in Tiger Face!
sub AUTOLOAD {
deprecated 'Mojo::Collection::AUTOLOAD is DEPRECATED '
. 'in favor of Mojo::Collection::pluck';
deprecated 'Mojo::Collection::AUTOLOAD is DEPRECATED in favor of'
. ' Mojo::Collection::pluck';
my $self = shift;
my ($package, $method) = our $AUTOLOAD =~ /^(.+)::(.+)$/;
croak "Undefined subroutine &${package}::$method called"
Expand Down

0 comments on commit 358eb23

Please sign in to comment.