Help for this page

Select Code to Download


  1. or download this
    my $onlyLoggedIn = $r->under('/admin' => \&loggedIn);
    $onlyLoggedIn->post('uploadFile')->to('files#insert');
    ...
        $self->render(data => '',status => $responseCode);
    }
    
  2. or download this
        $self->helper( onlyauth => sub {
            my ($c,$block) = @_;
    ...
                return $block->() if $block;
            }
        });
    
  3. or download this
    %= onlyauth begin
        %= include 'adminbar'
    % end