in reply to getting more from __DATA__

I'd suggest a tweak to allow comments in the __DATA__ section.

--hsm

"Never try to teach a pig to sing...it wastes your time and it annoys the pig."

Replies are listed 'Best First'.
Re^2: getting more from __DATA__
by Ctrl-z (Friar) on Mar 26, 2005 at 18:39 UTC

    like it. nice one ;-)

    Its kind of tricky as there is no guarantee what the content of each segment is... I suppose there could be a reserved hashkey that automatically gets ignored:

    __rem__ this is the foo part... __foo__ etc etc
    is that what you were thinking?




    time was, I could move my arms like a bird and...
      No, I was just thinking of something along the lines of a 'if first character of the line is semi-colon, then ignore' style of comment. Easy to parse and allows bread crumbs in the forest...

      --hsm

      "Never try to teach a pig to sing...it wastes your time and it annoys the pig."

        What if "if first character of the line is semi-colon, then ignore" is a valid syntax in the embedded text?

        Thats what I meant by being tricky - any special syntax you create on top, could interfere with whats embedded inside. Then you need an escape mechanism...which is a drag to implement for both author and user :-).

        Commenting would be useful, but I cant really think of another way to avoid that catch 22?




        time was, I could move my arms like a bird and...