On Fri, Oct 31, 2003 at 11:26:53AM +0000, Nick Ing-Simmons wrote: > I have a bunch of generated files in Tk which are under version control > the perl scripts which generate them just > > chmod(0666,$file) unless -w $file; > open(my $fh,">$file") || die ... > > The 0666 thing is a Win32-ism - at one time at least all permissions > had to match (or which one it used was "wrong" or some such). > > Then I need to remember to do a > > p4 diff -se ./... > e > p4 -x e edit > > to "notice" file have changed. > > It isn't perfect - the chmod won't do anything if you are not > owner but it is probably better than a die.
If you're suggesting MakeMaker should go and change the permissions on META.yml, no, I don't think that would be a good idea. If its read-only its probably because its in version control and its read-only because that particular system requires you to some say "I am editing this file now" before you edit it (like RCS or p4). Simply making it writable and then writing to it will screw that all up. The current snapshot will no longer die if its read-only, just warn. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/ There's a Balrog in the woodpile.
