Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NamespaceMap from Template #12

Open
kjetilk opened this issue Nov 20, 2019 · 0 comments
Open

NamespaceMap from Template #12

kjetilk opened this issue Nov 20, 2019 · 0 comments

Comments

@kjetilk
Copy link

kjetilk commented Nov 20, 2019

I just had a look at Data::HAL, and it seems they are using URI::Template to create a namespacemap using, so that e.g. http://example.org/foo/{bar} becomes a pair

bar => 'http://example.org/foo/'

and I figured this would a reasonable heuristic to add as a coercion to Types::Namespace, which I maintain. But then, I figured, it might be a nicer if URI::Template had a method that could do that. So that the coercion I add simply takes the result of that method and gives it to URI::NamespaceMap's add_mapping method

So, that'd be my feature suggestion :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant