sub new { my ($p, $v) = @_; bless \$v, $p }
sub iter { my ($x) = @_; return undef if $$x < 0; return $$x--; }
}
-{
+
+# XXX iterator overload not intended to work with CORE::GLOBAL?
+if (defined &CORE::GLOBAL::glob) {
+ test '1', '1'; # 175
+ test '1', '1'; # 176
+ test '1', '1'; # 177
+}
+else {
my $iter = iterator->new(5);
my $acc = '';
my $out;
}, 'deref';
# Hash:
my @cont = sort %$deref;
- test "@cont", '23 5 fake foo'; # 178
+ if ("\t" eq "\011") { # ascii
+ test "@cont", '23 5 fake foo'; # 178
+ }
+ else { # ebcdic alpha-numeric sort order
+ test "@cont", 'fake foo 23 5'; # 178
+ }
my @keys = sort keys %$deref;
test "@keys", 'fake foo'; # 179
my @val = sort values %$deref;
$bar->{three} = 13;
test $bar->[3], 13; # 206
+{
+ package B;
+ use overload bool => sub { ${+shift} };
+}
+
+my $aaa;
+{ my $bbbb = 0; $aaa = bless \$bbbb, B }
+
+test !$aaa, 1;
+
+unless ($aaa) {
+ test 'ok', 'ok';
+} else {
+ test 'is not', 'ok';
+}
+
+
# Last test is:
-sub last {206}
+sub last {208}