Subject: | Mail::Box::init creates locker before directory is set up in Mail::Box::MH |
Running
perl -w -MMail::Box::MH -e "Mail::Box::MH->new(folder=>'.')"
gives two warnings:
Use of uninitialized value in transliteration (tr///) at C:/Perl/lib/File/Spec/Win32.pm line 99.
Use of uninitialized value in pattern match (m//) at C:/Perl/lib/File/Spec/Win32.pm line 101.
These caused by instantiating locker object in Mail::Box::init before 'MBD_directory' property is set in Mail::Box::Dir.
Call stack:
File::Spec::Win32::catdir('File::Spec','undef') called at C:/Perl/lib/File/Spec/Win32.pm line 90
File::Spec::Win32::catfile('File::Spec','undef') called at C:/Perl/site/lib/Mail/Box/Locker/DotLock.pm line 25
Mail::Box::Locker::DotLock::init('Mail::Box::Locker...','HASH(0x18f3d18)') called at C:/Perl/site/lib/Mail/Reporter.pm line 23
^^^^ $folder->directory is used here, and it returns value of MBD_directory
Mail::Reporter::new('Mail::Box::Locker...','timeout','undef','file','undef','method','undef','expires','undef',...) called at C:/Perl/site/lib/Mail/Box/Locker.pm line 50
Mail::Box::Locker::new('Mail::Box::Locker','folder','Mail::Box::MH=HAS...','method','undef','timeout','undef','expires','undef',...) called at C:/Perl/site/lib/Mail/Box.pm line 133
Mail::Box::init('Mail::Box::MH=HAS...','HASH(0x19ad08c)') called at C:/Perl/site/lib/Mail/Box/Dir.pm line 31
Mail::Box::Dir::init('Mail::Box::MH=HAS...','HASH(0x19ad08c)') called at C:/Perl/site/lib/Mail/Box/MH.pm line 29
^^^^^^^ $self->{MBD_directory} is set here, _after_ $self->SUPER::init
Mail::Box::MH::init('Mail::Box::MH=HAS...','HASH(0x19ad08c)') called at C:/Perl/site/lib/Mail/Reporter.pm line 23
Mail::Reporter::new('Mail::Box::MH','folder','c:/umka//xml/user...','folderdir','c:/umka//xml/user...','access','rw','create',1,...) called at C:/Perl/site/lib/Mail/Box.pm line 52
Mail::Box::new('Mail::Box::MH','folder','c:/umka//xml/user...','folderdir','c:/umka//xml/user...','access','rw','create',1,...) called at c:/umka/engine//Umka/Education/NewMail/Transport.pm line 33
Thanks.