kasei / attean

A Perl Semantic Web Framework
19 stars 10 forks source link

UUID coercion #145

Open kjetilk opened 4 years ago

kjetilk commented 4 years ago

There's already a Types::UUID type, but it builds on UUID::Tiny, while Attean uses the more advanced Data::UUID, and I suppose it might not be a good thing to change that.

It is a nice to have feature, it generates a urn:uuid: URI, but I'm not sure how we should best do it. Attean could have its own Uuid type, I suppose, and add a coercion between that and @tobyink 's type. Or it might be better solutions. Possibly worth discussing.

tobyink commented 4 years ago

Data::UUID and UUID::Tiny pretty much do the same thing. Data::UUID might be a little faster because it's XS, but I really doubt UUID generation is a performance bottleneck for many real life apps.