[Rt-devel] Question re. Email.pm code change in RT 3.4.6
Stephen Turner
sturner at MIT.EDU
Mon Jul 14 16:27:28 EDT 2008
Between RT 3.4.5 and 3.4.6, the way Email.pm looks through the
MailPlugins list changed from using $_ to using a local variable:
From:
$_ = "RT::Interface::Email::".$_ unless $_ =~
/^RT::Interface::Email::/;
eval "require $_;";
To:
my $Class = $_;
$Class = "RT::Interface::Email::" . $Class
unless $Class =~ /^RT::Interface::Email::/;
$Class->require or
do { $RT::Logger->error("Couldn't load $Class: $@"); next };
Does anyone remember exactly why? I ask because we're using the older
code and we're seeing an intermittent problem in which $_ appears to
be set to "RT::Interface::Email::" at the eval, causing the require
to fail, and users' email to be returned with the 'Could not load
valid user" message. Was this the same reason the code change was
made? I checked the 3.4.6 Changelog but couldn't see an entry that
told me the answer.
Thanks,
Steve
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT Information Services and Technology (IS&T)
More information about the Rt-devel
mailing list