11 |
#BEGIN { $SIG{'__WARN__'} = sub { cluck @_; } } |
#BEGIN { $SIG{'__WARN__'} = sub { cluck @_; } } |
12 |
#BEGIN { $SIG{'__DIE__'} = sub { confess @_; } } |
#BEGIN { $SIG{'__DIE__'} = sub { confess @_; } } |
13 |
|
|
14 |
|
my $usage = "$0 [options] <sourcefile> |
15 |
|
Options: |
16 |
|
-E ???? |
17 |
|
--tree ???? |
18 |
|
--code ???? |
19 |
|
--debug increase debug output |
20 |
|
--include-path=<path> search for included files in colon-separated <path> |
21 |
|
"; |
22 |
|
|
23 |
my $exec = 1; |
my $exec = 1; |
24 |
my $tree = 0; |
my $tree = 0; |
25 |
my $code = 0; |
my $code = 0; |
26 |
our $DEBUG = 0; |
our $DEBUG = 0; |
27 |
|
my $include_path = undef; |
28 |
GetOptions('exec!' => \$exec, |
GetOptions('exec!' => \$exec, |
29 |
'E' => sub { $exec = 0; $code = 1 }, |
'E' => sub { $exec = 0; $code = 1 }, |
30 |
'tree' => \$tree, |
'tree' => \$tree, |
31 |
'code' => \$code, |
'code' => \$code, |
32 |
'debug+' => \$DEBUG, |
'debug+' => \$DEBUG, |
33 |
); |
'include-path=s' => \$include_path |
34 |
|
) or die $usage; |
35 |
|
|
36 |
|
$ENV{'NEB_PATH'} = $include_path if defined($include_path); |
37 |
|
|
38 |
foreach my $file (@ARGV) |
foreach my $file (@ARGV) |
39 |
{ |
{ |