Package: dpkg
Version: 1.13.19
install-info contains the following fragment:
die "$name: failed to lock dir for editing! $!\n".
($! == EEXIST ? "try deleting $dirfile.lock ?\n" : '');
This is incorrect. The value of $! is either a number or an
English string ("File exists"). It is never a symbol error name.
Here is the correct second line:
($!{EEXIST} ? "try deleting $dirfile.lock ?\n" : '');
Here is the appropriate text from the perlvar manpage:
$! If used numerically, yields the current value of the C "errno"
variable, or in other words, if a system or library call fails,
it sets this variable. This means that the value of $! is
meaningful only immediately after a failure:
if (open(FH, $filename)) {
# Here $! is meaningless.
...
} else {
# ONLY here is $! meaningful.
...
# Already here $! might be meaningless.
}
# Since here we might have either success or failure,
# here $! is meaningless.
In the above meaningless stands for anything: zero, non-zero,
"undef". A successful system or library call does not set the
variable to zero.
If used as a string, yields the corresponding system error
string. You can assign a number to $! to set errno if, for
instance, you want "$!" to return the string for error n, or
you want to set the exit value for the die() operator.
(Mnemonic: What just went bang?)
Also see "Error Indicators".
%! Each element of "%!" has a true value only if $! is set to that
value. For example, $!{ENOENT} is true if and only if the cur-
rent value of $! is "ENOENT"; that is, if the most recent error
was "No such file or directory" (or its moral equivalent: not
all operating systems give that exact error, and certainly not
all languages). To check if a particular key is meaningful on
your system, use "exists $!{the_key}"; for a list of legal
keys, use "keys %!". See Errno for more information, and also
see above for the validity of $!.
--
"If a person keeps faithfully busy each hour of the working day, he
can count on waking up some morning to find himself one of the
competent ones of his generation."
--William James
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]