might be more by chance than anything else. I've seen videos of slugs crawling over all sorts of 'deterrents' like broken glass, sandpaper etc. They don't care. Same with copper pipe, that is supposed to give them a shock.
We used to have a problem with them getting onto the shed to get atcthe cat food a couple of lines of road salt or table sale soon persuaded them to go elsewhere.