[Rt-commit] rt branch, 3.8/perlcritic, updated. rt-3.8.10-169-g202995e

Alex Vandiver alexmv at bestpractical.com
Mon Jul 25 15:23:39 EDT 2011


The branch, 3.8/perlcritic has been updated
       via  202995e2ca1c766e9877b6d97349a7561a0c8b0e (commit)
       via  63408cfe0e26f411ee995babed23f880ab4a531a (commit)
      from  46b383d04ba594050ff82feca198416998e96a6b (commit)

Summary of changes:
 lib/RT/Groups_Overlay.pm |    1 -
 lib/RT/Ticket_Overlay.pm |   63 ----------------------------------------------
 2 files changed, 0 insertions(+), 64 deletions(-)

- Log -----------------------------------------------------------------
commit 63408cfe0e26f411ee995babed23f880ab4a531a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jul 21 20:42:06 2011 -0400

    _WhoHaveRoleRightSplitted should have been removed from Users in 932a5a2
    
    RT::Groups->_WhoHaveRoleRightSplitted was simply a proxy for the method
    in RT::Users, and should have been removed at the same time that the
    code was refactored and removed in Users

diff --git a/lib/RT/Groups_Overlay.pm b/lib/RT/Groups_Overlay.pm
index f1f53ec..9259774 100755
--- a/lib/RT/Groups_Overlay.pm
+++ b/lib/RT/Groups_Overlay.pm
@@ -367,7 +367,6 @@ sub _JoinGroupMembersForGroupRights {
 }
 sub _JoinACL                  { return (shift)->RT::Users::_JoinACL( @_ ) }
 sub _RoleClauses              { return (shift)->RT::Users::_RoleClauses( @_ ) }
-sub _WhoHaveRoleRightSplitted { return (shift)->RT::Users::_WhoHaveRoleRightSplitted( @_ ) }
 sub _GetEquivObjects          { return (shift)->RT::Users::_GetEquivObjects( @_ ) }
 sub WithGroupRight            { return (shift)->RT::Users::WhoHaveGroupRight( @_ ) }
 sub WithRoleRight             { return (shift)->RT::Users::WhoHaveRoleRight( @_ ) }

commit 202995e2ca1c766e9877b6d97349a7561a0c8b0e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jul 21 20:58:07 2011 -0400

    Remove _Parse822HeadersForAttributes, which was not removed in ec4507b
    
    ec4507b removed the one call site for _Parse822HeadersForAttributes,
    which was noted to be "stub code" at the time.  Remove the vestigial
    method it left behind.

diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index 700a5c6..162fcaa 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -703,69 +703,6 @@ sub Create {
 
 # }}}
 
-# {{{ _Parse822HeadersForAttributes Content
-
-=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);
-}
-
-# }}}
-
 # {{{ sub Import
 
 =head2 Import PARAMHASH

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


More information about the Rt-commit mailing list