- avoid warnings for uninitialized values when using like()
authorplobbes <plobbes>
Sat, 10 Mar 2007 20:59:08 +0000 (20:59 +0000)
committerplobbes <plobbes>
Sat, 10 Mar 2007 20:59:08 +0000 (20:59 +0000)
t/credit_card.t

index 108f859..75e298f 100644 (file)
@@ -167,13 +167,15 @@ sub tx_check {
     $tx->test_transaction(1);
     $tx->submit;
 
-    is( $tx->is_success,  $o{is_success},  $o{desc} . ": " . tx_info($tx) );
-    is( $tx->result_code, $o{result_code}, "result_code(): RESULT" );
-    like( $tx->order_number, qr/^\w{12}/, "order_number() / PNREF" );
+    is( $tx->is_success,    $o{is_success},    "$o{desc}: " . tx_info($tx) );
+    is( $tx->result_code,   $o{result_code},   "result_code(): RESULT" );
     is( $tx->error_message, $o{error_message}, "error_message() / RESPMSG" );
     is( $tx->authorization, $o{authorization}, "authorization() / AUTHCODE" );
     is( $tx->avs_code,  $o{avs_code},  "avs_code() / AVSADDR and AVSZIP" );
     is( $tx->cvv2_code, $o{cvv2_code}, "cvv2_code() / CVV2MATCH" );
+
+    no warnings 'uninitialized';
+    like( $tx->order_number, qr/^\w{12}/, "order_number() / PNREF" );
 }
 
 sub tx_info {