File: box-scaling.t

package info (click to toggle)
libdata-showtable-perl 4.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,032 kB
  • sloc: perl: 2,221; sh: 38; makefile: 7
file content (28 lines) | stat: -rwxr-xr-x 637 bytes parent folder | download | duplicates (63)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env perl

($DIR,$PROG) = $0 =~ m=^(.*/)?([^/]+)$=;
$DIR =~ s=/$== || chop($DIR = `pwd`);

($type,$what) = $PROG =~ /^(\w+)-(\w+)\./;

%types = ( 	list => 'ShowListTable', 
		html => 'ShowHTMLTable',
		box  => 'ShowBoxTable',
		simple => 'ShowSimpleTable',
		table => 'ShowTable',
	);

if (defined $types{$type}) {
  $showSub = $types{$type};
} else {
  die "I don't know about \"$type\" types!\n";
}
$showSub = \&$showSub;

$what = "t/$what" if -d "t" && !-r "$what.pl";
-r "$what.pl" or die "I don't know how to do \"$what\"!\n";

unshift(@INC,'../blib/lib') if -d '../blib/lib';
unshift(@INC,'t') if -d 't';

do "$what.pl";