[Bps-public-commit] r11455 - SVN-PropDB/lib/Prophet/Sync/Source

clkao at bestpractical.com clkao at bestpractical.com
Thu Apr 3 20:41:29 EDT 2008


Author: clkao
Date: Thu Apr  3 20:41:27 2008
New Revision: 11455

Modified:
   SVN-PropDB/lib/Prophet/Sync/Source/RT.pm

Log:
warn about unhandled txn type and perltidy.

Modified: SVN-PropDB/lib/Prophet/Sync/Source/RT.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Sync/Source/RT.pm	(original)
+++ SVN-PropDB/lib/Prophet/Sync/Source/RT.pm	Thu Apr  3 20:41:27 2008
@@ -120,19 +120,23 @@
     map { $create_state->{$_} =~ s/ minutes$// }  qw(TimeWorked TimeLeft TimeEstimated);
     my @changesets;
     for my $txn ( sort { $b->{'id'} <=> $a->{'id'} } @{ $args{'transactions'} } ) {
-        warn "HANDLING " . $txn->{id} . " " . $txn->{Type};
-
-
-        if (my $sub = $self->can('_recode_txn_'.$txn->{'Type'})) {
-        my $changeset = Prophet::ChangeSet->new(
-            {   original_source_uuid => $self->uuid,
-                original_sequence_no => $txn->{'id'},
-
-            }
-        );
-              $sub->($self, ticket => $ticket, create_state => $create_state, txn => $txn, changeset => $changeset);
+        if ( my $sub = $self->can( '_recode_txn_' . $txn->{'Type'} ) ) {
+            my $changeset = Prophet::ChangeSet->new(
+                {
+                    original_source_uuid => $self->uuid,
+                    original_sequence_no => $txn->{'id'},
+                }
+            );
+            $sub->( $self,
+                ticket       => $ticket,
+                create_state => $create_state,
+                txn          => $txn,
+                changeset    => $changeset );
             unshift @changesets, $changeset unless $changeset->is_empty;
         }
+        else {
+            warn "not handling txn type $txn->{Type} for $txn->{id} (Ticket $args{ticket}{id}) yet";
+        }
 
     }
 



More information about the Bps-public-commit mailing list