Let me see if I got this straight...

Suppose I have an online store where I sell goods to several different countries each using its own currency. I could say (for Brazil's case):
my $real = new Currency; $real->name('Real'); $real->country('BR'); $real->dolarValue(1.81);
And repeat this as many times necessary for each country. Then use set everything up, and use DBI to get the items from a shopping cart as usual (name, price, other attributes). Then my app would work as if my currency variables had been declared at startup, so I wouldn't have to do a 'select' myself to find out what the price of an item was in Reals?

That's a bit confusing... Let me try this instead.
Instead of doing two selects (one for the product, and one for the currency), I could have the currency loaded as an object and do my select on the product as if the currency information had always been there?

#!/home/bbq/bin/perl
# Trust no1!

In reply to RE: Re: Tangram by BBQ
in thread Tangram by httptech

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.