testplc.sh 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. #!/bin/bash
  2. # Usage:
  3. # for p in 5.6.2 5.8.9d 5.10.1 5.11.2; do make -q clean >/dev/null; perl$p Makefile.PL; t/testplc.sh -q -c; done
  4. # use the actual perl from the Makefile (perld, perl5.10.0, perl5.8.8, perl5.11.0, ...)
  5. function help {
  6. echo "t/testplc.sh [OPTIONS] [1-$ntests]"
  7. echo " -s skip all B:Debug, roundtrips and options"
  8. echo " -S skip all roundtrips and options but -S and Concise"
  9. echo " -c continue on errors"
  10. echo " -o orig. no -Mblib. only for 5.6 and 5.8"
  11. echo " -q quiet"
  12. echo " -h help"
  13. echo "t/testplc.sh -q -s -c <=> perl -Mblib t/bytecode.t"
  14. echo "Without arguments try all $ntests tests. Else the given test numbers."
  15. }
  16. PERL=`grep "^PERL =" Makefile|cut -c8-`
  17. PERL=${PERL:-perl}
  18. VERS=`echo $PERL|sed -e's,.*perl,,' -e's,.exe$,,'`
  19. D="`$PERL -e'print (($] < 5.007) ? q(256) : q(v))'`"
  20. v518=`$PERL -e'print (($] < 5.018)?0:1)'`
  21. function init {
  22. # test what? core or our module?
  23. Mblib="`$PERL -e'print (($] < 5.008) ? q() : q(-Iblib/arch -Iblib/lib))'`"
  24. #Mblib=${Mblib:--Mblib} # B::C is now fully 5.6+5.8 backwards compatible
  25. OCMD="$PERL $Mblib -MO=Bytecode,"
  26. QOCMD="$PERL $Mblib -MO=-qq,Bytecode,"
  27. ICMD="$PERL $Mblib -MByteLoader"
  28. if [ "$D" = "256" ]; then QOCMD=$OCMD; fi
  29. if [ "$Mblib" = " " ]; then VERS="${VERS}_global"; fi
  30. }
  31. function pass {
  32. echo -e -n "\033[1;32mPASS \033[0;0m"
  33. echo $*
  34. }
  35. function fail {
  36. echo -e -n "\033[1;31mFAIL \033[0;0m"
  37. echo $*
  38. }
  39. function bcall {
  40. o=$1
  41. opt=${2:-s}
  42. ext=${3:-plc}
  43. optf=$(echo $opt|sed 's/,-//g')
  44. [ -n "$Q" ] || echo ${QOCMD}-$opt,-o${o}${optf}_${VERS}.${ext} ${o}.pl
  45. ${QOCMD}-$opt,-o${o}${optf}_${VERS}.${ext} ${o}.pl
  46. }
  47. function btest {
  48. n=$1
  49. o="bytecode$n"
  50. if [ -z "$2" ]; then
  51. if [ "$n" = "08" ]; then n=8; fi
  52. if [ "$n" = "09" ]; then n=9; fi
  53. echo "${tests[${n}]}" > ${o}.pl
  54. test -z "${tests[${n}]}" && exit
  55. str="${tests[${n}]}"
  56. else
  57. echo "$2" > ${o}.pl
  58. fi
  59. #bcall ${o} O6
  60. rm ${o}_s_${VERS}.plc 2>/dev/null
  61. # annotated assembler
  62. if [ -z "$SKIP" -o -n "$SKI" ]; then
  63. if [ "$Mblib" != " " ]; then
  64. bcall ${o} S,-s asm 1
  65. bcall ${o} S,-k asm 1
  66. bcall ${o} S,-i,-b asm 1
  67. fi
  68. fi
  69. if [ "$Mblib" != " " -a -z "$SKIP" ]; then
  70. m=${o}s_${VERS}
  71. rm ${m}.disasm ${o}_${VERS}.concise ${o}_${VERS}.dbg 2>/dev/null
  72. bcall ${o} s
  73. [ -n "$Q" ] || echo $PERL $Mblib script/disassemble $m.plc \> ${m}.disasm
  74. $PERL $Mblib script/disassemble $m.plc > ${m}.disasm
  75. [ -n "$Q" ] || echo ${ICMD} ${m}.plc
  76. res=$(${ICMD} ${m}.plc)
  77. if [ "X$res" != "X${result[$n]}" ]; then
  78. fail "./${m}.plc" "'$str' => '$res' Expected: '${result[$n]}'"
  79. fi
  80. # understand annotations
  81. m=${o}S_${VERS}
  82. [ -n "$Q" ] || echo $PERL $Mblib script/assemble ${o}s_${VERS}.disasm \> $m.plc
  83. $PERL $Mblib script/assemble ${o}s_${VERS}.disasm > $m.plc
  84. # full assembler roundtrips
  85. [ -n "$Q" ] || echo $PERL $Mblib script/disassemble $m.plc \> $m.disasm
  86. $PERL $Mblib script/disassemble $m.plc > $m.disasm
  87. md=${o}SD_${VERS}
  88. [ -n "$Q" ] || echo $PERL $Mblib script/assemble $m.disasm \> ${md}.plc
  89. $PERL $Mblib script/assemble $m.disasm > ${md}.plc
  90. [ -n "$Q" ] || echo $PERL $Mblib script/disassemble ${md}.plc \> ${o}SDS_${VERS}.disasm
  91. $PERL $Mblib script/disassemble ${md}.plc > ${o}SDS_${VERS}.disasm
  92. bcall ${o} i,-b
  93. m=${o}ib_${VERS}
  94. $PERL $Mblib script/disassemble ${m}.plc > ${m}.disasm
  95. [ -n "$Q" ] || echo ${ICMD} ${m}.plc
  96. res=$(${ICMD} ${m}.plc)
  97. if [ "X$res" = "X${result[$n]}" ]; then
  98. pass "./${m}.plc" "=> '$res'"
  99. else
  100. fail "./${m}.plc" "'$str' => '$res' Expected: '${result[$n]}'"
  101. fi
  102. bcall ${o} k
  103. m=${o}k_${VERS}
  104. $PERL $Mblib script/disassemble ${m}.plc > ${m}.disasm
  105. [ -n "$Q" ] || echo ${ICMD} ${m}.plc
  106. res=$(${ICMD} ${m}.plc)
  107. if [ "X$res" != "X${result[$n]}" ]; then
  108. fail "./${m}.plc" "'$str' => '$res' Expected: '${result[$n]}'"
  109. fi
  110. [ -n "$Q" ] || echo $PERL $Mblib -MO=${qq}Debug,-exec ${o}.pl -o ${o}_${VERS}.dbg
  111. [ -n "$Q" ] || $PERL $Mblib -MO=${qq}Debug,-exec ${o}.pl > ${o}_${VERS}.dbg
  112. fi
  113. if [ -z "$SKIP" -o -n "$SKI" ]; then
  114. # 5.8 has a bad concise
  115. [ -n "$Q" ] || echo $PERL $Mblib -MO=${qq}Concise,-exec ${o}.pl -o ${o}_${VERS}.concise
  116. $PERL $Mblib -MO=${qq}Concise,-exec ${o}.pl > ${o}_${VERS}.concise
  117. fi
  118. if [ -z "$SKIP" ]; then
  119. if [ "$Mblib" != " " ]; then
  120. #bcall ${o} TI
  121. bcall ${o} H
  122. m="${o}H_${VERS}"
  123. [ -n "$Q" ] || echo $PERL $Mblib ${m}.plc
  124. res=$($PERL $Mblib ${m}.plc)
  125. if [ "X$res" != "X${result[$n]}" ]; then
  126. fail "./${m}.plc" "'$str' => '$res' Expected: '${result[$n]}'"
  127. fi
  128. fi
  129. fi
  130. if [ "$Mblib" != " " ]; then
  131. # -s ("scan") should be the new default
  132. [ -n "$Q" ] || echo ${OCMD}-s,-o${o}.plc ${o}.pl
  133. ${OCMD}-s,-o${o}.plc ${o}.pl || (test -z $CONT && exit)
  134. else
  135. # No -s with 5.6
  136. [ -n "$Q" ] || echo ${OCMD}-o${o}.plc ${o}.pl
  137. ${OCMD}-o${o}.plc ${o}.pl || (test -z $CONT && exit)
  138. fi
  139. [ -n "$Q" ] || echo $PERL $Mblib script/disassemble ${o}.plc -o ${o}.disasm
  140. $PERL $Mblib script/disassemble ${o}.plc > ${o}.disasm
  141. [ -n "$Q" ] || echo ${ICMD} ${o}.plc
  142. res=$(${ICMD} ${o}.plc)
  143. if [ "X$res" = "X${result[$n]}" ]; then
  144. pass "./${o}.plc" "=> '$res'"
  145. else
  146. fail "./${o}.plc" "'$str' => '$res' Expected: '${result[$n]}'"
  147. if [ -z "$Q" ]; then
  148. echo -n "Again with -Dv? (or Ctrl-Break)"
  149. read
  150. echo ${ICMD} -D$D ${o}.plc; ${ICMD} -D$D ${o}.plc
  151. fi
  152. test -z $CONT && exit
  153. fi
  154. }
  155. ntests=50
  156. declare -a tests[$ntests]
  157. declare -a result[$ntests]
  158. tests[1]="print 'hi'"
  159. result[1]='hi'
  160. tests[2]="for (1,2,3) { print if /\d/ }"
  161. result[2]='123'
  162. tests[3]='$_ = "xyxyx"; %j=(1,2); s/x/$j{print("z")}/ge; print $_'
  163. result[3]='zzz2y2y2';
  164. tests[4]='$_ = "xyxyx"; %j=(1,2); s/x/$j{print("z")}/g; print $_'
  165. if [[ $v518 -gt 0 ]]; then result[4]='zzz2y2y2'; else result[4]='z2y2y2'; fi
  166. tests[5]='print split /a/,"bananarama"'
  167. result[5]='bnnrm'
  168. tests[6]="{package P; sub x {print 'ya'} x}"
  169. result[6]='ya'
  170. tests[7]='@z = split /:/,"b:r:n:f:g"; print @z'
  171. result[7]='brnfg'
  172. tests[8]='sub AUTOLOAD { print 1 } &{"a"}()'
  173. result[8]='1'
  174. tests[9]='my $l = 3; $x = sub { print $l }; &$x'
  175. result[9]='3'
  176. tests[10]='my $i = 1;
  177. my $foo = sub {
  178. $i = shift if @_
  179. }; print $i;
  180. print &$foo(3),$i;'
  181. result[10]='133'
  182. tests[11]='$x="Cannot use"; print index $x, "Can"'
  183. result[11]='0'
  184. tests[12]='my $i=6; eval "print \$i\n"'
  185. result[12]='6'
  186. tests[13]='BEGIN { %h=(1=>2,3=>4) } print $h{3}'
  187. result[13]='4'
  188. tests[14]='open our $T,"a"; print "ok";'
  189. result[14]='ok'
  190. tests[15]='print <DATA>
  191. __DATA__
  192. a
  193. b'
  194. result[15]='a
  195. b'
  196. tests[16]='BEGIN{tie @a, __PACKAGE__;sub TIEARRAY {bless{}} sub FETCH{1}}; print $a[1]'
  197. result[16]='1'
  198. tests[17]='my $i=3; print 1 .. $i'
  199. result[17]='123'
  200. tests[18]='my $h = { a=>3, b=>1 }; print sort {$h->{$a} <=> $h->{$b}} keys %$h'
  201. result[18]='ba'
  202. tests[19]='print sort { my $p; $b <=> $a } 1,4,3'
  203. result[19]='431'
  204. tests[20]='$a="abcd123";$r=qr/\d/;print $a=~$r;'
  205. result[20]='1'
  206. # broken on early alpha and 5.10
  207. tests[21]='sub skip_on_odd{next NUMBER if $_[0]% 2}NUMBER:for($i=0;$i<5;$i++){skip_on_odd($i);print $i;}'
  208. result[21]='024'
  209. # broken in original perl 5.6
  210. tests[22]='my $fh; BEGIN { open($fh,"<","/dev/null"); } print "ok";'
  211. result[22]='ok'
  212. # broken in perl 5.8
  213. tests[23]='package MyMod; our $VERSION = 1.3; print "ok";'
  214. result[23]='ok'
  215. # works in original perl 5.6, broken with B::C in 5.6, 5.8
  216. tests[24]='sub level1{return(level2()?"fail":"ok")} sub level2{0} print level1();'
  217. result[24]='ok'
  218. # enforce custom ncmp sort and count it. fails as CC in all. How to enforce icmp?
  219. # <=5.6 qsort needs two more passes here than >=5.8 merge_sort
  220. tests[25]='print sort { print $i++," "; $b <=> $a } 1..4'
  221. result[25]="0 1 2 3`$PERL -e'print (($] < 5.007) ? q( 4 5) : q())'` 4321";
  222. # lvalue fails with CC -O1, and with -O2 differently
  223. tests[26]='sub a:lvalue{my $a=26; ${\(bless \$a)}}sub b:lvalue{${\shift}}; print ${a(b)}'
  224. result[26]="26";
  225. # import test
  226. tests[27]='use Fcntl (); print "ok" if ( Fcntl::O_CREAT() >= 64 && &Fcntl::O_CREAT >= 64 );'
  227. result[27]='ok'
  228. # require test
  229. tests[28]='my($fname,$tmp_fh);while(!open($tmp_fh,">",($fname=q{cctest28_} . rand(999999999999)))){$bail++;die "Failed to create a tmp file after 500 tries" if $bail>500;}print {$tmp_fh} q{$x="ok";1;};close($tmp_fh);sleep 1;require $fname;unlink($fname);print $x;'
  230. result[28]='ok'
  231. # use test
  232. tests[29]='use IO;print "ok"'
  233. result[29]='ok'
  234. # run-time context of ..
  235. tests[30]='@a=(4,6,1,0,0,1);sub range{(shift @a)..(shift @a)}print range();while(@a){print scalar(range())}'
  236. result[30]='456123E0'
  237. # AUTOLOAD w/o goto
  238. tests[31]='package DummyShell;sub AUTOLOAD{my $p=$AUTOLOAD;$p=~s/.*:://;print(join(" ",$p,@_),";");} date();who("am","i");ls("-l");'
  239. result[31]='date;who am i;ls -l;'
  240. # CC entertry/jmpenv_jump/leavetry
  241. tests[32]='eval{print "1"};eval{die 1};print "2"'
  242. result[32]='12'
  243. # C qr test was broken in 5.6 -- needs to load an actual file to test. See test 20.
  244. # used to error with Can't locate object method "save" via package "U??WVS?-" (perhaps you forgot to load "U??WVS?-"?) at /usr/lib/perl5/5.6.2/i686-linux/B/C.pm line 676.
  245. # fails with new constant only. still not repro
  246. tests[33]='BEGIN{unshift @INC,("t");} use qr_loaded_module; print "ok";'
  247. result[33]='ok'
  248. # init of magic hashes. %ENV has e magic since a0714e2c perl.c
  249. # (Steven Schubiger 2006-02-03 17:24:49 +0100 3967) i.e. 5.8.9 but not 5.8.8
  250. tests[34]='my $x=$ENV{TMPDIR};print "ok"'
  251. result[34]='ok'
  252. # methodcall syntax
  253. tests[35]='package dummy;sub meth{print "ok"};package main;dummy->meth(1)'
  254. result[35]='ok'
  255. # HV self-ref
  256. tests[36]='my ($rv, %hv); %hv = ( key => \$rv ); $rv = \%hv; print "ok";'
  257. result[36]='ok'
  258. # AV self-ref
  259. tests[37]='my ($rv, @av); @av = ( \$rv ); $rv = \@av; print "ok";'
  260. result[37]='ok'
  261. # constant autoload loop crash test
  262. tests[38]='for(1 .. 1024) { if (open(my $null_fh,"<","/dev/null")) { seek($null_fh,0,SEEK_SET); close($null_fh); $ok++; } }if ($ok == 1024) { print "ok"; }'
  263. result[38]='ok'
  264. # check re::is_regexp, and on 5.12 if being upgraded to SVt_REGEXP
  265. usere="`$PERL -e'print (($] < 5.011) ? q(use re;) : q())'`"
  266. tests[39]=$usere'$a=qr/x/;print ($] < 5.010?1:re::is_regexp($a))'
  267. result[39]='1'
  268. # => Undefined subroutine &re::is_regexp with B-C-1.19, even with -ure
  269. # String with a null byte -- used to generate broken .c on 5.6.2 with static pvs
  270. tests[40]='my $var="this string has a null \\000 byte in it";print "ok";'
  271. result[40]='ok'
  272. # Shared scalar, n magic. => Don't know how to handle magic of type \156.
  273. usethreads="`$PERL -MConfig -e'print ($Config{useithreads} ? q(use threads;) : q())'`"
  274. #usethreads='BEGIN{use Config; unless ($Config{useithreads}) {print "ok"; exit}} '
  275. #;threads->create(sub{$s="ok"})->join;
  276. # not yet testing n, only P
  277. tests[41]=$usethreads'use threads::shared;{my $s="ok";share($s);print $s}'
  278. result[41]='ok'
  279. # Shared aggregate, P magic
  280. tests[42]=$usethreads'use threads::shared;my %h : shared; print "ok"'
  281. result[42]='ok'
  282. # Aggregate element, n + p magic
  283. tests[43]=$usethreads'use threads::shared;my @a : shared; $a[0]="ok"; print $a[0]'
  284. result[43]='ok'
  285. # perl #72922 (5.11.4 fails with magic_killbackrefs)
  286. tests[44]='use Scalar::Util "weaken";my $re1=qr/foo/;my $re2=$re1;weaken($re2);print "ok" if $re3=qr/$re1/;'
  287. result[44]='ok'
  288. # test dynamic loading
  289. tests[45]='use Data::Dumper ();Data::Dumper::Dumpxs({});print "ok";'
  290. result[45]='ok'
  291. # issue 79: Exporter:: stash missing in main::
  292. #tests[46]='use Exporter; if (exists $main::{"Exporter::"}) { print "ok"; }'
  293. tests[46]='use Exporter; print "ok" if %main::Exporter::'
  294. #tests[46]='use Exporter; print "ok" if scalar(keys(%main::Exporter::))'
  295. result[46]='ok'
  296. # non-tied av->MAGICAL
  297. tests[47]='@ISA=(q(ok));print $ISA[0];'
  298. result[47]='ok'
  299. # END block del_backref
  300. tests[48]='my $s=q{ok};END{print $s}'
  301. result[48]='ok'
  302. # even this failed until r1000, overlarge AvFILL=3 endav
  303. #tests[48]='print q(ok);END{}'
  304. #result[48]='ok
  305. # no-fold
  306. tests[49]='print q(ok) if "test" =~ /es/i;'
  307. result[49]='ok'
  308. # @ISA issue 64
  309. tests[50]='package Top;sub top{q(ok)};package Next;our @ISA=qw(Top);package main;print Next->top();'
  310. result[50]='ok'
  311. tests[51]='$SIG{__WARN__}=sub{print "ok"};warn 1;'
  312. result[51]='ok'
  313. # check if general signals work
  314. tests[511]='BEGIN{$SIG{USR1}=sub{$w++;};} kill USR1 => $$; print q(ok) if $w'
  315. result[511]='ok'
  316. #-------------
  317. # issue27
  318. tests[70]='require LWP::UserAgent;print q(ok);'
  319. result[70]='ok'
  320. # issue24
  321. tests[71]='dbmopen(%H,q(f),0644);print q(ok);'
  322. result[71]='ok'
  323. tests[81]='sub int::check {1} #create int package for types
  324. sub x(int,int) { @_ } #cvproto
  325. print "o" if prototype \&x eq "int,int";
  326. sub y($) { @_ } #cvproto
  327. print "k" if prototype \&y eq "\$";'
  328. result[81]='ok'
  329. tests[90]='my $s = q(test string);
  330. $s =~ s/(?<first>test) (?<second>string)/\2 \1/g;
  331. print q(o) if $s eq q(string test);
  332. q(test string) =~ /(?<first>\w+) (?<second>\w+)/;
  333. print q(k) if $+{first} eq q(test);'
  334. result[90]='ok'
  335. # IO handles
  336. tests[93]='
  337. my ($pid, $out, $in);
  338. BEGIN {
  339. local(*FPID);
  340. $pid = open(FPID, "echo <<EOF |"); # DIE
  341. open($out, ">&STDOUT"); # EASY
  342. open(my $tmp, ">", "pcc.tmp"); # HARD to get filename, WARN
  343. print $tmp "test\n";
  344. close $tmp; # OK closed
  345. open($in, "<", "pcc.tmp"); # HARD to get filename, WARN
  346. }
  347. # === run-time ===
  348. print $out "o";
  349. kill 0, $pid; # BAD! warn? die?
  350. print "k" if "test" eq read $in, my $x, 4;
  351. unlink "pcc.tmp";
  352. '
  353. result[93]='ok'
  354. tests[931]='my $f;BEGIN{open($f,"<README");}read $f,my $in, 2; print "ok"'
  355. result[931]='ok'
  356. tests[932]='my $f;BEGIN{open($f,">&STDOUT");}print $f "ok"'
  357. result[932]='ok'
  358. tests[97]='use v5.12; print q(ok);'
  359. result[97]='ok'
  360. tests[98]='BEGIN{$^H{feature_say} = 1;}
  361. sub test { eval(""); }
  362. print q(ok);'
  363. result[98]='ok'
  364. tests[105]='package A; use Storable qw/dclone/; my $a = \""; dclone $a; print q(ok);'
  365. result[105]='ok'
  366. if [[ $v518 -gt 0 ]]; then
  367. tests[130]='no warnings "experimental::lexical_subs";use feature "lexical_subs";my sub p{q(ok)}; my $a=\&p;print p;'
  368. result[130]='ok'
  369. fi
  370. #issue 30
  371. tests[230]='sub f1 { my($self) = @_; $self->f2;} sub f2 {} sub new {} print "@ARGV\n";'
  372. result[230]=''
  373. init
  374. while getopts "qsScoh" opt
  375. do
  376. if [ "$opt" = "q" ]; then
  377. Q=1
  378. OCMD="$QOCMD"
  379. qq="-qq,"
  380. if [ "$VERS" = "5.6.2" ]; then QOCMD=$OCMD; qq=""; fi
  381. fi
  382. if [ "$opt" = "s" ]; then SKIP=1; fi
  383. if [ "$opt" = "o" ]; then Mblib=" "; SKIP=1; SKI=1; init; fi
  384. if [ "$opt" = "S" ]; then SKIP=1; SKI=1; fi
  385. if [ "$opt" = "c" ]; then CONT=1; shift; fi
  386. if [ "$opt" = "h" ]; then help; exit; fi
  387. done
  388. if [ -z "$Q" ]; then
  389. make
  390. else
  391. make -s >/dev/null
  392. fi
  393. # need to shift the options
  394. while [ -n "$1" -a "${1:0:1}" = "-" ]; do shift; done
  395. if [ -n "$1" ]; then
  396. while [ -n "$1" ]; do
  397. btest $1
  398. shift
  399. done
  400. else
  401. for b in $(seq $ntests); do
  402. btest $b
  403. done
  404. fi
  405. # 5.8: all PASS
  406. # 5.10: FAIL: 2-5, 7, 11, 15. With -D 9-12 fail also.
  407. # 5.11: FAIL: 2-5, 7, 11, 15-16 (all segfaulting in REGEX). With -D 9-12 fail also.
  408. # 5.11d: WRONG 4, FAIL: 9-11, 15-16
  409. # 5.11d linux: WRONG 4, FAIL: 11, 16
  410. #only if ByteLoader installed in @INC
  411. if false; then
  412. echo ${OCMD}-H,-obytecode2.plc bytecode2.pl
  413. ${OCMD}-H,-obytecode2.plc bytecode2.pl
  414. chmod +x bytecode2.plc
  415. echo ./bytecode2.plc
  416. ./bytecode2.plc
  417. fi
  418. # package pmc
  419. if false; then
  420. echo "package MY::Test;" > bytecode1.pm
  421. echo "print 'hi'" >> bytecode1.pm
  422. echo ${OCMD}-m,-obytecode1.pmc bytecode1.pm
  423. ${OCMD}-obytecode1.pmc bytecode1.pm
  424. fi