This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[% MACRO form_block BLOCK %] | |
[% context.scope = 'guide' %] | |
[% text_field({ label => 'Your Name', name => 'name', | |
value => 'This is focused', placeholder => 'Placeholder Text', | |
required => 1 }) %] | |
[% text_field({ label => 'Prepended', name => 'prepended_name', prepend => '←', | |
value => 'This is focused', placeholder => 'Placeholder Text', | |
required => 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[%~ | |
# Some illustrious documentation to get you started: | |
# | |
# The macros defined are to generate markup to save people from copy and pasting | |
# markup. They copy and paste hashes instead, which should be safer (in theory) | |
# | |
# The macros for forms are: | |
# * text_field - A text field | |
# * textarea_field - A textarea field | |
# * password_field - A password field, text_field({ type => 'password', ... }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package MyApp::Model::DataManager; | |
use Moose; | |
use Data::Manager; | |
use Scalar::Util 'blessed'; | |
use Email::Valid; | |
use Data::Verifier; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package MyApp::Model::DataManager; | |
use Moose; | |
extends 'Data::Manager'; | |
sub new_from_schema { | |
my ( $class, $schema, @classes ) = @_; | |
my $verifiers = $class->_default_verifiers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub guide : Local { | |
my ( $self, $c ) = @_; | |
unless ( $c->debug ) { | |
$c->detach('/error/not_found'); | |
} | |
my $template = 'index.tt'; | |
if ( @{ $c->req->args } ) { |