You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
538 B
41 lines
538 B
package LDV::Zerobin; |
|
|
|
use strict; |
|
use warnings; |
|
use utf8; |
|
|
|
use Mojo::Base 'Mojolicious::Controller'; |
|
|
|
sub create { my ($self) = @_; $self->render(); } |
|
|
|
sub view |
|
{ |
|
my ($self) = @_; |
|
|
|
$self->render(); |
|
} |
|
|
|
sub save |
|
{ |
|
my ($self) = @_; |
|
my $id = $self->stash('id'); |
|
|
|
eval { |
|
die("not implemented\n"); |
|
$self->redirect_to("/zerobin2/$id"); |
|
1; |
|
} or do { |
|
$self->stash({'result' => $@}); |
|
$self->redirect_to("/zerobin2/$id"); |
|
}; |
|
|
|
$self->rendered(); |
|
return 1; |
|
} |
|
|
|
sub prune |
|
{ |
|
$self->stash({'result' => $@}); |
|
} |
|
|
|
1;
|
|
|