During the climax of Pirates of the Carribbean: At World's End, Will and Elizabeth are married onboard The Black Pearl. The fact is Barbossa's first mutiny should have prevented him to be the "real" captain of the Pearl, but putting this aside I'm fairly sure that when Jack's right in the next ship fighting Jones, Barbossa couldn't be the offical captain of the Pearl. Therefore he shouldn't have the power to perform any marriage ceremony.
What I concluded from this is that their marriage may be in fact unofficial according to the maritime law, making that whole scene pointless. Even if they knew this, it would still disturb me that they consider Barbossa to be the real captain of the Pearl just because it serves them better at that moment. Either way this is one unnecessary plothole. Are they actually married?
Is it possible for them to get a consent from the Church considering they are pirates now. If not, with what we understand from movie's concept, can a captain marry a pirate couple on HIS ship?