This file contains hidden or 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 Ark::View::Tiffany; | |
| use Ark 'View'; | |
| use Tiffany; | |
| has view => ( | |
| is => 'rw', | |
| isa => 'Str', | |
| lazy => 1, | |
| default => 'Text::MicroTemplate::Extended', | |
| ); |
This file contains hidden or 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 Ark::View::Xslate; | |
| use Ark 'View'; | |
| use Text::Xslate ( ); | |
| has path => ( | |
| is => 'rw', | |
| isa => 'ArrayRef', | |
| lazy => 1, | |
| default => sub { [ shift->path_to('root')->stringify ] }, | |
| ); |
This file contains hidden or 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 DBIx::Skinny::Mixin::Profiler::LogDispatch; | |
| use strict; | |
| use warnings; | |
| use Log::Dispatch::Config; | |
| use Log::Dispatch::Configurator::Hash; | |
| use DBIx::Skinny::Profiler::LogDispatch; | |
| use Carp ( ); | |
This file contains hidden or 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 DBIx::Skinny::Mixin::ExceptionHandler; | |
| use strict; | |
| use warnings; | |
| use Carp ( ); | |
| my $ORIG = *DBIx::Skinny::_stack_trace; | |
| sub register_method |
This file contains hidden or 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 DBIx::Skinny::Mixin::CustomProfiler; | |
| use strict; | |
| use warnings; | |
| our $VERSION = '0.01'; | |
| use Carp ( ); | |
| sub register_method | |
| { |
This file contains hidden or 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 _execute { | |
| my ($class, $stmt, $bind) = @_; | |
| my ($sth, $ret); # <- ここちょっとへんこう | |
| eval { | |
| $sth = $class->dbh->prepare($stmt); | |
| $ret = $sth->execute(@{$bind}); # <- ここちょっとへんこう | |
| }; | |
| if ($@) { | |
| $class->_stack_trace($sth, $stmt, $bind, $@); |
This file contains hidden or 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 DBIx::Skinny::Mixin::IteratorModifier; | |
| use strict; | |
| use warnings; | |
| sub register_method | |
| { | |
| return { | |
| register_iterator_method => \®ister_iterator_method, | |
| }; |
This file contains hidden or 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::Cmd; | |
| use Mouse; | |
| with qw/ MouseX::Getopt::Basic /; | |
| has hoge => ( | |
| traits => [ 'Getopt' ], | |
| cmd_aliases => 'h', | |
| is => 'ro', | |
| isa => 'Str', |
This file contains hidden or 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 DBIx::Skinny::Mixin::UpdateOrCreate; | |
| use strict; | |
| use warnings; | |
| use Carp ( ); | |
| our $VERSION = '0.01'; | |
| sub register_method |
This file contains hidden or 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
| ## t/050_mixin/find_or_create.t | |
| # ---------- >8 ---------- | |
| do { | |
| eval { | |
| $model->find_or_create( | |
| test5 => { '' => 'key1' } => { | |
| data => 'data2', | |
| } |