Skip to content

Instantly share code, notes, and snippets.

@shelling
Created April 28, 2009 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shelling/103225 to your computer and use it in GitHub Desktop.
Save shelling/103225 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
#
# shelling <shelling@cpan.org>
#
# First KiokuDB example
use KiokuDB;
package Person;
use Moose;
has name => (
isa => 'Str',
is => 'rw',
);
package main;
my $db = KiokuDB->connect( "dbi:SQLite:dbname=kiokudb.sqlite3", create => 1 );
my $obj = Person->new( name => "Shelling Ford" );
my $scope = $db->new_scope;
my $homer_id = $db->store($obj);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment