Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: blue [...] thisisnotmyrealemail.com
Cc:
AdminCc:

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



Subject: warnings when viewing pod
$ perldoc Log::Log4Perl Subroutine import redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 76. Subroutine initialized redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 214. Subroutine new redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 220. Subroutine reset redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 227. Subroutine init_once redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 234. Subroutine init redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 241. Subroutine init_and_watch redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 255. Subroutine easy_init redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 270. Subroutine wrapper_register redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 348. Subroutine get_logger redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 356. Subroutine caller_depth_offset redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 398. Subroutine appenders redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 418. Subroutine add_appender redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 424. Subroutine appender_thresholds_adjust redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 439. Subroutine appender_by_name redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 484. Subroutine eradicate_appender redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 502. Subroutine infiltrate_lwp redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 510. Subroutine easy_closure_create redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 531. Subroutine easy_closure_cleanup redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 545. Subroutine easy_closure_category_cleanup redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 562. Subroutine easy_closure_global_cleanup redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 578. Subroutine easy_closure_logger_remove redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 587. Subroutine remove_logger redefined at /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 602.
On Wed Mar 19 17:29:12 2014, blue wrote: Show quoted text
> $ perldoc Log::Log4Perl > Subroutine import redefined at > /home/perl/lib/site_perl/5.18.2/Log/Log4Perl.pm line 76.
Interesting, I've seen this warning when running "perl -Ilib lib/Log/Log4perl.pm" in the Log4perl distro package, but never with perldoc, in your version of perl, perldoc seems to run the code, which doesn't seem right. Anyway, the underlying problem is what I consider a bug in perl, namely if you have # A.pm package A; use warnings; use B; sub somesub { 1 } 1; and # B.pm package B; use A; 1; and then run $ perl -I. A.pm then perl will throw the warning "Subroutine somesub redefined at A.pm line 5.". Some people tried to explain it (see http://stackoverflow.com/questions/3428264/perl-subroutine-redefined), but in the end it's a bug and should be fixed in the perl core, which should be smart enough to detect the cycle. Log4perl could work around it by using "require" instead of "use", but in the end, I'd rather see it fixed in perl itself.