File: run_with_inc.pl

package info (click to toggle)
libpar-packer-perl 1.063-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,380 kB
  • sloc: perl: 12,859; ansic: 1,486; makefile: 30; sh: 5
file content (13 lines) | stat: -rw-r--r-- 316 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!perl

use strict;
use warnings;

use File::Temp;
$ENV{PAR_TMPDIR} = File::Temp::tempdir(TMPDIR => 1, CLEANUP => 1);

# add -I options corresponding to @INC after the first element of @ARGV,
# then execute it
splice @ARGV, 1, 0, map { "-I$_" } @INC; 
system(@ARGV) == 0
    or die "system(@ARGV) failed: \$?=$?\n";