Re: [PATCH] Git.pm: better error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 14, 2010 at 03:00:22AM +0200, Philippe Bruhat (BooK) wrote:

> -d doesn't set $! if the directory doesn't exist

Really?

  $ perl -e '-d "bogus" or die "fail: $!"'
  fail: No such file or directory at -e line 1.

On the other hand:

  $ touch file
  perl -e '-d "file" or die "fail: $!"'
  fail:  at -e line 1.

So perhaps it is best not to rely on $!. Also, this is with perl 5.10.
Is it different with other versions?

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]