root/perl/DBIx-Class-Indexer-KinoSearch/trunk/example/pet_shop.pl

Revision 339, 323 bytes (checked in by brian.cassidy, 2 years ago)

importing KinoSearch? indexer

Line 
1 use Data::Dumper;
2 use PetShop;
3
4 my $dbname = 'petshop.db';
5
6 unlink $dbname;
7 my $schema = PetShop->connect("dbi:SQLite:dbname=$dbname",'','');
8 $schema->deploy;
9
10 my $cat = $schema->resultset('Cat')->find_or_create({ name => 'Fluffy' });
11
12 print $cat->name, "\n";
13
14 $cat->name( 'Tabby' );
15 $cat->update;
16
17 print $cat->name, "\n";
Note: See TracBrowser for help on using the browser.