http://www.perlmonks.org?node_id=853063


in reply to Re^2: Import constants?
in thread Import constants?

Try something like

use DBIx::Log4perl qw(:masks); $DBIx::Log4perl::LogMask = DBIX_L4P_LOG_OUTPUT | DBIX_L4P_LOG_INPUT;

The values of the constants represent individual bits being set, i.e.

(binary) DBIX_L4P_LOG_INPUT 1 00000001 DBIX_L4P_LOG_OUTPUT 2 00000010

Each bit activates a certain functionality. You can combine them using bitwise or (|), e.g.

00000001 00000010 -------- 00000011

The resulting value has all bits set which were set in any of the or'ed input values.