File: ok.pl

package info (click to toggle)
perl 5.40.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 126,152 kB
  • sloc: ansic: 668,539; perl: 525,522; sh: 72,038; pascal: 6,925; xml: 2,428; yacc: 1,410; makefile: 1,191; cpp: 208; lisp: 1
file content (5 lines) | stat: -rw-r--r-- 231 bytes parent folder | download | duplicates (4)
1
2
3
4
5
use strict; use warnings;
my $_t;
sub ok { print +( $_[0] ? 'ok ' : 'not ok ' ) . ++$_t . ( $_[1] ? " - $_[1]\n" : "\n" ); !!$_[0] }
sub diag { s/^/# /gm, s/\Z.*/\n/s, print for join '', map +( defined $_ ? $_ : 'undef' ), @_ }
1;