kasei / attean

A Perl Semantic Web Framework
19 stars 10 forks source link

More coercions, take 2 #148

Closed kjetilk closed 4 years ago

kjetilk commented 4 years ago

144 got a bit messy, I think it makes sense to merge this cherry-pick instead.

What I was worried about in #144 was that the depenendency chain became too long, mainly through the dependency on URI::NamespaceMap, which brings in many things that could be optional, like UUID types.

I didn't at first realize that URI::NamespaceMap had that effect, so I thought I should remove some coercions from Attean to avoid it, and then, it didn't anyway.

So, either we can do this, or I can make more stuff optional in URI::NamespaceMap. Unless you are really worried about the dependency chain, I suggest we merge this PR.

URI::NamespaceMap has quite a lot of moving parts already, since the mapping libraries are optional, and further optionals make testing harder.

I think it should be possible to make some coercions optional later if we find it is needed.

kasei commented 4 years ago

Attean already has a pretty large dependency chain, so I'm not going to be overly concerned with effort to reduce that in any given scenario.

kjetilk commented 4 years ago

OK, good, then I think this should be good to merge :-)