Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • There's a reason in Perl that you can always end a block with a semicolon (it doesn't create a null statement) and can always end a list with a comma (it doesn't create an extra null element. Please do that. Don't write Perl code the way no sane person would do it, even automatically.
    --
    • Randal L. Schwartz
    • Stonehenge
    • I agree that the ultimate code generated should be readable. I was just doing that as an exercise to get a different view on things. Some of the things XML languages require are a bit twisted when they get translated into a language such as Perl (e.g., should the <for-each/> become a foreach or a map in Perl? is it in a statement or an expression context? need to throw some <sort/> expressions in before we iterate...).

      The plan would be to put the code through a pretty-printer anyway, which I do now in the old code with its traditional semis and commas. IMHO, autogeneration shouldn't pretty-print too much, but such code is hard to read regardless of comma/semi placement without a pretty-printer of some kind.