[Rt-commit] r9457 - rt/branches/3.6-RELEASE/lib/RT/Action

tla at bestpractical.com tla at bestpractical.com
Thu Oct 25 05:34:14 EDT 2007


Author: tla
Date: Thu Oct 25 05:33:58 2007
New Revision: 9457

Modified:
   rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm

Log:
refrain from shifting args off the argument array

Modified: rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm	(original)
+++ rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm	Thu Oct 25 05:33:58 2007
@@ -100,7 +100,9 @@
 # {{{ sub Commit
 
 sub Commit {
-    my $self = shift;
+    # DO NOT SHIFT ARGS in this subroutine.  It will break any lex-
+    # wrapping that extensions might do.
+    my $self = $_[0];
 
     my ($ret) = $self->SendMessage( $self->TemplateObj->MIMEObj );
     if ( $ret > 0 ) {
@@ -241,8 +243,9 @@
 =cut
 
 sub SendMessage {
-    my $self    = shift;
-    my $MIMEObj = shift;
+    # DO NOT SHIFT ARGS in this subroutine.  It will break any lex-
+    # wrapping that extensions might do.
+    my ( $self, $MIMEObj ) = @_;
 
     my $msgid = $MIMEObj->head->get('Message-ID');
     chomp $msgid;


More information about the Rt-commit mailing list