Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-18 04:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found