problem was scalar context propogating to the wrong place in the grep
[freeside.git] / FS / FS / part_export / communigate_pro.pm
index a9d9591..9a4539a 100644 (file)
@@ -78,9 +78,8 @@ sub _export_unsuspend {
 sub communigate_pro_queue {
   my( $self, $svcnum, $method ) = (shift, shift, shift);
   my @kludge_methods = qw(CreateAccount UpdateAccountSettings);
-  my $sub = grep { $method eq $_ } @kludge_methods
-              ? $method
-              : 'communigate_pro_command';
+  my $sub = 'communigate_pro_command';
+  $sub = $method if grep { $method eq $_ } @kludge_methods;
   my $queue = new FS::queue {
     'svcnum' => $svcnum,
     'job'    => "FS::part_export::communigate_pro::$sub",