I have this following database this is an object already in the database
{ "_id" : ObjectId("001"), "password" : "test", "user" : "test"}
Things add to that collection
1.index over user and password
2.Unique index over user
When i try to inssert the same parameters into the items
my $enter = $db->data->insert({'user'=>'test','password'=>'test'});
$enter returns a value of a ObjectID(if user is repeated it should get a error msg rather than a Objectid)
Through mongo shell
E11000 duplicate key error index: dataofitem.user
its showing error but when i try through Perl module (https://metacpan.org/module/MongoDB)
it was returned as an object id, i was wondering why i did't got the error msg instead of Objectid