@@ -282,27 +282,25 @@ class HLL::Compiler {
282
282
}
283
283
284
284
method command_line (@ args , * % adverbs ) {
285
+ # # this bizarre piece of code causes the compiler to
286
+ # # immediately abort if it looks like it's being run
287
+ # # from Perl's Test::Harness. (Test::Harness versions 2.64
288
+ # # from October 2006
289
+ # # and earlier have a hardwired commandline option that is
290
+ # # always passed to an initial run of the interpreter binary,
291
+ # # whether you want it or not.) We expect to remove this
292
+ # # check eventually (or make it a lot smarter than it is here).
293
+ if pir:: index (@ args [2 ], ' @INC' ) >= 0 {
294
+ pir::exit(0 );
295
+ }
296
+ my $ program-name := @ args [0 ];
285
297
Q : PIR {
286
298
.include 'except_severity.pasm'
287
299
.local pmc args, adverbs, self
288
300
args = find_lex '@args'
289
301
adverbs = find_lex '%adverbs'
290
302
self = find_lex 'self'
291
303
292
- ## this bizarre piece of code causes the compiler to
293
- ## immediately abort if it looks like it's being run
294
- ## from Perl's Test : :Harness. (Test ::Harness versions 2.64
295
- # # from October 2006
296
- # # and earlier have a hardwired commandline option that is
297
- # # always passed to an initial run of the interpreter binary,
298
- # # whether you want it or not.) We expect to remove this
299
- # # check eventually (or make it a lot smarter than it is here).
300
- $ S0 = args[2 ]
301
- $ I0 = index $ S0 , ' @INC'
302
- if $ I0 < 0 goto not_harness
303
- exit 0
304
- not_harness:
305
-
306
304
load_bytecode 'dumper.pbc'
307
305
load_bytecode 'PGE/Dumper.pbc'
308
306
0 commit comments