Pirates of the Caribbean is a jolly good film. But I never realised it was a law film. It is and quite a subtle one too.
There is a "pirates' code" which they allude to during the film, which is never exhaustively disclosed as I'm sure it is constantly negotiated. It allows for discussion and potential settlement talks when a character says, "Parley!" Suddenly the horrible end that is about to be visited upon the hapless heroine is suspended.
It also has its more severe elements, such as if someone is stranded then no one should go back for him. And it is courteous: when Captain Jack Sparrow is left to fend for himself on an uninhabited island, he is given a pistol with a single shot. To kill himself with when the starvation and thirst can be endured no longer.
Lex pirata then is the buccaneer's equivalent of lex mercatoria. It may not have the respectability or the grand institutions to support it like ICC Arbitration, but it commands respect and observance. Pirates are not without all moral character and worth. Unfortunately respect for lex pirata is hermetic--in limits and symbolically--as we see when the British Caribbean authorities attempt to hang Jack Sparrow, even though he behaved in accordance with the code. It takes the intervention of Eros to force them to relent.