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
From 4742ba64e7c20f7d60acdd411201f7aa971b462a Mon Sep 17 00:00:00 2001 | |
From: Yuval Kogman <nothingmuch@woobling.org> | |
Date: Wed, 28 Jan 2009 14:30:08 +0200 | |
Subject: [PATCH] Add --ff-only flag to git-merge | |
This patch adds an --ff-only flag to git-merge. When specified git-merge | |
will exit with an error whenver a merge will not be a simple fast | |
forward, similar to the default behavior of git push. | |
--- | |
builtin-merge.c | 6 ++++++ |
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
#!/usr/bin/perl -w | |
use strict; | |
use KiokuDB; | |
use KiokuDB::Backend::DBI; | |
{ | |
package test; | |
use Moose; |
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
use strict; | |
use warnings; | |
use Test::More 'no_plan'; | |
use KiokuX::User::Util qw(crypt_password); | |
use ok 'Kitten::Friend::Schema::Kitten'; | |
my $kitten = Kitten::Friend::Schema::Kitten->new( |
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 Kitten::Friend::Model::KiokuDB; | |
use Moose; | |
extends qw(KiokuX::Model); | |
sub insert_kitten { | |
my ( $self, $kitten ) = @_; | |
my $id = $self->txn_do(sub { | |
$self->store($kitten); |
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
my $user = eval { | |
$c->authenticate({ | |
id => $id, | |
password => $password, | |
}); | |
}; | |
if ( $user ) { | |
$c->response->body( "Hello " . $user->get_object->name ) | |
} |
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
<Model KiokuDB> | |
dsn dbi:SQLite:dbname=root/db | |
</Model> |
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__->config( | |
'Plugin::Authentication' => { | |
realms => { | |
default => { | |
credential => { | |
class => 'Password', | |
password_type => 'self_check' | |
}, | |
store => { | |
class => 'Model::KiokuDB', |
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 Kitten::Friend::Schema::Kitten; | |
use Moose; | |
use Kitten::Friend::Schema::Vase; | |
use KiokuDB::Set; | |
use KiokuDB::Util qw(set); | |
use namespace::autoclean; |
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 Kitten::Friend::Schema::Vase; | |
use Moose; | |
use MooseX::AttributeHelpers; | |
use URI; | |
use namespace::autoclean; | |
has pictures => ( | |
metaclass => "Collection::Array", |
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
use strict; | |
use warnings; | |
use Test::More 'no_plan'; | |
use ok 'Kitten::Friend::Model::KiokuDB'; | |
my $m = Kitten::Friend::Model::KiokuDB->new( dsn => "hash" ); | |
{ |
OlderNewer