--- 3m-810.pl 2008/09/28 18:13:21 5 +++ 3m-810.pl 2008/09/28 18:19:37 6 @@ -153,7 +153,7 @@ { my $str=shift; my $count = $port->write($str); - print ">> ", as_hex( $str ), "\t[$count]\n"; + print "#> ", as_hex( $str ), "\t[$count]\n"; } sub as_hex { @@ -206,15 +206,15 @@ my $patt = substr( str2bytes($pattern), 3 ); # just payload my $l = length($patt); my $p = substr( $assert->{payload}, 0, $l ); - warn "## dispatch pattern $pattern [$l] ",dump( $patt, $p ); + warn "## dispatch pattern $pattern [$l] ",dump( $patt, $p ) if $debug; if ( $assert->{payload} eq $assert->{expect} ) { - warn "## no dispatch, payload expected\n"; + warn "## no dispatch, payload expected" if $debug; } elsif ( $p eq $patt ) { # if matched call with rest of payload $coderef->( substr( $assert->{payload}, $l ) ); } else { - warn "## dispatch ignored\n"; + warn "## dispatch ignored" if $debug; } }