Can I put uncooked pasta in my compost barrel?
No it will become toxic and the gases released from it could kill everyone in a 2 mile radius
Why not? The moisture in the compost will be enough to soften it and eventually break down.
Unless it is already rotten, you cannot put it because it will not disappear.