Skip to content

Instantly share code, notes, and snippets.

@issm
Created September 8, 2010 15:13
Show Gist options
  • Save issm/570269 to your computer and use it in GitHub Desktop.
Save issm/570269 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use lib '/path/to/DBIx-Skinny-0.0718/lib'; # 0.0718 のあるパス
package My::DB;
use DBIx::Skinny setup => +{
dsn => 'dbi:mysql:test',
username => '',
password => '',
};
1;
package My::DB::Schema;
use base qw/DBIx::Skinny::Schema::Loader/;
use DBIx::Skinny::Schema;
__PACKAGE__->load_schema;
1;
package main;
use Data::Dumper;
print Dumper [
$],
$DBI::VERSION,
$DBIx::Skinny::VERSION,
];
my $sk = My::DB->new;
# Exception でSQLを確認するためテキトーに
$sk->update(
'test',
{text => 'hoge'},
{id => 1},
);
__END__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment