Thanks for the input, diotalevi. The reason I picked Business::Ship was because calculating shipping cost isn't the only feature that I wanted to support. In the future, I plan to add:
* Address Verification
* Shipping status (tracking)
* Electronic Merchandise Return
* Shipping label generation
* Customs forms
* Shipping time (how long till it gets there)
* Delivery/Signature confirmation
I see that you've hardcoded various strings in your code like the following country name translator. You should either delegate this job to something else or move the data outside your program.
Good advice, I'll do that.
I also notice you use the indirect object syntax - that's likely a mistake on your part and it should be rectified.
I like the object factory design a lot, so I probably used it even though it wasn't necessary. But the idea was that it would make it easier on the API user to use UPS or USPS (eventually others) without changing much code. Namely, they can get the sub-object without doing an eval. For an example, see doc/xps-query.tag.
-Dan
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.