in reply to Save MP3 Tag's to Database with SPOPS
package Song; use base qw(Class::DBI); __PACKAGE__->set_db( 'Main', 'dbi:mysql', 'username', 'password' ); __PACKAGE__->table('Song'); __PACKAGE__->columns( All => qw( song_id title artist album year genre + ) ); __PACKAGE__->columns( Primary => 'song_id' ); package main; find sub { return unless m/\.mp3$/; my $tag = get_mp3tag($_) or return; Song->create($tag); }, @ARGV;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Class::DBI example
by salvadors (Pilgrim) on Feb 11, 2002 at 10:16 UTC | |
by lachoy (Parson) on Feb 11, 2002 at 12:56 UTC |