Skip Menu |

This queue is for tickets about the Log-Log4perl CPAN distribution.

Report information
The Basics
Id: 68105
Status: resolved
Priority: 0/
Queue: Log-Log4perl

People
Owner: Nobody in particular
Requestors: frioux [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: new method of initializing fails with actual code refs
I would expect the following code to work: #!/usr/bin/env perl use strict; use warnings; use Log::Log4perl; Log::Log4perl->init({ 'log4perl.rootLogger' => 'ALL, FILE', 'log4perl.appender.FILE' => 'Log::Log4perl::Appender::File', 'log4perl.appender.FILE.filename' => sub { "test.log" }, 'log4perl.appender.FILE.layout' => 'PatternLayout', 'log4perl.appender.FILE.layout.ConversionPattern' => '[%r] %F %L %c - %m%n', }); Log::Log4perl->get_logger->debug('Logger intialized'); open my $fh, '<', 'test.log'; warn join '', $fh; But sadly it just doesn't. You must quote the subroutine into a string.