Look at how
File::Spec or
Module::Build does things. They have a module for each OS that has a difference, allowing mutually-exclusive syntaxes to peacefully coexist.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?