Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

IMNSHO almost all of those things you call "other information" ought to be part of the payment object, and I would certainly pass that. Textual descriptions should be accessible via the appropriate reference tables using the appropriate methods on your object (specially if it's a DBIx::Class object. The urls can be pulled out of the catalyst context object which your templating system ought to have access to.

I.E. I'd pass the object. I often stash other stuff, but not for the reasons you mention.

CENSORED database dates! As far as I'm concerned, there are only three reasonable forms for a date in a perl program:

  • epoch time (seconds since 1970)
  • an ISO date/time string (you know: YYYY-MM-DDTHH:MM:SSZZ) using as much as you need
  • a DateTime object
Only the first two can be stored in a database. I never use database date formats. I've had to use quite a number of different databases and none of them agree on anything to do with dates/times. And none of them support time-zones. And none of them do what I want. I've had nothing but trouble and wasted time from database date/times. I use an epoch integer or an ISO string, (whichever is appropriate) to store them and convert them to a DateTime object to manipulate them. And it just works. I hate database date/time handling.

Sorry about that. Now I feel better.

In reply to Re: How to organize Catalyst stash by thargas
in thread How to organize Catalyst stash by roman

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2018-01-23 02:45 GMT
    Find Nodes?
      Voting Booth?
      How did you see in the new year?

      Results (238 votes). Check out past polls.