in reply to ??Best way to subclass BerkeleyDB

return new BerkeleyDB::Btree -Filename => $dbname, ......
That's wrong. The way calling a constructor from a subclass works in perl is to pass on the $class argument to the superclass's constructor, like this:
return $class->SUPER::new( ... )
Which should make sure the final object will be in the $class class (which will contain the actual requested class - IOW your class, or some subclass of that), instead of the BerkelyDB::Btree class (provided its constructor is coded correctly)