Copyright term varies from country to country but the replies to Literary's question have assumed he was only interested in the US, where the play (including its Dedication to the Five) is indeed still in copyright until 2023 because it was first published in 1928 (date of first publication + 95 years). The status of 'When Wendy Grew Up' (play version) is not so clear cut in the US but as it is rarely - if ever - performed on its own, the question has never arisen. When published in the US as part of the novel, it is considered to be in the public domain.
In the UK (and the rest of Europe apart from Spain), ALL works by JM Barrie are in the public domain. His works are also out of copyright in other English-speaking countries such as Australia, New Zealand, South Africa etc.
Hope this is helpful. If you have any questions about Peter Pan or its copyright status, feel free to email me at peterpan@gosh.org
Christine