Hi Mark,

Mark Dootson schrieb:
Is it possible to have full UNC paths in @INC?
For this and other cases the attached patch works too.

For those not in the know: UNC paths are mostly the \\Server\Share\Dir syntax commonly seen in Windows/Samba shares. To be entirely honest, I had to look that up. :)

I never really thought about this. I would guess such paths break all kinds of regular expressions in various places. Not just in PAR and its companion modules but perhaps also in perl itself, File::Spec, etc.

But it's something to keep in mind. Better to be safe than sorry.

About the code:
Why s/\\+$/\//? Is replacing just a trailing backslash with a slash a good idea? s/\\/\/g would have done, too, wouldn't it? (perl doesn't care about / vs \ in paths.) Or removing any trailing (back-)slash in the first place: s/(?:\\|\/)$//?

I think your patch isn't clumsy at all. "elegant", "one-line", "readable", pick two. :)

I assume you did the replacement of just one path separator in order to change the string as little as possible, after all c:\foo\ is semantically more similar to c:\foo/ than to c:\foo.

Can you apply your patch yourself?

Steffen

Reply via email to