Committer: ailyin
LJSUP-10483 (Selfpromo delivery mechanics is broken): remove trailing whitespace; no functional changesU trunk/cgi-bin/LJ/Pay/Payment/PayItem.pm
Modified: trunk/cgi-bin/LJ/Pay/Payment/PayItem.pm =================================================================== --- trunk/cgi-bin/LJ/Pay/Payment/PayItem.pm 2012-01-24 09:23:04 UTC (rev 11345) +++ trunk/cgi-bin/LJ/Pay/Payment/PayItem.pm 2012-01-24 09:42:58 UTC (rev 11346) @@ -96,14 +96,14 @@ my %args = @_; my $class = ref($s) || $s; - if ($class eq 'LJ::Pay::Payment::PayItem') { + if ($class eq 'LJ::Pay::Payment::PayItem') { # parent class call -> need factory my $item = $args{item}; ## Exception: UserHeads has a 'uh-\d+' coding in a paidexp table $item = ($item =~ m#uh-\d+#) ? 'userhead' : $item; - ## - my $child_class = $class->get_class_for_item($item) + ## + my $child_class = $class->get_class_for_item($item) or return _err("No class for item '$args{item}'"); return $child_class->new_memonly(%args); } else { @@ -611,13 +611,13 @@ my ($self, $payment, $now, $note_rec_change) = @_; die "UNDEF instead of payment object" unless $payment; - + ## some debug info - ## $::VERBOSE is set in bin/ljmain.pl script, default value is 1, 2=verbose - my $item_id = sprintf "piid=%s, item=%s, subitem=%s", + ## $::VERBOSE is set in bin/ljmain.pl script, default value is 1, 2=verbose + my $item_id = sprintf "piid=%s, item=%s, subitem=%s", $self->get_piid, $self->get_item, $self->get_subitem; warn "[$item_id]: trying to deliver" if $::VERBOSE>1; - + if ($self->get_giveafter > $now) { warn "[$item_id]: too early (now=$now, giveafter=", $self->get_giveafter, ")" if $::VERBOSE>1; return; @@ -686,9 +686,9 @@ 'force_schwartz' => 1, }); } - + warn "[$item_id]: item delivered" if $::VERBOSE>1; - + return 1; }