in reply to Re^2: Hash value test of zero
in thread Hash value test of zero
Mario is the only Perl programmer I know who has used dualvar in production code
Well now you know two, because I delight in using dualvars for XS constants :-)
Output:use Fluent::LibFluentBit qw( FLB_LIB_NO_CONFIG_MAP ); say FLB_LIB_NO_CONFIG_MAP; say 0+FLB_LIB_NO_CONFIG_MAP;
FLB_LIB_NO_CONFIG_MAP 2
The great part is that when you pass them to XS functions, they pass the integer that XS is looking for, and when you dump those parameters to STDOUT or a logger, you get the constant name so you can understand what is going on.
|
---|