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.
  • Why are you using new Array/new Object? That is oh so verbose, and has no benefit over the the much shorter (and Perl compatible) [] resp. {}. On the contrary:

    new Array(3)
    will produce an array of 3 null items, while

    new Array(3, 4)
    will produce an array of 2 items: the values 3 and 4.
    • Because

      a) This is very old code, and we try to support older JavaScript versions (though there is no reason why, when you you tell the module you want v1.4 that it shouldn't use the slimmer syntax)

      b) I'm not the original author. I wrote LiteObject and said I'd maintain this when Ariel passed away.

      c) See the points already made in the original post (less verbose format, JSON-like format)

      So the real question is, if it offends you so, are you going to submit a patch to gain commit rights? :-P
      --
      Were that I say, pancakes?
      • Well, uh... If only I understood what the purpose behind it all is. I don't.
        • Data dumping to JavaScript. Be it for use with AJAX, or any other client-side data exporting purposes. It predates JSON and affords more flexibility. For instance, LiteObject is pretty efficient (nearly as small as literals but pre-JS1.2 compatible) and a good idiom for certain kinds of data.
          --
          Were that I say, pancakes?
          • Is there any particular reason why you want to keep this alive, or is it largely obsolete?
            • I'm sorry, this is a non-sensical question: the second part does not follow from the first, and I've already made the case for maintaining it.
              --
              Were that I say, pancakes?