Skip to content

Commit

Permalink
auth to Authとか
Browse files Browse the repository at this point in the history
  • Loading branch information
nekokak committed Apr 2, 2010
1 parent 9746e33 commit fa1d6dc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions eg/lib/MyAPP/Web/Controller/Root.pm
@@ -1,9 +1,8 @@
package MyAPP::Web::Controller::Root;
use Kamui::Web::Controller -base;
use HTTP::MobileAttribute plugins => [qw/IS/];
use Encode;

#__PACKAGE__->authorizer('+MyAPP::Web::Authorizer::BasicAuth');
__PACKAGE__->authorizer('+MyAPP::Web::Authorizer::BasicAuth');

__PACKAGE__->add_trigger(
'before_dispatch' => sub{
Expand Down Expand Up @@ -78,7 +77,7 @@ sub do_mobile {
$c->stash->{method} = 'get';
}

sub do_moge : auth('Null') {
sub do_moge : Auth('Null') {
}

sub do_json {
Expand Down
2 changes: 1 addition & 1 deletion eg/lib/MyAPP/Web/Handler.pm
Expand Up @@ -3,7 +3,7 @@ use Kamui::Web::Handler;

use_container 'MyAPP::Container';
#use_plugins [qw/+MyAPP::Plugin::Foo Mobile::Attribute Encode/];
use_plugins [qw/+MyAPP::Plugin::Foo Mobile::Attribute/];
use_plugins [qw/+MyAPP::Plugin::Foo Mobile::Agent/];
#use_plugins [qw/+MyAPP::Plugin::Foo Mobile::Attribute Mobile::Encode/];
use_context 'MyAPP::Web::Context';
use_view 'Kamui::View::TT';
Expand Down
2 changes: 1 addition & 1 deletion lib/Kamui/View/TT.pm
Expand Up @@ -28,7 +28,7 @@ sub render {
c => $context,
},
\my $output
) or die $@;
) or die "error: $@";

my $res = $context->res;
$res->status('200');
Expand Down
2 changes: 1 addition & 1 deletion lib/Kamui/Web/Controller.pm
Expand Up @@ -46,7 +46,7 @@ my $cache = +{};
sub attr_cache {
my ($class, $code, $attr) = @_;
if ($attr) {
(my $auth_pkg = $attr->[0]) =~ s/auth\('(.+)'\)/$1/;
(my $auth_pkg = $attr->[0]) =~ s/Auth\('(.+)'\)/$1/;
$cache->{$code} = $auth_pkg;
} else {
return $cache->{$code};
Expand Down
1 change: 1 addition & 0 deletions lib/Kamui/Web/Request.pm
Expand Up @@ -3,6 +3,7 @@ use Kamui;
use base 'Plack::Request';

sub is_post_request { $_[0]->method eq 'POST' }
sub http_host { $_[0]->env->{HTTP_HOST} }

1;

0 comments on commit fa1d6dc

Please sign in to comment.