[ic] ic6 Cart rewrite in Moo - initial Cart::Item class

Peter Mottram peter at sysnix.com
Wed Feb 5 13:56:31 UTC 2014


On 03/02/14 19:45, Stefan Hornburg (Racke) wrote:
> On 02/03/2014 07:20 PM, Peter Mottram wrote:
>> Since the wiki tasks section lists 'Rewrite Interchange6::Cart using Moo' I thought I'd start having a bit of a hack.
>> I decided a Cart::Item would be a good starting point and that also needed some Types and the beginnings of some tests of Cart::Item:
>>
>> https://github.com/SysPete/Interchange6/compare/moo_cart
>>
>> I'd appreciate feedback as if I'm on the right track then a full replacement of I6::Cart in Moo shouldn't be too hard.
>> It certainly makes param validation much clearer and I expect the new cart would be much more readable.
>>
> Yeah, definitely looks promising. So this task is officially yours:
>
> https://github.com/interchange/Interchange6/issues/3
>
> Thanks for taking it up!
>
> Regards
>            Racke
As I ploughed along with this I started to feel that I was 
reimplementing parts of Dancer2. I'm now looking at borrowing directly 
(with only minor changes) from:

Dancer2::Core::Hook
Dancer2::Core::Role::Hookable

And looking at pulling various chunks from:

Dancer2::Core::App

Probably lots of other useful scaffolding already exists in Dancer2. To 
be honest I'm starting to feel that it might be simpler to drop 
Interchange6::Cart and just start on Dancer2::Plugin::Interchange6. 
Maybe I could just borrow lots of code for now but that just means we'll 
start carrying baggage that could be handled better by just saying:

use Dancer2::Hook;

I'm quite a way on with this so maybe I should finish it off as it could 
then be used in the future as part of a Dancer2 replacement.

Thoughts?

R.
PeteM



More information about the interchange-users mailing list