
We'd do it if we were rewiring our place. We've designed lots of closets to have door-operated swithes that turn the closet light on when the door opens, off when the door shuts (like a refrigerator!).
We love the idea because it uses the light only when you need it and you simply can't forget to turn it off. Pllus, it keeps wall-mounted switches to a minimum, which we always favor over big banks of switches cluttering up a wall.
One such switch can be found here. We like it wired to a small light fixture like this Alinea fixture by Aamsco. It can be mounted directly over the door on the closet interior, where it will be hidden from view and best light the contents of the closet.

Comments (2)
LEON-
Can you post a link to one of those rolling ball switches? I can't seem to find any that aren't "low voltage". Tx,
LV
When I bought my new house I was really excited that the master closet had one of these door switches installed. However, after living with it for a while I'm ready to tear it out. We have a large walk-in closet and since I'm married it would be nice to go in the closet in the morning and shut the door and get dressed so as not to disturb my spouse. However, I have to prop the door open enough to keep the light on but as far closed as possible to not wake him. I know I get irritated when he gets up before me and the light just glares in the bedroom. I think for a pantry it would be great though. Or if mine was motion sensored I would like it better.