[Rt-commit] rt branch, 4.2/remove-uncalled-method, created. rt-4.1.5-41-g7921da6

Alex Vandiver alexmv at bestpractical.com
Fri Dec 14 18:13:14 EST 2012


The branch, 4.2/remove-uncalled-method has been created
        at  7921da623e9772af623bb94b01d4c035be06adef (commit)

- Log -----------------------------------------------------------------
commit 7921da623e9772af623bb94b01d4c035be06adef
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Dec 14 18:08:46 2012 -0500

    Remove an uncalled internal methods
    
    Originally added in f767805, the only callsites for it were removed in
    c9a3dd6 and ec4507b.  Remove the uncalled method.

diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index 7faa223..7d4c7ee 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -590,67 +590,6 @@ sub Create {
 }
 
 
-
-
-=head2 _Parse822HeadersForAttributes Content
-
-Takes an RFC822 style message and parses its attributes into a hash.
-
-=cut
-
-sub _Parse822HeadersForAttributes {
-    my $self    = shift;
-    my $content = shift;
-    my %args;
-
-    my @lines = ( split ( /\n/, $content ) );
-    while ( defined( my $line = shift @lines ) ) {
-        if ( $line =~ /^(.*?):(?:\s+(.*))?$/ ) {
-            my $value = $2;
-            my $tag   = lc($1);
-
-            $tag =~ s/-//g;
-            if ( defined( $args{$tag} ) )
-            {    #if we're about to get a second value, make it an array
-                $args{$tag} = [ $args{$tag} ];
-            }
-            if ( ref( $args{$tag} ) )
-            {    #If it's an array, we want to push the value
-                push @{ $args{$tag} }, $value;
-            }
-            else {    #if there's nothing there, just set the value
-                $args{$tag} = $value;
-            }
-        } elsif ($line =~ /^$/) {
-
-            #TODO: this won't work, since "" isn't of the form "foo:value"
-
-                while ( defined( my $l = shift @lines ) ) {
-                    push @{ $args{'content'} }, $l;
-                }
-            }
-        
-    }
-
-    foreach my $date (qw(due starts started resolved)) {
-        my $dateobj = RT::Date->new(RT->SystemUser);
-        if ( defined ($args{$date}) and $args{$date} =~ /^\d+$/ ) {
-            $dateobj->Set( Format => 'unix', Value => $args{$date} );
-        }
-        else {
-            $dateobj->Set( Format => 'unknown', Value => $args{$date} );
-        }
-        $args{$date} = $dateobj->ISO;
-    }
-    $args{'mimeobj'} = MIME::Entity->new();
-    $args{'mimeobj'}->build(
-        Type => ( $args{'contenttype'} || 'text/plain' ),
-        Data => ($args{'content'} || '')
-    );
-
-    return (%args);
-}
-
 =head2 _CreateTicketGroups
 
 Create the ticket groups and links for this ticket. 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list