use My::DB::User; my (%th,$tho); my %nu = ( # new user data username => 'foobar', password => 'raboof', groupid => 1, url => 'http://www.google.com/', email => 'fake@fakeolameo.como', active => 1, ); # tie it here $tho = tie %th, 'My::DB::User', {-data=>\%nu}; print "username is: $th{'username'}"; #prints "username is: foobar" # save the data to the database $tho->saveData(); #### $tho = tie %th, 'My::DB::User', {-userid=>'25'};