Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello, Does anyone know how to get a hold of Theo Lengyel? His domain is down.

Barring that, I have an interesting problem. I'm trying to use the Log::Easy module; For some reason, I can't export the log_level variable. I use the module like this:

use Log::Easy qw ( log_level ); .... $log_obj = new Log::Easy; $log_obj->log_file("./psql_connector.log"); $log_obj->write(INFO, "Entering MessageLoop; starting operation.\n");

...and Perl gives a bunch of compilation errors, complaining about barewords (INFO, WARN, etc.). It also complains about the log_level variable isn't exported, even though it seems to be.

What am I doing wrong here?

Thanks, --Josh

Replies are listed 'Best First'.
Re: Theo Lengyel / Log::Easy
by friedo (Prior) on Jan 23, 2005 at 03:39 UTC
    log_level is actually an export tag, so you need to preface it with a colon:

    use Log::Easy qw( :log_level );