in reply to Import constants?

Any ideas?

Yes. You've C&P'd the exact information required to achieve your stated goal.

You haven't a) asked a question; b) cited an error; c) or said which bit you don't understand.

Attempt one of a, b or c.

Replies are listed 'Best First'.
Re^2: Import constants?
by DreamT (Pilgrim) on Aug 05, 2010 at 08:25 UTC
    Ok, then I will choose c :-) I don't understand how and in which order to put the different pieces.

      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.

        Maybe:

        use DBIx::Log4perl qw(:masks); my $dbh = DBIx::Log4perl->connect(...); $dnh->dbix_l4p_setattr( 'dbix_l4p_logmask', DBIX_L4P_LOG_TXN | DBIC_L4P_LOG_CONNECT | DBIX_L4P_LOG_INPUT | DBIX_L4P_LOG_ERRCAPTURE | DBIX_L4P_LOG_ERRORS | DBIX_L4P_LOG_DBDSPECIFIC ); ...

        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        I get
        Can't locate auto/DBIx/Log4perl/st/_dbix_l4p_p.al in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/local/share/perl/5.10.0/DBIx/Log4perl/st.pm line 281
        when running it, so mayme i'm missing something?