kasei / attean

A Perl Semantic Web Framework
19 stars 10 forks source link

Add a simple factory for temporary models #132

Closed kjetilk closed 5 years ago

kjetilk commented 5 years ago

I found myself missing the constructor we had in Trine to quickly creating a temporary model, so I figured something like this could perhaps do the job?

kasei commented 5 years ago

What would you think about s/get_temporary_model /temporary_model/?

kjetilk commented 5 years ago

Yeah, I thought about that, but went for the get_ for consistency with get_store etc, but without the get_ works for me too.

kasei commented 5 years ago

My instinct is that get_store has the get prefix because it's looking up a store class, while this new method isn't doing a lookup but instead just returning a model. However, I don't have strong feelings about it, so happy to merge this if you prefer it this way.

kjetilk commented 5 years ago

No, I agree, I think the shorter form is better, so I have added a commit with it. :-)