{"action":"created","comment":{"url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/comments/48700120","id":48700120,"diff_hunk":"@@ -1,42 +1,72 @@\n package MusicBrainz::Server::Entity::URL;\n use Moose;\n \n-use Encode 'decode';\n use MooseX::Types::URI qw( Uri );\n-use MusicBrainz::Server::Filters;\n-use URI::Escape;\n-use Try::Tiny;\n \n extends 'MusicBrainz::Server::Entity::CoreEntity';\n with 'MusicBrainz::Server::Entity::Role::Linkable';\n \n has 'url' => (\n-    is => 'rw',\n+    is => 'ro',","path":"lib/MusicBrainz/Server/Entity/URL.pm","position":15,"original_position":15,"commit_id":"1ceab130c15afd25e444c19d23103afd6797c20d","original_commit_id":"1ceab130c15afd25e444c19d23103afd6797c20d","user":{"login":"uklauer","id":1127374,"avatar_url":"https://avatars.githubusercontent.com/u/1127374?v=3","gravatar_id":"","url":"https://api.github.com/users/uklauer","html_url":"https://github.com/uklauer","followers_url":"https://api.github.com/users/uklauer/followers","following_url":"https://api.github.com/users/uklauer/following{/other_user}","gists_url":"https://api.github.com/users/uklauer/gists{/gist_id}","starred_url":"https://api.github.com/users/uklauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uklauer/subscriptions","organizations_url":"https://api.github.com/users/uklauer/orgs","repos_url":"https://api.github.com/users/uklauer/repos","events_url":"https://api.github.com/users/uklauer/events{/privacy}","received_events_url":"https://api.github.com/users/uklauer/received_events","type":"User","site_admin":false},"body":"The attribute was never set except on construction, so this doesn’t really change anything. However, because I added a number of lazy attributes that cache values computed from the `url` attribute here, I thought I should mark it as constant.","created_at":"2016-01-04T01:17:19Z","updated_at":"2016-01-04T01:17:19Z","html_url":"https://github.com/metabrainz/musicbrainz-server/pull/202#discussion_r48700120","pull_request_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/202","_links":{"self":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/comments/48700120"},"html":{"href":"https://github.com/metabrainz/musicbrainz-server/pull/202#discussion_r48700120"},"pull_request":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/202"}}},"pull_request":{"url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/202","id":54936949,"html_url":"https://github.com/metabrainz/musicbrainz-server/pull/202","diff_url":"https://github.com/metabrainz/musicbrainz-server/pull/202.diff","patch_url":"https://github.com/metabrainz/musicbrainz-server/pull/202.patch","issue_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/202","number":202,"state":"open","locked":false,"title":"URL fixes, part 3 (mostly internationalized domain names/MBS-8683)","user":{"login":"uklauer","id":1127374,"avatar_url":"https://avatars.githubusercontent.com/u/1127374?v=3","gravatar_id":"","url":"https://api.github.com/users/uklauer","html_url":"https://github.com/uklauer","followers_url":"https://api.github.com/users/uklauer/followers","following_url":"https://api.github.com/users/uklauer/following{/other_user}","gists_url":"https://api.github.com/users/uklauer/gists{/gist_id}","starred_url":"https://api.github.com/users/uklauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uklauer/subscriptions","organizations_url":"https://api.github.com/users/uklauer/orgs","repos_url":"https://api.github.com/users/uklauer/repos","events_url":"https://api.github.com/users/uklauer/events{/privacy}","received_events_url":"https://api.github.com/users/uklauer/received_events","type":"User","site_admin":false},"body":"Percent-encoded UTF-8 in the local part of URLs has long been decoded for display, but punycoded internationalized domain names were shown as raw ASCII.\r\n    \r\nThis uses the existing IRI support of the `URI` module to decode all parts of URLs at the same time. Some new attributes (so that the decoding only has to be done once) are added to the URL base class for access to the decoded URL or just the decoded local part and for checking whether the local part was in some non-UTF-8 legacy encoding.\r\n    \r\nFinally, the `pretty_name` method of the base class and overridden display names in the subclasses make use ofthe decoded form, as do two templates that don’t use `pretty_name` but always show the actual URL.\r\n\r\nAdditional changes:\r\n- One of my previous related pull requests left a spurious `</a>` that is now removed.\r\n- Added an `MB::S::Entity::URL::MediaWiki` role to hold some code that the classes for MediaWiki sites duplicated.\r\n- Ozon.ru was marked as scheme independent, i.e. links from HTTPS MusicBrainz led to their HTTPS site. However, their certificate is broken (only valid for ozone.ru), so let’s stick with HTTP for now.","created_at":"2016-01-04T01:14:18Z","updated_at":"2016-01-04T01:17:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f13a87593612a6fa31c0acc9ce733e9e3ca5f2a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/202/commits","review_comments_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/202/comments","review_comment_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/202/comments","statuses_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/statuses/1ceab130c15afd25e444c19d23103afd6797c20d","head":{"label":"uklauer:urls","ref":"urls","sha":"1ceab130c15afd25e444c19d23103afd6797c20d","user":{"login":"uklauer","id":1127374,"avatar_url":"https://avatars.githubusercontent.com/u/1127374?v=3","gravatar_id":"","url":"https://api.github.com/users/uklauer","html_url":"https://github.com/uklauer","followers_url":"https://api.github.com/users/uklauer/followers","following_url":"https://api.github.com/users/uklauer/following{/other_user}","gists_url":"https://api.github.com/users/uklauer/gists{/gist_id}","starred_url":"https://api.github.com/users/uklauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uklauer/subscriptions","organizations_url":"https://api.github.com/users/uklauer/orgs","repos_url":"https://api.github.com/users/uklauer/repos","events_url":"https://api.github.com/users/uklauer/events{/privacy}","received_events_url":"https://api.github.com/users/uklauer/received_events","type":"User","site_admin":false},"repo":{"id":5672304,"name":"musicbrainz-server","full_name":"uklauer/musicbrainz-server","owner":{"login":"uklauer","id":1127374,"avatar_url":"https://avatars.githubusercontent.com/u/1127374?v=3","gravatar_id":"","url":"https://api.github.com/users/uklauer","html_url":"https://github.com/uklauer","followers_url":"https://api.github.com/users/uklauer/followers","following_url":"https://api.github.com/users/uklauer/following{/other_user}","gists_url":"https://api.github.com/users/uklauer/gists{/gist_id}","starred_url":"https://api.github.com/users/uklauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uklauer/subscriptions","organizations_url":"https://api.github.com/users/uklauer/orgs","repos_url":"https://api.github.com/users/uklauer/repos","events_url":"https://api.github.com/users/uklauer/events{/privacy}","received_events_url":"https://api.github.com/users/uklauer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/uklauer/musicbrainz-server","description":"","fork":true,"url":"https://api.github.com/repos/uklauer/musicbrainz-server","forks_url":"https://api.github.com/repos/uklauer/musicbrainz-server/forks","keys_url":"https://api.github.com/repos/uklauer/musicbrainz-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uklauer/musicbrainz-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uklauer/musicbrainz-server/teams","hooks_url":"https://api.github.com/repos/uklauer/musicbrainz-server/hooks","issue_events_url":"https://api.github.com/repos/uklauer/musicbrainz-server/issues/events{/number}","events_url":"https://api.github.com/repos/uklauer/musicbrainz-server/events","assignees_url":"https://api.github.com/repos/uklauer/musicbrainz-server/assignees{/user}","branches_url":"https://api.github.com/repos/uklauer/musicbrainz-server/branches{/branch}","tags_url":"https://api.github.com/repos/uklauer/musicbrainz-server/tags","blobs_url":"https://api.github.com/repos/uklauer/musicbrainz-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uklauer/musicbrainz-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uklauer/musicbrainz-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/uklauer/musicbrainz-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uklauer/musicbrainz-server/statuses/{sha}","languages_url":"https://api.github.com/repos/uklauer/musicbrainz-server/languages","stargazers_url":"https://api.github.com/repos/uklauer/musicbrainz-server/stargazers","contributors_url":"https://api.github.com/repos/uklauer/musicbrainz-server/contributors","subscribers_url":"https://api.github.com/repos/uklauer/musicbrainz-server/subscribers","subscription_url":"https://api.github.com/repos/uklauer/musicbrainz-server/subscription","commits_url":"https://api.github.com/repos/uklauer/musicbrainz-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/uklauer/musicbrainz-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/uklauer/musicbrainz-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/uklauer/musicbrainz-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/uklauer/musicbrainz-server/contents/{+path}","compare_url":"https://api.github.com/repos/uklauer/musicbrainz-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uklauer/musicbrainz-server/merges","archive_url":"https://api.github.com/repos/uklauer/musicbrainz-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uklauer/musicbrainz-server/downloads","issues_url":"https://api.github.com/repos/uklauer/musicbrainz-server/issues{/number}","pulls_url":"https://api.github.com/repos/uklauer/musicbrainz-server/pulls{/number}","milestones_url":"https://api.github.com/repos/uklauer/musicbrainz-server/milestones{/number}","notifications_url":"https://api.github.com/repos/uklauer/musicbrainz-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uklauer/musicbrainz-server/labels{/name}","releases_url":"https://api.github.com/repos/uklauer/musicbrainz-server/releases{/id}","created_at":"2012-09-04T12:48:17Z","updated_at":"2015-12-15T21:19:21Z","pushed_at":"2016-01-04T00:57:18Z","git_url":"git://github.com/uklauer/musicbrainz-server.git","ssh_url":"git@github.com:uklauer/musicbrainz-server.git","clone_url":"https://github.com/uklauer/musicbrainz-server.git","svn_url":"https://github.com/uklauer/musicbrainz-server","homepage":"https://musicbrainz.org/doc/MusicBrainz_Server","size":84858,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"metabrainz:master","ref":"master","sha":"618a9d3ef55cbdbba820a6fd881a970f85b24a9b","user":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"repo":{"id":697520,"name":"musicbrainz-server","full_name":"metabrainz/musicbrainz-server","owner":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabrainz/musicbrainz-server","description":"The official musicbrainz-server codebase","fork":false,"url":"https://api.github.com/repos/metabrainz/musicbrainz-server","forks_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/forks","keys_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/teams","hooks_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/hooks","issue_events_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/events{/number}","events_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/events","assignees_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/assignees{/user}","branches_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/branches{/branch}","tags_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/tags","blobs_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/statuses/{sha}","languages_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/languages","stargazers_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/stargazers","contributors_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/contributors","subscribers_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/subscribers","subscription_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/subscription","commits_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/contents/{+path}","compare_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/merges","archive_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/downloads","issues_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues{/number}","pulls_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls{/number}","milestones_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/milestones{/number}","notifications_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/labels{/name}","releases_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/releases{/id}","created_at":"2010-06-01T16:30:04Z","updated_at":"2015-12-29T15:44:18Z","pushed_at":"2016-01-04T01:14:18Z","git_url":"git://github.com/metabrainz/musicbrainz-server.git","ssh_url":"git@github.com:metabrainz/musicbrainz-server.git","clone_url":"https://github.com/metabrainz/musicbrainz-server.git","svn_url":"https://github.com/metabrainz/musicbrainz-server","homepage":"http://musicbrainz.org/doc/MusicBrainz_Server","size":85022,"stargazers_count":212,"watchers_count":212,"language":"Perl","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":91,"mirror_url":null,"open_issues_count":3,"forks":91,"open_issues":3,"watchers":212,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/202"},"html":{"href":"https://github.com/metabrainz/musicbrainz-server/pull/202"},"issue":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/202"},"comments":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/202/comments"},"review_comments":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/202/comments"},"review_comment":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/202/commits"},"statuses":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/statuses/1ceab130c15afd25e444c19d23103afd6797c20d"}}}}