Browse files

refactor.

  • Loading branch information...
1 parent 686f852 commit e18e69dcbef1978490e1ec5d6dc4b83286c4959e @yusukebe committed Apr 20, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/Nopaste/Web/Root.pm
View
9 lib/Nopaste/Web/Root.pm
@@ -1,7 +1,6 @@
package Nopaste::Web::Root;
use Mojo::Base 'Mojolicious::Controller';
use FormValidator::Lite;
-FormValidator::Lite->load_constraints(qw/Japanese/);
use HTML::FillInForm::Lite;
use Data::GUID::URLSafe;
use Text::VimColor;
@@ -47,10 +46,12 @@ sub entry {
my $self = shift;
my $entry = $self->app->db->single('entry',{ id => $self->stash->{id} });
unless( $entry ){
- $self->render_not_found;
+ return $self->render_not_found;
}
-
- my $syntax = Text::VimColor->new( filetype=> 'perl', string => encode_utf8($entry->body) );
+ my $syntax = Text::VimColor->new(
+ filetype => 'perl',
+ string => encode_utf8( $entry->body )
+ );
$self->stash->{code} = decode_utf8($syntax->html);
$self->stash->{entry} = $entry;
}

0 comments on commit e18e69d

Please sign in to comment.