File: my_exec

package info (click to toggle)
libtest-harness-perl 3.12-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,456 kB
  • ctags: 550
  • sloc: perl: 16,945; makefile: 44; sh: 12
file content (22 lines) | stat: -rwxr-xr-x 387 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use strict;
use warnings;

my $url  = qr/^http/;
my $prog = shift;
if ( $prog !~ $url && !-e $prog ) {
    die "Cannot find ($prog)";
}
my @exec;

if ( 't/ruby.t' eq $prog ) {
    push @exec => '/usr/bin/ruby', $prog;
}
elsif ( $prog =~ $url ) {
    push @exec => 'bin/test_html.pl', $prog;
}
else {
    push @exec, $prog;
}
exec @exec or die "Cannot (exec @exec): $!";