I imagine you could put a switch on the compiler call that says "I'm not doing evals or dos or requires, so you can leave out the Perl source compiler."
=cut
--Brent Dax
@HPAJ=split("", "rekcaH lreP rentonA tsuJ");
print reverse @HPAJ; #sucky but who cares?
| [reply] [d/l] |
I don't see why we need to leave anything out at all. Compiled Perl programs would require the Perl DLL. But since Visual Basic has done that all along, big deal.
Meanwhile, if you really really want a (small) single exe file solution, I can suppose that (a) you specify what you want to include or leave out, and get an error if you violate that; or (b) the compiler knows what you used or didn't, and leaves things out at link-time automatically. If nothing in the program called eval(), for example, eval() doesn't get pulled in by the linker. (If you do include eval, you might as well pull in everything, so don't worry about the lack of static analysis).
| [reply] |
That doesn't mean we *want* to copy VB. Personally, I hate having to haul around a runtime with my (few) VB programs.
evals are the reason I want you to *tell* the compiler if you're using something. One of the things I really don't want to do is outsmart the programmer. We should have switches to exclude certain functionality that already exists in the Perl core for size reasons. (For the purposes of this article, I'm using a --no=feature switch.) Perhaps we can have it say, "WARNING: You don't seem to be using regular expressions. Support for them can be excluded with the --no=re flag. (This warning can be disabled with the --notips flag.)" (Or whatever.)
To pull that off, someone needs to wade through the core and find all the entry functions for regexen--then we just make those die on entry and delete the other regex functions. Unless someone already knows this--anybody?
=cut
--Brent Dax
@HPAJ=split("", "rekcaH lreP rentonA tsuJ");
print reverse @HPAJ; #sucky but who cares?
| [reply] [d/l] [select] |