# Needs 'no overloading' to run faster on miniperl. Code commented out at the
# subroutine objaddr can be used instead to work as far back (untested) as
-# 5.8: needs pack "U".
+# 5.8: needs pack "U". But almost all occurrences of objaddr have been
+# removed in favor of using 'no overloading'. You also would have to go
+# through and replace occurrences like:
+# my $addr; { no overloading; $addr = 0+$self; }
+# with
+# my $addr = main::objaddr $self;
require 5.010_001;
use strict;
use warnings;
# Use typeglob to give the anonymous subroutine the name we want
*$destroy_name = sub {
my $self = shift;
- my $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
$self->$destroy_callback if $destroy_callback;
foreach my $field (keys %{$package_fields{$package}}) {
return Carp::carp_too_few_args(\@_, 2) if main::DEBUG && @_ < 2;
my $self = shift;
my $value = shift;
+ my $addr; { no overloading; $addr = 0+$self; }
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
if (ref $value) {
- return if grep { $value == $_ }
- @{$field->{main::objaddr $self}};
+ return if grep { $value == $_ } @{$field->{$addr}};
}
else {
- return if grep { $value eq $_ }
- @{$field->{main::objaddr $self}};
+ return if grep { $value eq $_ } @{$field->{$addr}};
}
- push @{$field->{main::objaddr $self}}, $value;
+ push @{$field->{$addr}}, $value;
return;
}
}
*$subname = sub {
use strict "refs";
Carp::carp_extra_args(\@_) if main::DEBUG && @_ > 1;
- my $addr = main::objaddr $_[0];
+ my $addr; { no overloading; $addr = 0+$_[0]; }
if (ref $field->{$addr} ne 'ARRAY') {
my $type = ref $field->{$addr};
$type = 'scalar' unless $type;
*$subname = sub {
use strict "refs";
Carp::carp_extra_args(\@_) if main::DEBUG && @_ > 1;
- return $field->{main::objaddr $_[0]};
+ no overloading;
+ return $field->{0+$_[0]};
}
}
}
Carp::carp_extra_args(\@_) if @_ > 2;
}
# $self is $_[0]; $value is $_[1]
- $field->{main::objaddr $_[0]} = $_[1];
+ no overloading;
+ $field->{0+$_[0]} = $_[1];
return;
}
}
my $class = shift;
my $self = bless \do{ my $anonymous_scalar }, $class;
- my $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
# Set defaults
$handler{$addr} = \&main::process_generic_property_file;
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
my $file = $file{$addr};
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
# Here the file is open (or if the handle is not a ref, is an open
# 'virtual' file). Get the next line; any inserted lines get priority
# # an each_line_handler() on the line.
#
# my $self = shift;
-# my $addr = main::objaddr $self;
+# my $addr; { no overloading; $addr = 0+$self; }
#
# foreach my $inserted_ref (@{$added_lines{$addr}}) {
# my ($adjusted, $line) = @{$inserted_ref};
# Each inserted line is an array, with the first element being 0 to
# indicate that this line hasn't been adjusted, and needs to be
# processed.
- push @{$added_lines{main::objaddr $self}}, map { [ 0, $_ ] } @_;
+ no overloading;
+ push @{$added_lines{0+$self}}, map { [ 0, $_ ] } @_;
return;
}
# Each inserted line is an array, with the first element being 1 to
# indicate that this line has been adjusted
- push @{$added_lines{main::objaddr $self}}, map { [ 1, $_ ] } @_;
+ no overloading;
+ push @{$added_lines{0+$self}}, map { [ 1, $_ ] } @_;
return;
}
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
# If not accepting a list return, just return the first one.
return shift @{$missings{$addr}} unless wantarray;
sub _insert_property_into_line {
# Add a property field to $_, if this file requires it.
- my $property = $property{main::objaddr shift};
+ my $self = shift;
+ my $addr; { no overloading; $addr = 0+$self; }
+ my $property = $property{$addr};
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
$_ =~ s/(;|$)/; $property$1/;
my $message = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
$message = 'Unexpected line' unless $message;
# increment the count of how many times it has occurred
unless ($errors{$addr}->{$message}) {
Carp::my_carp("$message in '$_' in "
- . $file{main::objaddr $self}
+ . $file{$addr}
. " at line $.. Skipping this line;");
$errors{$addr}->{$message} = 1;
}
my $class = shift;
my $self = bless \do{my $anonymous_scalar}, $class;
- my $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
while (@_ > 1) {
my $default = shift;
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
return each %{$class_defaults{$addr}};
}
my $class = shift;
my $self = bless \do { my $anonymous_scalar }, $class;
- my $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
$name{$addr} = shift;
$loose_match{$addr} = shift;
my $class = shift;
my $self = bless \do { my $anonymous_scalar }, $class;
- my $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
$start{$addr} = shift;
$end{$addr} = shift;
sub _operator_stringify {
my $self = shift;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
# Output it like '0041..0065 (value)'
my $return = sprintf("%04X", $start{$addr})
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
return $standard_form{$addr} if defined $standard_form{$addr};
return $value{$addr};
my $indent = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
my $return = $indent
. sprintf("%04X", $start{$addr})
return _union($class, $initialize, %args) if defined $initialize;
$self = bless \do { my $anonymous_scalar }, $class;
- local $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
# Optional parent object, only for debug info.
$owner_name_of{$addr} = delete $args{'Owner'};
sub _operator_stringify {
my $self = shift;
- local $addr = main::objaddr($self) if !defined $addr;
+ my $addr; { no overloading; $addr = 0+$self; }
return "Range_List attached to '$owner_name_of{$addr}'"
if $owner_name_of{$addr};
if (! defined $arg) {
my $message = "";
if (defined $self) {
- $message .= $owner_name_of{main::objaddr $self};
+ no overloading;
+ $message .= $owner_name_of{0+$self};
}
Carp::my_carp_bug($message .= "Undefined argument to _union. No union done.");
return;
else {
my $message = "";
if (defined $self) {
- $message .= $owner_name_of{main::objaddr $self};
+ no overloading;
+ $message .= $owner_name_of{0+$self};
}
Carp::my_carp_bug($message . "Cannot take the union of a $type. No union done.");
return;
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- local $addr = main::objaddr($self) if ! defined $addr;
-
- return scalar @{$ranges{$addr}};
+ no overloading;
+ return scalar @{$ranges{0+$self}};
}
sub min {
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- local $addr = main::objaddr($self) if ! defined $addr;
+ my $addr; { no overloading; $addr = 0+$self; }
# If the range list is empty, return a large value that isn't adjacent
# to any that could be in the range list, for simpler tests
my $codepoint = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- local $addr = main::objaddr $self if ! defined $addr;
-
my $i = $self->_search_ranges($codepoint);
return 0 unless defined $i;
# range[$i-1]->end < $codepoint <= range[$i]->end
# So is in the table if and only iff it is at least the start position
# of range $i.
- return 0 if $ranges{$addr}->[$i]->start > $codepoint;
+ no overloading;
+ return 0 if $ranges{0+$self}->[$i]->start > $codepoint;
return $i + 1;
}
my $codepoint = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- local $addr = main::objaddr $self if ! defined $addr;
-
my $i = $self->contains($codepoint);
return unless $i;
# contains() returns 1 beyond where we should look
- return $ranges{$addr}->[$i-1]->value;
+ no overloading;
+ return $ranges{0+$self}->[$i-1]->value;
}
sub _search_ranges {
my $code_point = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- local $addr = main::objaddr $self if ! defined $addr;
+ my $addr; { no overloading; $addr = 0+$self; }
return if $code_point > $max{$addr};
my $r = $ranges{$addr}; # The current list of ranges
Carp::carp_extra_args(\%args) if main::DEBUG && %args;
- local $addr = main::objaddr($self) if ! defined $addr;
+ my $addr; { no overloading; $addr = 0+$self; }
if ($operation ne '+' && $operation ne '-') {
Carp::my_carp_bug("$owner_name_of{$addr}First parameter to _add_delete must be '+' or '-'. No action taken.");
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- local $addr = main::objaddr $self if ! defined $addr;
-
- undef $each_range_iterator{$addr};
+ no overloading;
+ undef $each_range_iterator{0+$self};
return;
}
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- local $addr = main::objaddr($self) if ! defined $addr;
+ my $addr; { no overloading; $addr = 0+$self; }
return if $self->is_empty;
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- local $addr = main::objaddr($self) if ! defined $addr;
+ my $addr; { no overloading; $addr = 0+$self; }
my $count = 0;
foreach my $range (@{$ranges{$addr}}) {
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- local $addr = main::objaddr($self) if ! defined $addr;
- return scalar @{$ranges{$addr}} == 0;
+ no overloading;
+ return scalar @{$ranges{0+$self}} == 0;
}
sub hash {
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- local $addr = main::objaddr($self) if ! defined $addr;
+ my $addr; { no overloading; $addr = 0+$self; }
# These are quickly computable. Return looks like 'min..max;count'
return $self->min . "..$max{$addr};" . scalar @{$ranges{$addr}};
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
# On first pass, don't choose less desirable code points; if no good
# one is found, repeat, allowing a less desirable one to be selected.
my $class = shift;
my $self = bless \do { my $anonymous_scalar }, $class;
- my $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
my %args = @_;
sub ranges {
# Returns the array of ranges associated with this table.
- return $range_list{main::objaddr shift}->ranges;
+ no overloading;
+ return $range_list{0+shift}->ranges;
}
sub add_alias {
# release
$name = ucfirst($name) unless $name =~ /^k[A-Z]/;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
# Figure out if should be loosely matched if not already specified.
if (! defined $loose_match) {
# This name may be shorter than any existing ones, so clear the cache
# of the shortest, so will have to be recalculated.
- undef $short_name{main::objaddr $self};
+ no overloading;
+ undef $short_name{0+$self};
return;
}
my $nominal_length_ptr = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
# For efficiency, don't recalculate, but this means that adding new
# aliases could change what the shortest is, so the code that does
chomp $description;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- push @{$description{main::objaddr $self}}, $description;
+ no overloading;
+ push @{$description{0+$self}}, $description;
return;
}
chomp $note;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- push @{$note{main::objaddr $self}}, $note;
+ no overloading;
+ push @{$note{0+$self}}, $note;
return;
}
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
chomp $comment;
- push @{$comment{main::objaddr $self}}, $comment;
+
+ no overloading;
+ push @{$comment{0+$self}}, $comment;
return;
}
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my @list = @{$comment{main::objaddr $self}};
+ my $addr; { no overloading; $addr = 0+$self; }
+ my @list = @{$comment{$addr}};
return @list if wantarray;
my $return = "";
foreach my $sentence (@list) {
# initialization for range lists.
my $self = shift;
+ my $addr; { no overloading; $addr = 0+$self; }
my $initialization = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
# Replace the current range list with a new one of the same exact
# type.
- my $class = ref $range_list{main::objaddr $self};
- $range_list{main::objaddr $self} = $class->new(Owner => $self,
+ my $class = ref $range_list{$addr};
+ $range_list{$addr} = $class->new(Owner => $self,
Initialize => $initialization);
return;
my $return = "";
$return .= $DEVELOPMENT_ONLY if $compare_versions;
$return .= $HEADER;
- $return .= $INTERNAL_ONLY if $internal_only{main::objaddr $self};
+ no overloading;
+ $return .= $INTERNAL_ONLY if $internal_only{0+$self};
return $return;
}
# the range
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
# Start with the header
my @OUT = $self->header;
my $info = shift; # Any message associated with it.
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
$status{$addr} = $status;
$status_info{$addr} = $info;
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
$locked{$addr} = "";
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
return 0 if ! $locked{$addr};
Carp::my_carp_bug("Can't modify a locked table. Stack trace of locking:\n$locked{$addr}\n\n");
my $self = shift;
# Rest of parameters passed on
- @{$file_path{main::objaddr $self}} = @_;
+ no overloading;
+ @{$file_path{0+$self}} = @_;
return
}
*$sub = sub {
use strict "refs";
my $self = shift;
- return $range_list{main::objaddr $self}->$sub(@_);
+ no overloading;
+ return $range_list{0+$self}->$sub(@_);
}
}
my $self = shift;
return if $self->carp_if_locked;
- return $range_list{main::objaddr $self}->$sub(@_);
+ no overloading;
+ return $range_list{0+$self}->$sub(@_);
}
}
_Range_List => $range_list,
%args);
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
$anomalous_entries{$addr} = [];
$core_access{$addr} = $core_access;
# Can't change the table if locked.
return if $self->carp_if_locked;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
$has_specials{$addr} = 1 if $type;
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
return "" unless @{$anomalous_entries{$addr}};
return join("\n", @{$anomalous_entries{$addr}}) . "\n";
return;
}
- my $addr = main::objaddr $self;
- my $other_addr = main::objaddr $other;
+ my $addr; { no overloading; $addr = 0+$self; }
+ my $other_addr; { no overloading; $other_addr = 0+$other; }
local $to_trace = 0 if main::DEBUG;
my $map = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
# Convert the input to the standard equivalent, if any (won't have any
# for $STRING properties)
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
# If overridden, use that
return $to_output_map{$addr} if defined $to_output_map{$addr};
# No sense generating a comment if aren't going to write it out.
return if ! $self->to_output_map;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
my $property = $self->property;
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
my $name = $self->property->swash_name;
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
return $self->SUPER::write(
($self->property == $block)
# places in this program that assume an equal sign)
$complete = $property->full_name . "=$complete" if $property != $perl;
-
my $self = $class->SUPER::new(%args,
Name => $name,
Complete_Name => $complete,
_Property => $property,
_Range_List => $range_list,
);
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
$conflicting{$addr} = [ ];
$equivalents{$addr} = [ ];
return if $self->carp_if_locked;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
if (ref $other) {
# be an optional parameter.
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
# Check if the conflicting name is exactly the same as any existing
# alias in this table (as long as there is a real object there to
}
# Two tables are equivalent if they have the same leader.
- return $leader{main::objaddr $self}
- == $leader{main::objaddr $other};
+ no overloading;
+ return $leader{0+$self} == $leader{0+$other};
return;
}
my $are_equivalent = $self->is_equivalent_to($other);
return if ! defined $are_equivalent || $are_equivalent;
- my $current_leader = ($related)
- ? $parent{main::objaddr $self}
- : $leader{main::objaddr $self};
+ my $addr; { no overloading; $addr = 0+$self; }
+ my $current_leader = ($related) ? $parent{$addr} : $leader{$addr};
if ($related &&
! $other->perl_extension
$related = 0;
}
- my $leader = main::objaddr $current_leader;
- my $other_addr = main::objaddr $other;
+ my $leader; { no overloading; $leader = 0+$current_leader; }
+ my $other_addr; { no overloading; $other_addr = 0+$other; }
# Any tables that are equivalent to or children of this table must now
# instead be equivalent to or (children) to the new leader (parent),
next if $table == $other;
trace "setting $other to be the leader of $table, status=$status" if main::DEBUG && $to_trace;
- my $table_addr = main::objaddr $table;
+ my $table_addr; { no overloading; $table_addr = 0+$table; }
$leader{$table_addr} = $other;
$matches_all{$table_addr} = $matches_all;
$self->_set_range_list($other->_range_list);
# an equivalent group
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $leader;
+ my $addr; { no overloading; $addr = 0+$leader; }
if ($leader{$addr} != $leader) {
Carp::my_carp_bug(<<END
&& $parent == $property->table('N')
&& defined (my $yes = $property->table('Y')))
{
- my $yes_addr = main::objaddr $yes;
+ my $yes_addr; { no overloading; $yes_addr = 0+$yes; }
@yes_perl_synonyms
= grep { $_->property == $perl }
main::uniques($yes,
my @conflicting; # Will hold the table conflicts.
# Look at the parent, any yes synonyms, and all the children
+ my $parent_addr; { no overloading; $parent_addr = 0+$parent; }
for my $table ($parent,
@yes_perl_synonyms,
- @{$children{main::objaddr $parent}})
+ @{$children{$parent_addr}})
{
- my $table_addr = main::objaddr $table;
+ my $table_addr; { no overloading; $table_addr = 0+$table; }
my $table_property = $table->property;
# Tables are separated by a blank line to create a grouping.
my %args = @_;
$self = bless \do { my $anonymous_scalar }, $class;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
$directory{$addr} = delete $args{'Directory'};
$file{$addr} = delete $args{'File'};
return $self;
}
else {
- $map{main::objaddr $self}->delete_range($other, $other);
+ no overloading;
+ $map{0+$self}->delete_range($other, $other);
}
return $self;
}
my $name = shift;
my %args = @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
my $table = $table_ref{$addr}{$name};
my $standard_name = main::standardize($name);
my $name = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
return $table_ref{$addr}{$name} if defined $table_ref{$addr}{$name};
# Return a list of pointers to all the match tables attached to this
# property
- return main::uniques(values %{$table_ref{main::objaddr shift}});
+ no overloading;
+ return main::uniques(values %{$table_ref{0+shift}});
}
sub directory {
# priority; 'undef' is returned if the type isn't defined;
# or $map_directory for everything else.
- my $addr = main::objaddr shift;
+ my $addr; { no overloading; $addr = 0+shift; }
return $directory{$addr} if defined $directory{$addr};
return undef if $type{$addr} == $UNKNOWN;
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
return $file{$addr} if defined $file{$addr};
return $map{$addr}->external_name;
# The whole point of this pseudo property is match tables.
return 1 if $self == $perl;
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
# Don't generate tables of code points that match the property values
# of a string property. Such a list would most likely have many
return;
}
- return $map{main::objaddr $self}->
- map_add_or_replace_non_nulls($map{main::objaddr $other});
+ no overloading;
+ return $map{0+$self}->map_add_or_replace_non_nulls($map{0+$other});
}
sub set_type {
return;
}
- $type{main::objaddr $self} = $type;
+ { no overloading; $type{0+$self} = $type; }
return if $type != $BINARY;
my $yes = $self->table('Y');
my $map = shift; # What the range maps to.
# Rest of parameters passed on.
- my $addr = main::objaddr $self;
+ my $addr; { no overloading; $addr = 0+$self; }
# If haven't the type of the property, gather information to figure it
# out.
my $self = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr($self);
+ my $addr; { no overloading; $addr = 0+$self; }
my $type = $type{$addr};
*$sub = sub {
use strict "refs";
my $self = shift;
- return $map{main::objaddr $self}->$sub(@_);
+ no overloading;
+ return $map{0+$self}->$sub(@_);
}
}
else {
# Keep track of cycles in the input, and refuse to infinitely loop
- if (defined $already_output{main::objaddr $item}) {
+ my $addr; { no overloading; $addr = 0+$item; }
+ if (defined $already_output{$addr}) {
return "${indent}ALREADY OUTPUT: $item\n";
}
- $already_output{main::objaddr $item} = $item;
+ $already_output{$addr} = $item;
if (ref $item eq 'ARRAY') {
my $using_brackets;
my $fields_ref = shift;
Carp::carp_extra_args(\@_) if main::DEBUG && @_;
- my $addr = main::objaddr $object;
+ my $addr; { no overloading; $addr = 0+$object; }
my %hash;
foreach my $key (keys %$fields_ref) {
}
else {
my $ref = ref $$which;
- my $addr = main::objaddr $$which;
+ my $addr; { no overloading; $addr = 0+$$which; }
$$which = "$ref ($addr)";
}
}
return 0 unless defined $other;
return 0 unless ref $other;
- return main::objaddr $self == main::objaddr $other;
+ no overloading;
+ return 0+$self == 0+$other;
}
sub _operator_not_equal {
$file->carp_bad_line("Unexpected property '$property_name'. Skipped");
next LINE;
}
- $property_addr = main::objaddr($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)
if $file->has_missings_defaults;
foreach my $default_ref (@missings_list) {
my $default = $default_ref->[0];
- my $addr = objaddr property_ref($default_ref->[1]);
+ my $addr; { no overloading; $addr = 0+property_ref($default_ref->[1]); }
# For string properties, the default is just what the
# file says, but non-string properties should already