When in a foreign country, please understand that it can be inconvenient and expensive if you don't follow the local laws. For example:
Bermuda's Royal Gazette reports that a 43-year-old New Yorker was ordered to pay $3,000 after admitting to possessing marijuana, which is illegal in the country. The news outlet says Bermuda customs officials and police using sniffer dogs discovered the marijuana rolled into several cigarettes in the safe in his cruise ship cabin.
When you land at a port of call, the ship is "in the country" - like it or not.