in reply to Re: Prettyprint
in thread Prettyprint

That's somewhat odd. What does mysub{} do?
Deparse is actually returning the interpreter's version of your code to you, so it will have some amount of inlining performed and a few other things specific to the state of your code when you deparsed it. In other words, your code will be slightly optimized and you should beware of early optimization. Perhaps I should have phrased my earlier statement:

The deparser, when it works, returns (more or less) your code in a pretty format.

Replies are listed 'Best First'.
RE: RE: Re: Prettyprint
by Anonymous Monk on Sep 09, 2000 at 00:19 UTC
    mysub{} prints HTML code. Just one of life's mysteries, I guess.

    I read that in Perl the parentheses surrounding a subroutine's arguments are completely optional, so it should not matter whether I use parentheses to call subroutines in my prettified code, but it does.
      Wrong! Those parentheses are not "completely optional!"
      Parentheses are required when clarification is required. For example, if you don't prototype your subroutine, then you must use either an ampersand & or parentheses to tell Perl that its a user defined subroutine. You are probably not using strict or warnings, so the bareword message probably slipped past you unnoticed. I'm not sure why the deparser would drop the parentheses, but it makes sense that you would need them.