diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-08-26 14:16:43 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-08-26 16:22:48 +0200 |
commit | 2100aa989e1adf82f312119529fa722637e35870 (patch) | |
tree | c2d2da019d763b28e9d6a11fd775346be11dad19 /lib | |
parent | 1a0a2ba99e0c0ff795f145aaf54fcf0c4a8f7478 (diff) | |
download | perl-2100aa989e1adf82f312119529fa722637e35870.tar.gz |
In lib/unicore/mktables minor tidying of the numifciation code.
In the inside-out object lookup code, strive for consistency, by always writing
0 + $ref with no spaces. No need to use 0+$ref as the arguments to == as it
will force numeric context.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicore/mktables | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables index ee4873c9e8..2bb9eb3387 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -1234,7 +1234,7 @@ sub objaddr($) { no overloading; # If overloaded, numifying below won't work. # Numifying a ref gives its address. - return 0 + $_[0]; + return 0+$_[0]; } # Commented code below should work on Perl 5.8. @@ -1259,7 +1259,7 @@ sub objaddr($) { # bless $_[0], 'main::Fake'; # # # Numifying a ref gives its address. -# my $addr = 0 + $_[0]; +# my $addr = 0+$_[0]; # # # Return to original class # bless $_[0], $pkg; @@ -7746,7 +7746,7 @@ sub _operator_equal { return 0 unless defined $other; return 0 unless ref $other; no overloading; - return 0+$self == 0+$other; + return $self == $other; } sub _operator_not_equal { @@ -8707,7 +8707,7 @@ END $file->carp_bad_line("Unexpected property '$property_name'. Skipped"); next LINE; } - { no overloading; $property_addr = 0+($property_object); } + { no overloading; $property_addr = 0+$property_object; } # Defer changing names until have a line that is acceptable # (the 'next' statement above means is unacceptable) |