File: ok.pl

package info (click to toggle)
perl 5.42.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 128,392 kB
  • sloc: perl: 534,963; ansic: 240,563; sh: 72,042; pascal: 6,934; xml: 2,428; yacc: 1,360; makefile: 1,197; cpp: 208; lisp: 1
file content (5 lines) | stat: -rw-r--r-- 231 bytes parent folder | download | duplicates (3)
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;