If a pirate was in court, and his parrot told loads of lies on his behalf who would end up in trouble the pirate or the parrot ?
Either way, perjury carries a 2 year sentence. But if you lock a parrot up, it'll just fly through the bars. The death sentence would be the only answer.
As a parrot can only repeat what it hears then the Pirate is obviously the one who taught him. He should be keel hauled yo ho ho.