1 /* Test PERLREXX.DLL */
3 perlrexx.cmd BEGIN {push @INC, 'lib'} use OS2::REXX; REXX_eval "address cmd\n'copyy'";
6 call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
10 retval = runperl(args)
11 say 'retval = "'retval'"'
17 r = RxFuncAdd(perlf, pathname, perlf)
18 say "RxFuncAdd("perlf","pathname") -> "r
24 call addperl('PERLTERM')
25 call addperl('PERLEXIT')
26 call addperl('PERLEVAL')
27 call addperl('PERLLASTERROR')
28 signal on syntax name runperl_error
29 /* signal on error name runperl_error
30 signal on failure name runperl_error */
31 say "doing PERLEVAL("perlarg")"
32 tmp = PERLEVAL(perlarg)
33 say "PERLEVAL -> '"tmp"'"
35 call RxFuncDrop 'PERL'
36 call RxFuncDrop 'PERLLASTERROR'
37 call RxFuncDrop 'PERLTERM'
38 call RxFuncDrop 'PERLEVAL'
40 call RxFuncDrop 'PERLEXIT'
41 return pathname ': PERLEVAL('perlarg') =' tmp
46 r = RxFuncAdd("PerlExportAll", pathname, "PERLEXPORTALL")
47 say "RxFuncAdd("'PerlExportAll'","pathname") -> "r
49 say "PerlExportAll() -> "r
50 signal on syntax name runperl_error
51 /* signal on error name runperl_error
52 signal on failure name runperl_error */
53 say "doing PERLEVAL("perlarg")"
54 tmp = PERLEVAL(perlarg)
55 say "PERLEVAL -> '"tmp"'"
56 address evalperl perlarg
57 say "Did address evalperl "perlarg
60 /* The following line is not reached... Why? */
61 say "PerlDropAllExit() -> "r
62 return pathname ': PERLEVAL('perlarg') =' tmp
66 return pathname ': REXX->Perl interface not available; rc="'rc'", .rs="'.rs'", errstr="'errortext(rc)'", perlerr="'PERLLASTERROR()'"'
68 /* return pathname ': REXX->Perl interface not available; rc="'rc'", .rs="'.rs'", errstr="'errortext(rc)'", perlerr="???"' */