in reply to Looking for a function that returns status of a scalar's numeric flags
You could probably use use B qw/svref_2object/; my $flags = svref_2object(\$val)->FLAGS;, but Tux's Data::Peek seems to have pretty nice interface:
use warnings; use strict; use Data::Dump; use Data::Peek qw/DDump/; my $x = "2.7"; dd {DDump $x}->{FLAGS}; dd $x; # changes flags dd {DDump $x}->{FLAGS}; __END__ { IsCOW => 1, POK => 1, pPOK => 1 } 2.7 { IsCOW => 1, NOK => 1, pIOK => 1, pNOK => 1, POK => 1, pPOK => 1 }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Looking for a function that returns status of a scalar's numeric flags
by syphilis (Archbishop) on Mar 23, 2020 at 03:57 UTC |