Skip to content

Instantly share code, notes, and snippets.

package Ark::View::Tiffany;
use Ark 'View';
use Tiffany;
has view => (
is => 'rw',
isa => 'Str',
lazy => 1,
default => 'Text::MicroTemplate::Extended',
);
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 ] },
);
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 ( );
package DBIx::Skinny::Mixin::ExceptionHandler;
use strict;
use warnings;
use Carp ( );
my $ORIG = *DBIx::Skinny::_stack_trace;
sub register_method
package DBIx::Skinny::Mixin::CustomProfiler;
use strict;
use warnings;
our $VERSION = '0.01';
use Carp ( );
sub register_method
{
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, $@);
package DBIx::Skinny::Mixin::IteratorModifier;
use strict;
use warnings;
sub register_method
{
return {
register_iterator_method => \&register_iterator_method,
};
package MyApp::Cmd;
use Mouse;
with qw/ MouseX::Getopt::Basic /;
has hoge => (
traits => [ 'Getopt' ],
cmd_aliases => 'h',
is => 'ro',
isa => 'Str',
package DBIx::Skinny::Mixin::UpdateOrCreate;
use strict;
use warnings;
use Carp ( );
our $VERSION = '0.01';
sub register_method
## t/050_mixin/find_or_create.t
# ---------- >8 ----------
do {
eval {
$model->find_or_create(
test5 => { '' => 'key1' } => {
data => 'data2',
}