in reply to Re^4: Dumping opaque objects
in thread Dumping opaque objects
You can also use the B module instead of XS/Inline::C to determine whether a scalar is an IV or an NV or a PV or a combination thereof.use warnings; use Math::BigInt; use Math::GMP; my $v = 9; my %h = (foo => $v); for (\%h, [$v], \$v, Math::GMP->new($v), Math::BigInt->new($v), $v) { ref($_) ? print ref($_), "\n" : print "Not a reference\n"; } __END__ Outputs: HASH ARRAY SCALAR Math::GMP Math::BigInt not a reference
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Dumping opaque objects
by hv (Prior) on Jan 25, 2022 at 13:58 UTC |