<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 16, 2013, at 2:30 PM, Andrew Baerg <<a href="mailto:andrew.baerg@gmail.com">andrew.baerg@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 16, 2013 at 2:14 AM, Stefan Hornburg (Racke) <span dir="ltr"><<a href="mailto:racke@linuxia.de" target="_blank">racke@linuxia.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im"><br>
</div>In general, it would make sense to have a generic shipping ecosystem for<br>
Perl + Interchange. But I'm sure there are a few things which can be discussed<br>
resp. enhanced in Shipment, e.g.:<br>
<br>
* use a better way to address the services instead of ->ups, ->...<br></blockquote><div><br></div><div>I had actually not intended the Shipment module to be used directly. I have to confess that this is my first module published to CPAN. I had asked for help to get it published and this was one of the things that someone else did for me. There are definitely some areas where I could use some mentorship from a Perl guru to steer me in the right direction. :)<br>
<br></div><div>One of the main goals was to provide a consistent interface to the various shipping services so that you could do the following regardless of which service provider you were using:<br><br>my $shipment = Shipment::XYZ->new(<br>
    from_address => Shipment::Address->new( ... ),<br>    to_address => Shipment::Address->new( ... ),<br>    packages => [ Shipment::Package->new( ... ), ],<br>  );<br><br>$shipment->ship('ground');<br>
$shipment->get_package(0)->label->save;<br></div></div></div></div></blockquote><div>I'm glad this came up. I was just working on this today.</div><div><br></div><div>What to we do when different carriers offer different services that will not fit into our predefined, generic services?</div><div><br></div><div>I think in the example above we will have to assume each carrier offers essentially the same services which may not be the case.</div><div><br></div><div>In interchange we usually do something like:</div><div><br></div><div>UserTag ship_cost</div><div>blah, blah, bah</div><div><br></div><div>shipping.asc:</div><div>f [ship_cost mode=GROUND_HOME_DELIVERY]</div><div><br></div><div>Today I messed around with an approach like so:</div><div><div>shipping.asc:</div><div>f [ship_cost carrier=FexEx service=ground]</div><div><br></div></div>In my first example we have to assume each carrier's service (or mode) has a unique name of pass in a carrier parameter.</div><div><br></div><div>In the later example we'd have to limit the generic services to the once provided by all the carriers used.</div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
* use Moo instead Moose<br></blockquote><div><br></div><div>I'm sure this would be fairly straightforward to do.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

* allow other authors to write Shipment::XYZ<br></blockquote><div><br></div><div>Again, I think this was a consequence of how the module was published. I did not intend to publish Shipment, but I am not clear on how to make Shipment behave the same as say WebService on CPAN. Could you help me out with this?<br>
<br></div><div>As far as contributing to Shipment, anyone can fork it on github and I would absolutely welcome help in maintaining the distribution! <a href="https://github.com/pullingshots/Shipment">https://github.com/pullingshots/Shipment</a><br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
We would of course love to see you on the conference next year.<br></blockquote><div><br></div><div>Looking forward to it!<br><br><br></div><div><font color="#888888">Andrew</font><br></div></div></div></div>
_______________________________________________<br>interchange-users mailing list<br><a href="mailto:interchange-users@icdevgroup.org">interchange-users@icdevgroup.org</a><br>http://www.icdevgroup.org/mailman/listinfo/interchange-users<br></blockquote></div><br><div>
<div><div style="font-size: 12px; "><a href="http://www.bottlenose-wine.com/"><img src="http://www.bottlenose-wine.com/images/smlogo.gif" width="95" height="30" border="0"></a><span class="Apple-converted-space"> </span><br>Bill Carr, President at<span class="Apple-converted-space"> </span>Bottlenose<br>(413) 584-0400<span class="Apple-converted-space"> </span><br><a href="http://www.bottlenose-wine.com">http://www.bottlenose-wine.com</a><span class="Apple-converted-space"> </span><br><a href="http://www.bottlenose-wine.com/vcard/BillCarr.vcf" style="text-decoration: none; "><img src="http://www.bottlenose-wine.com/images/vcard.gif" width="13" height="10" border="0" align="absmiddle"><span class="Apple-converted-space"> </span>Download vCard</a></div></div>
</div>
<br></body></html>