Possibly Dumper is the wrong tool here, yeah.

I looked at JSON and XML, and it looked to me like the overhead was unreasonable for this use, and that I had to use options that made the generated "standard" representation non-standard to do what I needed (which was to convey Perl objects that I created specifically for communicating between these two programs, between these two programs). And it's a pretty personal specialized application, I don't see it really ever being used outside my network. So this looked like the quickest and cleanest way to get it running, the big downside being that it's solidly perl-specific. Which doesn't bother me a bit.

I was looking for how to format the information (some header information followed by a list of filenames, repeated multiple times) and parse it to separate the "finding the files to display" function from the "generate the PDF showing the image thumbnails and some information" function, and I realized that inventing my own format was stupid and I should use something standard, but when I looked at the obvious "standard" choices they required generating and parsing code to get to what I needed, and I realized that Dumper didn't. In this limited use I'm not scared of evaling the input (which I produced myself and stored in a file in my own directory), and there's nothing approaching the complexity of circular references or anything, nor likely to ever be (just doesn't fit the data model).


In reply to Re^2: Class / package weak association by dd-b
in thread Class / package weak association by dd-b

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.