M
mseele
Hi,
i have to "parse/compile" lot's of perl files (as fast as possible)
and work with the output (...Can't locate XYZ.pm in @INC (@INC
contains: XYZ) at - line 7. BEGIN failed--compilation aborted at -
line 7....).
For now i iterate over the files, create a new perl process for every
file (perl -c -W -Mstrict -I XYZ) and write the bytes of the current
file into the process.
But it is very expensive to start a new perl process for every file to
parse.
Is it possible to use only one perl process for parsing multiple perl
files?
I mean: open only one perl process, write in the bytes of a file, read
the output, "reset" the perl process (change @inc...), write in the
bytes of the next file, read the output, "reset" the perl
process...and so on till all files will be parsed/compiled. Then exit
the perl process. Is this possible?
What do i have to "reset/new initalize" after one file is processed?
Only the @INC or more?
How can i tell the perl process that one file is fully written to the
input stream and the parser/compiler should write the output to the
output stream?
Thanks,
Michael
i have to "parse/compile" lot's of perl files (as fast as possible)
and work with the output (...Can't locate XYZ.pm in @INC (@INC
contains: XYZ) at - line 7. BEGIN failed--compilation aborted at -
line 7....).
For now i iterate over the files, create a new perl process for every
file (perl -c -W -Mstrict -I XYZ) and write the bytes of the current
file into the process.
But it is very expensive to start a new perl process for every file to
parse.
Is it possible to use only one perl process for parsing multiple perl
files?
I mean: open only one perl process, write in the bytes of a file, read
the output, "reset" the perl process (change @inc...), write in the
bytes of the next file, read the output, "reset" the perl
process...and so on till all files will be parsed/compiled. Then exit
the perl process. Is this possible?
What do i have to "reset/new initalize" after one file is processed?
Only the @INC or more?
How can i tell the perl process that one file is fully written to the
input stream and the parser/compiler should write the output to the
output stream?
Thanks,
Michael