Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Mojo does not actually need a new method
  • Loading branch information
kraih committed Nov 8, 2014
1 parent 013b95e commit b4a2919
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions lib/Mojo.pm
Expand Up @@ -11,7 +11,7 @@ use Mojo::UserAgent;
use Mojo::Util;
use Scalar::Util ();

has home => sub { Mojo::Home->new };
has home => sub { Mojo::Home->new->detect(ref shift) };
has log => sub { Mojo::Log->new };
has ua => sub {
my $ua = Mojo::UserAgent->new;
Expand All @@ -25,13 +25,6 @@ sub config { Mojo::Util::_stash(config => @_) }

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

sub new {
my $self = shift->SUPER::new(@_);
my $home = $self->home;
$home->detect(ref $self) unless @{$home->parts};
return $self;
}

1;

=encoding utf8
Expand Down Expand Up @@ -145,12 +138,6 @@ be overloaded in a subclass.
...
}
=head2 new
my $app = Mojo->new;
Construct a new L<Mojo> application.
=head1 SEE ALSO
L<Mojolicious>, L<Mojolicious::Guides>, L<http://mojolicio.us>.
Expand Down

0 comments on commit b4a2919

Please sign in to comment.