According to MongoDB::Tutorial, you are supposed to not pass in _id at all to have MongoDB issue the id. If you want to hand out ids from a specific sequence, I don't know how to do that though.
I don't find any mention of "stored procedure" in the MongoDB distribution. I don't know how the API, and the closest I found was some random blog post on how to call server-side Javascript from Python. Most likely you have to send the same/similar data structure to make MongoDB do your bidding from Perl.
Update: See below for the official documentation on how to create an autoincrement field with MongoDB.
In reply to Re: MongoDB Stored procedure from Dancer2
by Corion
in thread MongoDB Stored procedure from Dancer2
by actarus2003
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |