Skip Menu |

This queue is for tickets about the Config-General CPAN distribution.

Report information
The Basics
Id: 47479
Status: resolved
Priority: 0/
Queue: Config-General

People
Owner: tlinden [...] cpan.org
Requestors: richard.gerber [...] etat.ge.ch
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.42
Fixed in: 2.37



Subject: It is not possible to avoid interpolation of $0
Hello, It is not possible to avoid interpolation of $0 (placed in a sub) in the case of InterPolateVars is set to 1. I've tried with \, \\, ... Thank you by advance and best regards, Richard #--------------------------------------------------- Code : Readonly::Hash my %config => ParseConfig( -ConfigFile => $config_file, -InterPolateVars => 1, -InterPolateEnv => 1, -IncludeRelative => 1, -BackslashEscape => 1, ); #--------------------------------------------------- Config $config_file : <<include /data/conf_env/_log4perl.conf>> batch_log_dir = /data/batch/log <log4perl_batch> log4perl.logger.batch_general = ${_LOGLEVEL_batch_general}, batch_general log4perl.appender.batch_general = Log::Log4perl::Appender::File log4perl.appender.batch_general.append = true log4perl.appender.batch_general.filename = sub { $0=~s[(.*\/)?(.*)][$2]; $0=~s[\.pl$][.log]; "$batch_log_dir/$0" } log4perl.appender.batch_general.layout = PatternLayout log4perl.appender.batch_general.layout.ConversionPattern = [%d] [%5p] %m%n </log4perl_batch> #--------------------------------------------------- Config file /data/conf_env/_log4perl.conf : _LOGLEVEL_Screen = DEBUG _LOGLEVEL_batch_general = DEBUG _LOGLEVEL_Catalyst = DEBUG #--------------------------------------------------- Error message : Can't evaluate 'sub { =~s[(.*/)?(.*)][]; =~s[.pl$][.log]; "/data/batch/log/" }' (syntax error at (eval 46) line 1, near "{ =~" ) at /usr/local/lib/perl5/site_perl/5.8.7/Log/Log4perl/Config.pm line 746. #---------------------------------------------------
Ok, I can reproduce the behavior, but I don't currently know how to fix it. Give me some more time...
fixed in 2.45.