Perrin Harkins wrote:
On Mon, 2003-07-07 at 11:50, Nigel Hamilton wrote:

        I thought I could save some RAM by stripping out comments and
whitespace before the eval step - so I quickly wrote a Registry-like
handler that strips comments.


Those don't take up any space in the actual compiled opcodes.  The only
space you could save is in the string that the file is initially loaded
into and the $eval string that gets built up to pass to eval().

[...]


I'd just like to add an example which shows you what exactly perl sees when it compiles your code:

perl -MO=Deparse -le '\
print \
"this is a string" \
# hmm, some comment \
. "another string" \
# bummer, i should end the line now \
;'

prints:

BEGIN { $/ = "\n"; $\ = "\n"; }
print 'this is a stringanother string';
-e syntax OK

Also see:


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to