On Wed, Nov 05, 2003 at 02:19:08PM -0800, Ilya Zakharevich wrote: > On Wed, Nov 05, 2003 at 02:44:35AM -0800, Michael G Schwern wrote: > > > Unless some scripts rely on the current behaviour. [The current > > > behaviour is not documented in README.os2 too.] > > > > When you copy a file on OS/2 in the shell, does it overwrite by default? > > First of all, Perl uses pdksh on OS/2 (which has no copy builtin). > ;-) Second, there is not 1 shell (CMD, 4OS2); third, this behaviour is > settable, and few programmers would know the default. > > Anyway: the "standard" shell (CMD) overwrites without prompt. Then I don't see a reason why File::Copy::copy() shouldn't follow suit on OS/2 same as it does everywhere else. > > Could you alter copy() so that bit is set by default when it calls > > syscopy()? > > Technically, this is 1-bit edit of os2/os2.c. But I care about > backward-compatibility much, so would like to see a pressing argument > to do so. Basically... * It appears this functionality was added by mistake. ie. a bug. A long standing bug, but a bug. * Its not documented. * There's no expectation or reason that it might work this way on OS/2. Anyone who found this found it because it happened unexpectedly. * It doesn't fulfil any special need for OS/2 users. * So folks don't have to worry about Yet Another Cross-Platform Compatbilty Exception. * So all the existing code that uses copy() and expects it to overwrite like usual works on OS/2. In the end, its only going to effect OS/2 Perl users and people who care about their software running on OS/2 which *sigh* includes me. Everyone else is likely to remain unaware that their software might break on OS/2. Honestly, I have enough trouble convincing people to write special cases for system oddities. If I told someone "Oh, you have to unlink the file first because OS/2's copy won't overwrite" they're going to look at me like I have nine heads and say "People still use OS/2?" same as they do for VMS. So, in the end, its in your best interest to be as compatible as possible with how Perl works on other operating systems without compromising the functionality of Perl for OS/2 users. Up to you. -- Michael G Schwern schwern@pobox.com http://www.pobox.com/~schwern/ I need a SHOWER a BURGER and some ROBOTS, STAT! -- http://www.angryflower.com/allrigh.gifThread Previous | Thread Next