Skip to content

Commit

Permalink
documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 20, 2012
1 parent 34d45f7 commit 2cd1771
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious/Routes.pm
Expand Up @@ -8,11 +8,11 @@ use Mojo::Util 'camelize';
use Mojolicious::Routes::Match;
use Scalar::Util 'weaken';

has 'namespace';
has base_classes => sub { [qw/Mojolicious::Controller Mojo/] };
has cache => sub { Mojo::Cache->new };
has [qw/conditions shortcuts/] => sub { {} };
has hidden => sub { [qw/new attr has/] };
has 'namespace';

sub add_condition {
my ($self, $name, $cb) = @_;
Expand Down Expand Up @@ -309,7 +309,7 @@ L<Mojolicious::Routes::Route> and implements the following new ones.
=head2 C<base_classes>
my $classes = $r->base_classes;
$r = $r->base_classes(['Mojolicious::Controller']);
$r = $r->base_classes(['MyApp::Controller']);
Base classes used to identify controllers, defaults to
L<Mojolicious::Controller> and L<Mojo>.
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojolicious/Sessions.pm
Expand Up @@ -4,11 +4,10 @@ use Mojo::Base -base;
use Mojo::JSON;
use Mojo::Util qw/b64_decode b64_encode/;

has 'cookie_domain';
has [qw/cookie_domain secure/];
has cookie_name => 'mojolicious';
has cookie_path => '/';
has default_expiration => 3600;
has secure => 0;

# JSON serializer
my $JSON = Mojo::JSON->new;
Expand Down
8 changes: 3 additions & 5 deletions lib/Mojolicious/Types.pm
Expand Up @@ -51,11 +51,9 @@ sub detect {

sub type {
my ($self, $ext, $type) = @_;
if ($type) {
$self->types->{$ext} = $type;
return $self;
}
return $self->types->{$ext || ''};
return $self->types->{$ext || ''} unless $type;
$self->types->{$ext} = $type;
return $self;
}

1;
Expand Down

0 comments on commit 2cd1771

Please sign in to comment.