Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Devel

Question re. Email.pm code change in RT 3.4.6

 

 

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded


sturner at MIT

Jul 14, 2008, 1:27 PM

Post #1 of 3 (443 views)
Permalink
Question re. Email.pm code change in RT 3.4.6

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)

_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


jesse at bestpractical

Jul 14, 2008, 1:32 PM

Post #2 of 3 (397 views)
Permalink
Re: Question re. Email.pm code change in RT 3.4.6 [In reply to]

On Jul 14, 2008, at 4:27 PM, Stephen Turner wrote:

> 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?

* Killing string eval
* Dealing with weird issues where $_ isn't set properly
* Cleaning up the code.

at least, as i recall

> 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)
>
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>

_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


sturner at MIT

Jul 15, 2008, 8:05 AM

Post #3 of 3 (387 views)
Permalink
Re: Question re. Email.pm code change in RT 3.4.6 [In reply to]

At 7/14/2008 04:32 PM, Jesse Vincent wrote:


>* Dealing with weird issues where $_ isn't set properly
>

Thanks - I'm sure this is the part that was biting us.

Steve

_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.